commit deletes

This commit is contained in:
Ingy döt Net 2013-10-27 23:48:49 +00:00
parent 776bba907c
commit 372c577f83
233 changed files with 0 additions and 6724 deletions

View file

@ -1,8 +0,0 @@
Sierpinski[n_] :=Nest[Flatten[Table[{{
#[[i, 1]], (#[[i, 1]] + #[[i, 2]])/2, (#[[i, 1]] + #[[i, 3]])/
2}, {(#[[i, 1]] + #[[i, 2]])/2, #[[i,
2]], (#[[i, 2]] + #[[i, 3]])/2}, {(#[[i, 1]] + #[[i, 3]])/
2, (#[[i, 2]] + #[[i, 3]])/2, #[[i, 3]]}}, {i, Length[#]}],
1] &, {{{0, 0}, {1/2, 1}, {1, 0}}}, n]
Show[Graphics[{Opacity[1], Black, Map[Polygon, Sierpinski[8], 1]}, AspectRatio -> 1]]

View file

@ -1,12 +0,0 @@
#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))))))
;; 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")