;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: ;;; ;;; Description: ;;; going forever: ;;; an endless mise en abyme, ;;; It keeps going and (define glob-len .9) (define depth 11) (define (liftpen-1 fn n) (penup)(fn n)(pendown)) (define (liftpen-2 fn m n) (penup)(fn m n)(pendown)) (define (big-hex h c) (define (hextrude i len x y c) (define (hex j) (cond ((zero? j)) (else (cube 3 len c) (rt (* 60 (- 6 j))) (liftpen-1 fd (* len 2)) (seth 0) (hex (- j 1)))) ) (cond ((zero? i)) (else (seth 0) (liftpen-2 goto (- x (* len (sqrt 3))) (- y len)) (hex 6) (liftpen-2 goto x y) (hextrude (- i 1) (* len 1.5) x y (+ (/ 5 255) c)))) ) (cond ((zero? h)) (else (hextrude depth glob-len (xcor) (ycor) c) (rt (* 60 (- 6 h))) (liftpen-1 fd (* glob-len (/ 8 3) (expt 1.5 depth))) (seth 0) (big-hex (- h 1) (+ (/ 36 255) c)))) ) (define (cube k len c) (define (face l) (cond ((zero? l)) (else (if (zero? (modulo l 2)) (lt 60) (lt 120)) (fd len) (face (- l 1)))) ) (cond ((zero? k)) (else (cond ((= 3 k) (color (rgb (- 1 c) 1 c))) ; top-color ((= 2 k) (color (rgb c (- 1 c) 1))) ; left-color (else (color (rgb 1 c (- 1 c))))) ; right-color (rt 60) (liftpen-1 fd len) (begin_fill)(face 3)(end_fill) (cube (- k 1) len c))) ) (define (draw) (liftpen-2 goto (- 230) (- 109)) (big-hex 6 0) (rt 120) (liftpen-1 fd (* glob-len (/ 8 6) (expt 1.5 depth))) ; (liftpen-1 fd (* glob-len (/ 8 6) (expt 1.5 depth))) (seth 0) (cube 3 (* (expt 1.5 (- depth 1)) glob-len) (/ (* 5 (- depth 1)) 255)) ; (cube 3 (* (expt 1.5 (- depth 1)) glob-len) (/ (* 10 (- depth 1)) 255) (hideturtle) ) ; Please leave this last line alone. You may add additional procedures above ; this line. (draw)