Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
15
Task/Fractal-tree/Racket/fractal-tree.rkt
Normal file
15
Task/Fractal-tree/Racket/fractal-tree.rkt
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#lang racket
|
||||
(require graphics/turtles)
|
||||
|
||||
(define (tree n)
|
||||
(when (> n 1)
|
||||
(draw (/ n 2))
|
||||
(tprompt (split* (turn 60) (turn -60))
|
||||
(tree (/ n 2)))
|
||||
(draw (/ n 2))
|
||||
(turn 5)
|
||||
(tree (- n 1))))
|
||||
|
||||
(turtles #t) (move 100) (turn 90) (move -200)
|
||||
(tree 35)
|
||||
(save-turtle-bitmap "tree.png" 'png)
|
||||
Loading…
Add table
Add a link
Reference in a new issue