Difference between revisions of "Snowflake Assignment"
Jump to navigation
Jump to search
Line 17: | Line 17: | ||
: [https://docs.racket-lang.org/teachpack/2htdpimage.html#%28def._%28%28lib._2htdp%2Fimage..rkt%29._empty-image%29%29 empty-image] | : [https://docs.racket-lang.org/teachpack/2htdpimage.html#%28def._%28%28lib._2htdp%2Fimage..rkt%29._empty-image%29%29 empty-image] | ||
− | =Snowflake= | + | =Code to Implement= |
+ | ==Snowflake== | ||
<nowiki>(define (snowflake len iter is-flipped) | <nowiki>(define (snowflake len iter is-flipped) | ||
(raise (error 'not-yet-implemented))))) | (raise (error 'not-yet-implemented))))) | ||
Line 27: | Line 28: | ||
(snowflake len iter #t))</nowiki> | (snowflake len iter #t))</nowiki> | ||
− | ==Symmetric== | + | ===Symmetric=== |
<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 45: | Line 46: | ||
|} | |} | ||
− | ==Flipped== | + | ===Flipped=== |
{| class="wikitable" style="text-align: center; " | {| class="wikitable" style="text-align: center; " | ||
− | |[[File:Snowflake-flipped_0.svg|200px]] | + | |<hr>[[File:Snowflake-flipped_0.svg|200px]] |
|[[File:Snowflake-flipped_1.svg|200px]] | |[[File:Snowflake-flipped_1.svg|200px]] | ||
|[[File:Snowflake-flipped_2.svg|200px]] | |[[File:Snowflake-flipped_2.svg|200px]] | ||
Line 60: | Line 61: | ||
|} | |} | ||
− | =Branch= | + | ==Branch== |
<nowiki>(define (branch length iter) | <nowiki>(define (branch length iter) | ||
(raise 'not-yet-implemented #t))</nowiki> | (raise 'not-yet-implemented #t))</nowiki> | ||
{| class="wikitable" style="text-align: center; " | {| class="wikitable" style="text-align: center; " | ||
− | |[[File:Branch_0.svg|200px]] | + | |<hr>[[File:Branch_0.svg|200px]] |
|[[File:Branch_1.svg|200px]] | |[[File:Branch_1.svg|200px]] | ||
|[[File:Branch_2.svg|200px]] | |[[File:Branch_2.svg|200px]] |
Revision as of 12:24, 9 July 2019
Contents
Racket Image Library
Racket Image Library Documentation
placement
line
empty-image
Code to Implement
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))
n=0 | n=1 | n=2 | n=3 | n=4 |
Flipped
n=0 | n=1 | n=2 | n=3 | n=4 |
Branch
(define (branch length iter) (raise 'not-yet-implemented #t))
iter=0 | iter=1 | iter=2 | iter=3 | iter=4 | iter=5 | iter=6 | iter=7 |