;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: the Black Hole ;;; ;;; Description: ;;; I wonder ;;; What inside the black hole ;;; past future or another world (define (draw) (speed 0) (windmill MAX_R) (radiation) (rings MAX_R2) (exitonclick)) (define MIN_R 180) (define MIN_R2 10) (define MAX_R 200) (define MAX_R2 400) (define STEP 20) (define STEP2 5) (define (repeat n func) ; Repeat func k times. (if (> n 0) (begin (func) (repeat (- n 1) func) ) ) ) (define (windmill r) (if (or (>= r MIN_R) (>= (- r) MIN_R)) (begin (repeat 45 (lambda () (pendown)(circle r 180) (penup) (circle r 180) (rt 8) ) ) (if (> r 0) (windmill (* (- r STEP) -1)) (windmill (* (+ r STEP) -1)) ) ) ) ) (define (radiation) (pendown) (repeat 120 (lambda () (pendown) (fd (* 2 MAX_R)) (bk (* 2 MAX_R)) (rt 3) ) ) ) (define (rings r) (if (>= r MIN_R2) (begin (goto r 0) (pendown) (circle r) (rings (- r STEP2)) ) ) ) ; Please leave this last line alone. You may add additional procedures above ; this line. All Scheme tokens in this file (including the one below) count ; toward the token limit. (draw)