Anonymous
Not logged in
Log in
JSXGraph Wiki
Search
L-systems
From JSXGraph Wiki
Namespaces
Page
Discussion
More
More
Page actions
Read
View source
History
Revision as of 20:12, 30 December 2008 by
A WASSERMANN
(
talk
|
contribs
)
(
→Penrose tiling
)
(
diff
)
← Older revision
|
Latest revision
(
diff
) |
Newer revision →
(
diff
)
Contents
1
Sierpinski curve
2
Quadratic snowflake variation
3
Dragon curve
4
Islands and lakes
5
Peano curve
6
Hexagonal Gosper curve
7
Plant 1
8
Plant 2
9
Hexagonal kolam
10
Mango kolam
11
Penrose tiling
Sierpinski curve
var level = 6; var axiom = 'A'; var rules = { 'A':'B-A-B', 'B':'A+B+A', '+' : '+', '-' : '-' }; var symbols = { 'A':'F', 'B':'F', '+':'+', '-':'-', '[':'[', ']':']' }; var angle = 60; var len = 500/Math.pow(2,level); t.setPos(-250*Math.pow(-1,level),-250); t.rt(90*Math.pow(-1,level));
Quadratic snowflake variation
var level = 5; var axiom = '+F'; var rules = { 'F':'F-F+F+F-F', '+' : '+', '-' : '-' }; var symbols = { 'F':'F', '+':'+', '-':'-', '[':'[', ']':']' } ; var angle = 90; var len = 500/Math.pow(3,level); t.setPos(250,0);
Dragon curve
var level = 8; var axiom = 'Fl'; var rules = { 'F' : 'F', 'l' : 'l+rF+', 'r' : '-Fl-r', '+' : '+', '-' : '-' }; var symbols = { 'F':'F', 'l':' ', 'r':' ', '+':'+', '-':'-', '[':'[', ']':']' } ; var angle = 90; var len = 500/(level*level);
Islands and lakes
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);
Peano curve
var level = 4; var axiom = 'X'; var rules = { 'F' : 'F', 'X' : 'XFYFX+F+YFXFY-F-XFYFX', 'Y' : 'YFXFY-F-XFYFX+F+YFXFY', '+' : '+', '-' : '-' }; var symbols = { 'F':'F', 'X':' ', 'Y':' ', '+':'+', '-':'-', '[':'[', ']':']' } ; var angle = 90; var len = 500/Math.pow(3,level); t.setPos(250,-250);
Hexagonal Gosper curve
var level = 3; var axiom = 'XF'; var rules = { 'F' : 'F', 'X' : 'X+YF++YF-FX--FXFX-YF+', 'Y' : '-FX+YFYF++YF+FX--FX-Y', '+' : '+', '-' : '-' }; var symbols = { 'F':'F', 'X':' ', 'Y':' ', '+':'+', '-':'-', '[':'[', ']':']' } ; var angle = 60; var len = 500/Math.pow(3,level); t.setPos(250,0);
Plant 1
var level = 3; var axiom = 'F'; var rules = { 'F' : 'F[+F]F[-F]F', '[' : '[', ']' : ']', '+' : '+', '-' : '-' }; var symbols = { 'F':'F', '+':'+', '-':'-', '[':'[', ']':']' } ; var angle = 25.7; var len = 500/Math.pow(3,level); t.setPos(0,-250); var shrink = 1.0;
Plant 2
var level = 4; var axiom = 'X'; var rules = { 'F' : 'FF', 'X' : 'F-[[X]+X]+F[+FX]-X', '[' : '[', ']' : ']', '+' : '+', '-' : '-' }; var symbols = { 'F':'F', 'X':' ', '+':'+', '-':'-', '[':'[', ']':']' } ; var angle = 22.5; var len = 800/Math.pow(3,level); t.setPos(0,-250);
Hexagonal kolam
var level = 4; var axiom = 'X'; var rules = { 'F' : 'F', 'X' : '[-F+F[Y]+F][+F-F[X]-F]', 'Y' : '[-F+F[Y]+F][+F-F-F]', '[' : '[', ']' : ']', '+' : '+', '-' : '-' }; var symbols = { 'F':'F', 'X':' ', 'Y':' ', '+':'+', '-':'-', '[':'[', ']':']' } ; var angle = 60; var len = 300/(level); t.setPos(0,-250);
Mango kolam
var level = 5; var axiom = 'A---A'; var rules = { 'F' : 'F', 'f' : 'f', 'A' : 'f-F+Z+F-fA', 'Z' : 'F-FF-F--[--Z]F-FF-F--F-FF-F--', '[' : '[', ']' : ']', '+' : '+', '-' : '-' }; var symbols = { 'F':'F', 'f':'f', 'A':' ', 'Z':' ', '+':'+', '-':'-', '[':'[', ']':']' } ; var angle = 60; var len = 100/(level);
Penrose tiling
var level = 2; var axiom = '[7]++[7]++[7]++[7]++[7]'; var rules = { '6' : '81++91----71[-81----61]++', '7' : '+81--91[---61--71]+', '8' : '-61++71[+++81++91]-', '9' : '--81++++61[+91++++71]--71', '1' : '', '+' : '+', '-' : '-', '[' : '[', ']' : ']' }; var symbols = { '1':'F', '6':' ', '7':' ', '8':' ', '9':' ', '+':'+', '-':'-', '[':'[', ']':']' }; var angle = 36.0; var len = 100/(level); t.setProperty({fillcolor:'#abff00'});
Categories
:
Examples
Turtle Graphics
Navigation
Navigation
Main page
Community portal
Current events
Recent changes
Random page
Help
Examples
Wiki tools
Wiki tools
Special pages
Page tools
Page tools
User page tools
More
What links here
Related changes
Printable version
Permanent link
Page information
Page logs
Categories
Categories
Examples
Turtle Graphics