Difference between revisions of "Mango kolam"

From JSXGraph Wiki
Jump to navigationJump to search
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
For an explanation see [[L-systems]].
 
For an explanation see [[L-systems]].
 
<html>
 
<html>
<link rel="stylesheet" type="text/css" href="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraph.css" />
 
<script type="text/javascript" src="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraphcore.js"></script>
 
 
<form><textarea id="inputtext0" rows=15 cols=35 wrap="off" style="width:600px;">
 
<form><textarea id="inputtext0" rows=15 cols=35 wrap="off" style="width:600px;">
 
var level = 5;
 
var level = 5;
Line 32: Line 30:
 
<input type="button" value="clear" onClick="clearturtle(0)">
 
<input type="button" value="clear" onClick="clearturtle(0)">
 
</form>
 
</form>
<div id="box0" class="jxgbox" style="width:600px; height:600px;"></div>
+
</html>
<script language="JavaScript">
+
<jsxgraph width="600" height="600" box="box0">
 
var t;
 
var t;
 
var turtle = [];
 
var turtle = [];
 
var brd = [];
 
var brd = [];
brd[0] = JXG.JSXGraph.initBoard('box0', {originX: 300, originY: 300, unitX: 1, unitY: 1});
+
brd[0] = JXG.JSXGraph.initBoard('box0', {boundingbox: [-300, 300, 300, -300]});
turtle[0] = brd[0].createElement('turtle');
+
turtle[0] = brd[0].create('turtle');
  
 
function expander(level,axiom,rules) {
 
function expander(level,axiom,rules) {
Line 115: Line 113:
 
   turtle[nr].cs();
 
   turtle[nr].cs();
 
}
 
}
</script>
+
</jsxgraph>
</html>
 
  
 
* Przemyslaw Prusinkiewicz, James Hanan: Lindenmayer Systems, Fractals, and Plants (Lecture Notes in Biomathematics). Springer-Verlag 1989, ISBN 0-387-97092-4
 
* Przemyslaw Prusinkiewicz, James Hanan: Lindenmayer Systems, Fractals, and Plants (Lecture Notes in Biomathematics). Springer-Verlag 1989, ISBN 0-387-97092-4

Latest revision as of 11:29, 31 January 2013

For an explanation see L-systems.