;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: Teik Tan ;;; ;;; Description: ;;; ... ;;; Let! the bridge be extraordinary; ;;; Let! it fly with your spirit. ;;; ... (define (draw) (bgcolor "#F7DC6F") (speed 10) (define (body x y dir dis limit xx yy) (if (= y limit) nil (begin (penup) (setposition x y) (pendown) (right dir) (forward dis) (body (+ x xx)(+ y yy) 0 dis limit xx yy)) ) ) (speed 10) (define x1 -240) (define x2 -220) (define y1 -90) (define y2 -100) (color "#F1948A") (body x1 y1 70 470 -80 0 1) (color "#C0392B") (body x1 y1 0 470 y2 1 -0.5) (color "#B03A2E") (body x2 y2 0 470 -90 0 1) (define (wings dir dir1 dis n limit) (cond ((= n limit) nil) (else (begin (right dir) (forward dis) (wings dir1 dir1 dis (+ n 1) limit))))) (begin_fill) (color "#D1F2EB") (penup) (goto -20 0.5) (pendown) (right -110) (forward 110) (wings 135 0.8 1 0 60) (wings -60 2 1 0 40) (wings -60 1.5 1 0 40) (goto -20 0.5) (right 271) (end_fill) (color "#943126") (define (tower x y d1 d2 s1 s2 s3 s4 limit xx yy) (if (= y limit) nil (begin (penup)(setposition x y)(pendown) (right d1) (forward s1) (right d2) (forward s2) (right (- d2 60)) (forward s3) (penup)(setposition (- x 17)(+ y 50))(pendown) (forward s4) (tower (+ x xx) (+ y yy) -180 d2 s1 s2 s3 s4 limit xx yy) ) ) ) (tower -120 -120 -70 -60 250 20 183 40 -119 0.05 0.5) (tower -119.5 -119.5 -180 -60 250 20 183 40 -118.5 0.05 0.5) (tower -119 -119 -180 -60 250 20 183 40 -118 0.05 0.5) (tower -121 -121 -180 -60 250 20 183 40 -119 0.05 0.5) (tower -120.5 -120.5 -180 -60 250 20 183 40 -118.5 0.05 0.5) (tower -120 -120 -180 -60 250 20 183 40 -118 0.05 0.5) (tower 125 -30 -180 -60 250 20 183 40 -28 0.05 0.5) (tower 124.5 -29.5 -180 -60 250 20 183 40 -27.5 0.05 0.5) (tower 124 -29 -180 -60 250 20 183 40 -27 0.05 0.5) (tower 126 -29 -180 -60 250 20 183 40 -27 0.05 0.5) (tower 125.5 -28.5 -180 -60 250 20 183 40 -26.5 0.05 0.5) (tower 124 -28 -180 -60 250 20 183 40 -26 0.05 0.5) (define (cable dir dis n mid total) (cond ((= n total) nil) ((= n mid) (right -50) (cable dir dis (+ n 1) mid total)) ((<= n mid) (begin (right dir) (forward dis) (cable -1.7 dis (+ n 1) mid total))) (else (begin (right dir) (forward dis) (cable -0.98 dis (+ n 1) mid total))))) (penup) (setposition -120 130) (pendown) (cable -10 5 0 40 94) (color "#C0392B") (right -180) (penup) (setposition -140 140) (pendown) (cable -10 5 0 40 94) (right -180) (penup) (setposition 125 220) (pendown) (cable -10 5 0 40 35) (right 62) (penup) (setposition 107 225) (pendown) (cable -10 5 0 40 25) (begin_fill) (color "#76D7C4") (penup) (goto 6 -11) (pendown) (right -90) (forward 120) (wings 90 2 1 0 50) (wings -45 2 1 0 40) (wings -45 2 1 0 25) (goto 6 -11) (end_fill) (define blues'("white" "white" "#D4E6F1" "#7FB3D5" "#2980B9" "#1F618D")) (define size '(100 100 100 70 55 45)) (define (bottom c s x y l) (cond ((= l 0) nil) (else (begin (begin_fill) (penup) (setposition x y) (pendown) (color c) (circle s) (end_fill) (bottom c s (+ x (* 2 s)) y (- l 1)))))) (bottom (car blues) (car size) -300 -196 7) (bottom (car (cdr blues)) (car (cdr size)) -300 -198 7) (bottom (car (cdr (cdr blues))) (car (cdr (cdr size))) -300 -200 7) (bottom (car (cdr (cdr (cdr blues)))) (car (cdr (cdr (cdr size)))) -300 -230 7) (bottom (car (cdr (cdr (cdr (cdr blues))))) (car (cdr (cdr (cdr (cdr size))))) -300 -245 7) (left 180) (color "#B03A2E") (penup) (goto -220 -80) (pendown) (cable -30 5 50 40 92) (right 70) (color "#C0392B") (penup) (goto -240 -70) (pendown) (cable -30 5 50 40 92) (hideturtle) (exitonclick)) ; Please leave this last line alone. You may add additional procedures above ; this line. (draw)