;; Sch;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: The Spread of the Bacteria ;;; ;;; Description: ;;; Our body fights; ;;; it fights away the green enemy ;;; red cells fighting, may our health prevail! (define dark-red (rgb 1 .1 0)) (define (repeat function count) (cond ((= count 1) (function)) (else (function) (repeat function (- count 1))) ) ) (define (spiral current max_size curr_side turn r_start g_start b_start scale r_grad g_grad b_grad) (cond ((or (> current max_size) (> r_start 1) (> g_start 1) (> b_start 1))) (else (define (boundry) (fd current) (rt (- 270 (/ (* 270 (- curr_side 4)) curr_side)))) (define (shape) (repeat boundry curr_side)) (define (turn_square) (shape) (rt turn)) (color (rgb r_start g_start b_start)) (repeat turn_square (/ 360 turn)) (spiral (* scale current) max_size curr_side turn (+ r_start r_grad) (+ g_start g_grad) (+ b_start b_grad) scale r_grad g_grad b_grad) ) ) ) (define (draw) ; (ellipse 5 2 0 45) (bgcolor dark-red) (speed 100000000) (spiral 25 40 14 20 0 0 0 1.1 0 0.2 0) ; Green (penup) (rt 60) (fd 150) (lt 60) (pendown) (spiral 25 40 7 40 0 0 0 1.1 0.2 0 0) ; Orange (penup) (lt 60) (fd 300) (rt 90) (fd 300) (pendown) (spiral 25 40 7 40 0 0 0 1.1 0.2 0 0) ; Red (penup) (goto 0 0) (rt 120) (fd 300) (pendown) (spiral 25 40 7 40 0 0 0 1.1 0.2 0 0) ; Red (penup) (goto 0 0) (bk 300) (pendown) (spiral 25 40 7 40 0 0 0 1.1 0.1 0 0.2) ; Indigo (penup) (goto 0 0) (rt 60) (fd 300) (pendown) (spiral 25 40 7 40 0 0 0 1.1 0.2 0 0.2) ; violet (penup) (goto 0 0) (lt 120) (bk 300) (pendown) (spiral 25 40 7 40 0 0 0 1.1 0.2 0 0) ; Red (penup) (goto 0 0) (pendown) (exitonclick)) ; Please leave this last line alone. You may add additional procedures above ; this line. (draw)