;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: Before and After Denero Explains ;;; ;;; Description: ;;; "There's absolutely ;;; no way!" Then Denero shows ;;; the way. "Oh okay..." (define (draw) (trace False) (bgcolor (rgb 0.5 0.5 0.5)) (changelinewidth 1.5) (penup) (forward 80) (pendown) (define (draw_box len) (define (draw_lines len n) (cond ((= 0 n) nil ) (else (forward len) (right 90) (draw_lines len (- n 1)) ) ) ) (draw_lines len 4) ) (define (draw_circle cen cur_box num_boxes radius c) (cond ((> cur_box 0) (define x (* radius (cos ( + (/ (pi) 2) (/ (* cur_box (* 2 (pi))) num_boxes))))) (define y (* radius (sin ( + (/ (pi) 2) (/ (* cur_box (* 2 (pi))) num_boxes))))) (penup) (setposition (+ cen x) y) (pendown) (define new_color (+ 0.4 (* c 0.3))) (draw_box 10) (color (rgb new_color new_color new_color)) (right (/ 360 num_boxes)) (draw_circle cen (- cur_box 1) num_boxes radius (* -1 c)) ) ) ) (define (draw_circles cen beg num dir) (cond ((< beg num) (setheading (* 8 dir)) (draw_circle cen (+ 18 (* beg 12)) (+ 18 (* beg 12)) (+ 40 (* beg 25)) 1) (draw_circles cen (+ 1 beg) num (* dir -1)) ) ) ) (define (draw_reg_circles num cen) (define (draw_reg_circle beg num radius) (cond ((< beg (+ 1 num)) (circle radius) (penup) (display cen) (setposition (- (+ cen radius) 35) 0) (pendown) (draw_reg_circle (+ beg 1) num (+ radius 25)) ) ) ) (draw_reg_circle 1 num 58) ) (penup) (setposition 234 0) (pendown) (changelinewidth 6) (color (rgb 1 1 1)) (draw_reg_circles 5 234) (changelinewidth 1.5) (color (rgb 0.1 0.1 0.1)) (draw_circles -175 0 5 1) (draw_circles 175 0 5 1) (setposition 175 0) (addshape 'denero.gif) (stamp) (exitonclick) ) (speed 10) ; Please leave this last line alone. You may add additional procedures above ; this line. (draw)