;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: Starlight ;;; ;;; Description: ;;; Cityscape breathing, ;;; buildings and bridges trembling, ;;; under the night sky. (bgcolor "#76D2E8") ;;; (speed 1000) ;;; (define (draw) (draw_bg) (draw_stars 2 300) (draw_moon) (draw_city 2 -380 -15 "#2B2B2E") (draw_city 1 -330 -20 "#101120") (draw_bridge) (draw_ocean) (draw_line) (draw_reflections -230 -38 "#6C8CAD") (draw_reflections -380 -28 "#6C8CAD") (draw_reflections -330 -23 "#8CB3DB") (draw_lines_ocean) ) (define (draw_bridge) (draw_bridge_pole 170 -20 80 5 "#47474E") (draw_bridge_pole 200 -20 80 5 "#47474E") (draw_bridge_pole 260 -20 65 2 "#47474E") (draw_bridge_pole 280 -20 65 2 "#47474E") (draw_bridge_lowline "#47474E") (seth 0) (draw_wires "#47474E") (draw_hor 174.25 50 30 5 "#47474E") (draw_hor 264.1 40 20 4 "#47474E") (draw_ver 165 -20 2.5 "#47474E" 200 1.7) (draw_ver 240 -15 13 "#47474E" 280 1.2) (draw_ver 200 -12 73 "#47474E" 240 -1.2) ) (define (draw_bg) ;first (pu) (goto -345 270) (color "#71CADF") (pd) (begin_fill) (rt 90) (fd 700) (rt 90) (fd 100) (rt 90) (fd 700) (rt 90) (fd 100) (end_fill) ;second (pu) (goto -345 230) (color "#67B7D0") (pd) (begin_fill) (rt 90) (fd 700) (rt 90) (fd 50) (rt 90) (fd 700) (rt 90) (fd 50) (end_fill) ;third (pu) (goto -345 200) (color "#62B1CA") (pd) (begin_fill) (rt 90) (fd 700) (rt 90) (fd 50) (rt 90) (fd 700) (rt 90) (fd 50) (end_fill) ;fourth (pu) (goto -345 160) (color "#60A5C5") (pd) (begin_fill) (rt 90) (fd 700) (rt 90) (fd 50) (rt 90) (fd 700) (rt 90) (fd 50) (end_fill) ;fifth (pu) (goto -345 130) (color "#5B9FC1") (pd) (begin_fill) (rt 90) (fd 700) (rt 90) (fd 50) (rt 90) (fd 700) (rt 90) (fd 50) (end_fill) ;sixth (pu) (goto -345 100) (color "#5BA0C0") (pd) (begin_fill) (rt 90) (fd 700) (rt 90) (fd 100) (rt 90) (fd 700) (rt 90) (fd 100) (end_fill) ;seventh (pu) (goto -345 70) (color "#5395B4") (pd) (begin_fill) (rt 90) (fd 700) (rt 90) (fd 50) (rt 90) (fd 700) (rt 90) (fd 50) (end_fill) ;eighth (pu) (goto -345 50) (color "#4C81A9") (pd) (begin_fill) (rt 90) (fd 700) (rt 90) (fd 50) (rt 90) (fd 700) (rt 90) (fd 50) (end_fill) ;ninth (pu) (goto -345 30) (color "#467AA2") (pd) (begin_fill) (rt 90) (fd 700) (rt 90) (fd 50) (rt 90) (fd 700) (rt 90) (fd 50) (end_fill) ;cover3 (pu) (goto -345 100) (color "#6D97D7") (pd) (begin_fill) (rt 90) (fd 700) (rt 90) (fd 50) (rt 90) (fd 700) (rt 90) (fd 50) (end_fill) ;cover2 (pu) (goto -345 60) (color "#7A85C7") (pd) (begin_fill) (rt 90) (fd 700) (rt 90) (fd 50) (rt 90) (fd 700) (rt 90) (fd 50) (end_fill) ;cover1 (pu) (goto -345 30) (color "#8375B9") (pd) (begin_fill) (rt 90) (fd 700) (rt 90) (fd 50) (rt 90) (fd 700) (rt 90) (fd 50) (end_fill) ) (define (draw_line) ;line (pu) (seth 0) (goto -345 -20) (color "#A6FAFB") (pd) (begin_fill) (rt 90) (fd 700) (rt 90) (fd 2) (rt 90) (fd 700) (rt 90) (fd 2) (end_fill) ) (define (draw_moon) (pu) (goto 187 172.5) (pd) (color "#85ADE6") (circle 50) (pu) (goto 172.5 172.5) (pd) (begin_fill) (color "#7CB2E6") (circle 35) (end_fill) (pu) (goto 162 172.5) (pd) (begin_fill) (color "#5AC3EB") (circle 25) (end_fill) (pu) (goto 152 172.5) (color "#FCFCEC") (pd) (begin_fill) (circle 15) (end_fill) ) (define (draw_ocean) (pu) (seth 0) (goto -345 -23) (color "#0E142A") (pd) (begin_fill) (rt 90) (fd 700) (rt 90) (fd 700) (rt 90) (fd 700) (rt 90) (fd 700) (end_fill) (pu) ;first (goto -345 -23) (color "#798EB9") (begin_fill) (rt 90) (fd 700) (rt 90) (fd 15) (rt 90) (fd 700) (rt 90) (fd 15) (end_fill) (pu) ;second (color "#364570") (goto -345 -38) (pd) (begin_fill) (rt 90) (fd 700) (rt 90) (fd 25) (rt 90) (fd 700) (rt 90) (fd 25) (end_fill) (pu) ;third (goto -345 -63) (color "#212A4E") (pd) (begin_fill) (rt 90) (fd 700) (rt 90) (fd 40) (rt 90) (fd 700) (rt 90) (fd 40) (end_fill) (pu) ;fourth (goto -345 -103) (pd) (color "#141C3B") (begin_fill) (rt 90) (fd 700) (rt 90) (fd 50) (rt 90) (fd 700) (rt 90) (fd 50) (end_fill) (pu) ) (define (draw_city num x y col) (if (= num 0) (pu) (and (pu) (goto x y) (color col) (pd) (begin_fill) (fd 10) (rt 90) (fd 20) (lt 90) (fd 50) (rt 90) (fd 20) (lt 90) (fd 15) (rt 90) (fd 5) (lt 90) (fd 10) (rt 90) (fd 40) (rt 90) (fd 40) (lt 90) (fd 10) (lt 90) (fd 20) (rt 90) (fd 30) (rt 90) (fd 10) (lt 90) (fd 20) (lt 90) ;tower begin (fd 40) (rt 70) (fd 5) (lt 45) (fd 15) (rt 135) (fd 15) (lt 45) (fd 5) (rt 65) (fd 60) ;tower end (lt 90) (fd 3) (lt 90) (fd 10) (rt 90) (fd 5) (rt 90) (fd 2) (lt 90) (fd 20) (rt 90) (fd 10) ;building end (lt 90) (fd 10) (lt 90) (fd 70) (rt 90) (fd 15) (rt 90) (fd 40) (lt 90) (fd 3) (rt 90) (fd 20) (lt 90) (fd 2) (rt 90) (fd 5) (lt 90) (fd 0.5) (lt 90) (fd 7) (rt 90) (fd 15) (rt 90) (fd 10) (lt 90) (fd 2) (lt 90) (fd 15) (rt 90) (fd 20) (rt 90) (fd 10) (lt 90) (fd 5) (lt 90) (fd 10) (rt 90) (fd 15) (rt 90) (fd 15) (lt 90) (fd 2) (lt 90) (fd 10) (rt 90) (fd 15) (rt 90) (fd 5) (lt 90) (fd 3) (lt 90) (fd 5) (rt 90) (fd 4) (lt 90) (fd 5) (rt 90) (fd 2) (lt 90) (fd 50) (rt 90) (fd 10) (lt 90) (fd 15) (rt 90) (fd 20) (rt 90) (fd 15) (lt 90) (fd 3) (rt 90) (fd 15) (lt 90) (fd 1) (rt 90) (fd 60) (lt 90) (fd 80) (rt 90) (fd 10) (lt 90) (fd 40) (rt 90) (fd 40) (lt 180) (end_fill) (draw_city (- num 1) (+ x 150) (+ y 10) col)) ) ) (define (draw_bridge_pole x y height width col) (pu) (goto x y) (color col) (pd) (begin_fill) (fd height) (rt 90) (fd 2) (lt 90) (fd (/ height 20)) (rt 90) (fd width) (rt 90) (fd (/ height 20)) (lt 90) (fd 2) (rt 90) (fd height) (lt 180) (end_fill) (pu) ) (define (draw_bridge_lowline col) (pu) (goto 280 -20) (color col) (pd) (begin_fill) (rt -70) (circle 180 40) (lt 5) (circle 100 -10) (end_fill) ) (define (draw_wires col) (pu) ;first set (color col) (goto 160 -20) (pd) (rt 30) (fd 92) (bk 90) (pu) (lt 120) (fd 15) (pd) (rt 110) (fd 85) (pu) ;second set (goto 280 -20) (pd) (lt 33) (fd 70) (bk 73) (pu) (rt 120) (fd 10) (pd) (lt 113) (fd 70) (pu) ;connections (goto 206 59.67) (seth 0) (pd) (rt 150) (fd 70) (lt 120) (fd 50) (bk 50) (rt 150) (fd 10) (rt 180) (fd 10) (rt 45) (fd 60) (pu) ) (define (draw_ver x y height col lim slope) (if (>= x lim) (pu) (if (> slope 0) (and (color col) (seth 0) (goto x y) (pd) (fd height) (pu) (draw_ver (+ x 5) y (* height slope) col lim slope)) (and (color col) (seth 0) (goto x y) (pd) (fd height) (pu) (draw_ver (+ x 5) y (- height 7) col lim slope)) ) ) ) (define (draw_hor x y length width col) (if (<= y -20) (pu) (and (pu) (seth 0) (goto x y) (color col) (pd) (begin_fill) (fd width) (rt 90) (fd length) (rt 90) (fd width) (end_fill) (pu) (draw_hor x (- y 16) length width col)) ) ) (define (draw_reflections x y col) (seth 0) (color col) (pu) (goto x y) (seth 180) ;begin city (pd) (begin_fill) (fd 10) (lt 90) (fd 20) (rt 90) (fd 50) (lt 90) (fd 20) (rt 90) (fd 15) (lt 90) (fd 5) (rt 90) (fd 10) (lt 90) (fd 40) (lt 90) (fd 40) (rt 90) (fd 10) (rt 90) (fd 20) (lt 90) (fd 30) (lt 90) (fd 10) (rt 90) (fd 20) (rt 90) ;tower begin (fd 40) (lt 70) (fd 5) (rt 45) (fd 15) (lt 135) (fd 15) (rt 45) (fd 5) (lt 65) (fd 60) ;tower end (rt 90) (fd 3) (rt 90) (fd 10) (lt 90) (fd 5) (lt 90) (fd 2) (rt 90) (fd 20) (lt 90) (fd 10) ;building end (rt 90) (fd 10) (rt 90) (fd 70) (lt 90) (fd 15) (lt 90) (fd 40) (rt 90) (fd 3) (lt 90) (fd 20) (rt 90) (fd 2) (lt 90) (fd 5) (rt 90) (fd 0.5) (rt 90) (fd 7) (lt 90) (fd 15) (lt 90) (fd 10) (rt 90) (fd 2) (rt 90) (fd 15) (lt 90) (fd 20) (lt 90) (fd 10) (rt 90) (fd 5) (rt 90) (fd 10) (lt 90) (fd 15) (lt 90) (fd 15) (rt 90) (fd 2) (rt 90) (fd 10) (lt 90) (fd 15) (lt 90) (fd 5) (rt 90) (fd 3) (rt 90) (fd 5) (lt 90) (fd 4) (rt 90) (fd 5) (lt 90) (fd 2) (rt 90) (fd 50) (lt 90) (fd 10) (rt 90) (fd 15) (lt 90) (fd 20) (lt 90) (fd 15) (rt 90) (fd 3) (lt 90) (fd 15) (rt 90) (fd 1) (lt 90) (fd 60) (rt 90) (fd 80) (lt 90) (fd 10) (rt 90) (fd 40) (lt 90) (fd 14) (rt 180) (end_fill) (pu) ) (define (draw_stars size num) (define x (random_num 0 340)) (define y (random_num 150 370)) (if (= num 0) (pu) (and (pixelsize size) (pixel x y "#EAEAEA") (draw_stars size (- num 1))) ) ) ; Please leave this last line alone. You may add additional procedures above ; this line. (hideturtle) (draw)