Dandelion
by NightElfik
Short link: http://malsys.cz/g/wpnXgqCT
Loading 3D model
of Dandelion
Comments
comments powered by DisqusSource code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | lsystem Dandelion(quality = 20) extends Branches { set symbols axiom = S K f(6) ^(-90) A(0); set iterations = 80; set initialAngle = 90; set cameraPosition = {3, 83, 51}; set cameraUpVector = {-0.1, 0.75, 0.65}; set cameraTarget = {2, 67, 21}; interpret S as DrawForward(60, 2, #66FF66); interpret f as MoveForward; interpret X as lsystem Seed(quality); interpret K as DrawSphere(8, #AAFFAA, 2); interpret + as Yaw(137.515); interpret ^ as Pitch; rewrite A(n) to + [ ^(-n/2) f(n^0.5) ^(-n/2 + 90) X ] A(n+1); } abstract lsystem Seed(quality) extends Branches { set symbols axiom = F(4, 1, #332211) F(2, 0.3, #332211) F(10, 0.2, #EEEEEE) ^(-90) X; set iterations = quality; interpret F as DrawForward; interpret + as Yaw(137.515); interpret ^ as Pitch; rewrite X to + [ ^(random(20,30)) F(random(3, 3.5), 0.05, #EEEEEE) ] X; } process Dandelion with ThreeJsRenderer; |
Thumbnail extension
1 | process Dandelion(5) with ThreeJsRenderer; |