Cantor Assignment

From CSE425S Wiki
Revision as of 18:18, 1 February 2023 by Dennis.cosgrove (talk | contribs)
Jump to navigation Jump to search

Background

Cantor set

Code To Investigate

placement

shapes

Spacer

; fully transparent rectangle
(define (spacer-rect w h)
  (rectangle w h "outline" (color 0 0 0 0)))

; fully transparent image the size of img
(define (spacer-image img)
  (spacer-rect (image-width img) (image-height img)))

Code To Implement

file: src/main/racket/sierpinski_and_cantor/cantor.rkt Racket-logo.svg
functions: cantor-stool

Stool

(define (cantor-stool width height n)
  (raise 'not-yet-implemented #t))
Cantor-stool 0.svg Cantor-stool 1.svg Cantor-stool 2.svg Cantor-stool 3.svg Cantor-stool 4.svg
n=0 n=1 n=2 n=3 n=4


Note: you have been provided with a function which draws a red rectangle outlined in blue.

(define (brick w h)
 (overlay
  (rectangle w h "outline" "blue")
  (rectangle w h "solid" "red")
  )
 )