Difference between revisions of "Snowflake Assignment"

From CSE425S Wiki
Jump to navigation Jump to search
Line 17: Line 17:
  
 
=Snowflake=
 
=Snowflake=
 +
(define (snowflake len iter is-flipped)
 +
  (raise (error 'not-yet-implemented)))))
 +
 +
(define (snowflake-symmetric len iter)
 +
  (snowflake len iter #f))
 +
 +
(define (snowflake-flipped len iter)
 +
  (snowflake len iter #t))
 +
 
==Symmetric==
 
==Symmetric==
[https://en.wikipedia.org/wiki/Sierpi%C5%84ski_triangle Sierpiński Triangle]
 
 
 
  <nowiki>(define (sierpinski-triangle side-length n)
 
  <nowiki>(define (sierpinski-triangle side-length n)
 
   (raise 'not-yet-implemented #t))</nowiki>
 
   (raise 'not-yet-implemented #t))</nowiki>
Line 38: Line 45:
  
 
==Flipped==
 
==Flipped==
<nowiki>(define (sierpinski-carpet side-length n)
 
  (raise 'not-yet-implemented #t))</nowiki>
 
 
{| class="wikitable" style="text-align: center; "
 
{| class="wikitable" style="text-align: center; "
 
|[[File:Snowflake-flipped_0.svg|200px]]
 
|[[File:Snowflake-flipped_0.svg|200px]]

Revision as of 12:04, 9 July 2019

Lindenmayer system

Dragon trees.jpg

Racket Image Library

Racket Image Library Documentation

placement

beside
above
overlay overlay/align
rotate

shapes

triangle
circle
square
rectangle
frame

Snowflake

(define (snowflake len iter is-flipped)

 (raise (error 'not-yet-implemented)))))

(define (snowflake-symmetric len iter)

 (snowflake len iter #f))

(define (snowflake-flipped len iter)

 (snowflake len iter #t))

Symmetric

(define (sierpinski-triangle side-length n)
  (raise 'not-yet-implemented #t))
Snowflake-symmetric 0.svg Snowflake-symmetric 1.svg Snowflake-symmetric 2.svg Snowflake-symmetric 3.svg Snowflake-symmetric 4.svg
n=0 n=1 n=2 n=3 n=4

Flipped

Snowflake-flipped 0.svg Snowflake-flipped 1.svg Snowflake-flipped 2.svg Snowflake-flipped 3.svg Snowflake-flipped 4.svg
n=0 n=1 n=2 n=3 n=4

Branch

(define (branch length iter)
  (raise 'not-yet-implemented #t))
Branch 0.svg Branch 1.svg Branch 2.svg Branch 3.svg Branch 4.svg Branch 5.svg Branch 6.svg Branch 7.svg
iter=0 iter=1 iter=2 iter=3 iter=4 iter=5 iter=6 iter=7