Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,7 @@
|
|||
#lang racket
|
||||
(require 2htdp/image)
|
||||
(define (sierpinski n)
|
||||
(if (zero? n)
|
||||
(triangle 2 'solid 'red)
|
||||
(let ([t (sierpinski (- n 1))])
|
||||
(freeze (above t (beside t t))))))
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
;; the following will show the graphics if run in DrRacket
|
||||
(sierpinski 8)
|
||||
;; or use this to dump the image into a file, shown on the right
|
||||
(require file/convertible)
|
||||
(display-to-file (convert (sierpinski 8) 'png-bytes) "sierpinski.png")
|
||||
Loading…
Add table
Add a link
Reference in a new issue