Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
15
Task/Fractal-tree/PicoLisp/fractal-tree.l
Normal file
15
Task/Fractal-tree/PicoLisp/fractal-tree.l
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
(load "@lib/math.l")
|
||||
|
||||
(de fractalTree (Img X Y A D)
|
||||
(unless (=0 D)
|
||||
(let (R (*/ A pi 180.0) DX (*/ (cos R) D 0.2) DY (*/ (sin R) D 0.2))
|
||||
(brez Img X Y DX DY)
|
||||
(fractalTree Img (+ X DX) (+ Y DY) (+ A 30.0) (dec D))
|
||||
(fractalTree Img (+ X DX) (+ Y DY) (- A 30.0) (dec D)) ) ) )
|
||||
|
||||
(let Img (make (do 300 (link (need 400 0)))) # Create image 400 x 300
|
||||
(fractalTree Img 200 300 -90.0 10) # Draw tree
|
||||
(out "img.pbm" # Write to bitmap file
|
||||
(prinl "P1")
|
||||
(prinl 400 " " 300)
|
||||
(mapc prinl Img) ) )
|
||||
Loading…
Add table
Add a link
Reference in a new issue