Islands and lakes: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
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 = 2;
var level = 2;
Line 26: Line 24:
<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>
<jsxgraph width="600" height="600" box="box0">
<script language="JavaScript">
var t;
var t;
var turtle = [];
var turtle = [];
Line 109: Line 106:
   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

Revision as of 09:37, 25 March 2011

For an explanation see L-systems. <html> <form><textarea id="inputtext0" rows=15 cols=35 wrap="off" style="width:600px;"> var level = 2; var axiom = 'F-F-F-F'; var rules = {

   'F' : 'F-f+FF-F-FF-Ff-FF+f-FF+F+FF+Ff+FFF',
   'f' : 'ffffff', 
   '+' : '+',
   '-' : '-'

}; var symbols = { 'F':'F',

               'f':'f',
               '+':'+',
               '-':'-',
               '[':'[',
               ']':']'
             } ;
             

var angle = 90; var len = 20/Math.pow(2,level); </textarea>
<input type="button" value="run" onClick="run(0)"> <input type="button" value="clear" onClick="clearturtle(0)"> </form>

  • Przemyslaw Prusinkiewicz, James Hanan: Lindenmayer Systems, Fractals, and Plants (Lecture Notes in Biomathematics). Springer-Verlag 1989, ISBN 0-387-97092-4
  • http://en.wikipedia.org/wiki/L-system