;;; Scheme Recursive Art Contest Entry
;;;
;;; Please do not include your name or personal info in this file.
;;;
;;; Title: A Smoky Day On Campus
;;;
;;; Description:
;;; *
(define (campanile)
(goto 0 -100)
(setheading 0)
(pendown)
(color "#f1dac5")
(begin_fill) (left 90) (forward 40) (right 93) (forward 300) (left 3) (forward 40) (right 25) (forward 58)
(right 130) (forward 58) (right 25) (forward 40) (left 3) (forward 300) (right 93) (forward 40) (end_fill) ;tower body
(color "black") (right 90) (penup) (forward 20) (dotted 7);center dotted line
(forward 30) (clock 14) (forward 40);center clock
(draw_rec) (left 90) (forward 11) (right 90) (draw_rec) (right 90) (forward 22) (left 90) (draw_rec);windows
(left 90) (forward 11) (right 90)
)
(define (dotted count)
(if (= count 0)
(penup)
(begin
(pendown) (forward 10) (penup) (forward 20) (dotted (- count 1))
)
)
)
(define (clock count)
(cond ((= count 0)(penup))
((= count 13) (begin (backward 2) (pendown) (forward 8) (penup) (backward 6) (clock (- count 1))))
((= count 10) (begin (backward 2) (pendown) (forward 12) (penup) (backward 10) (clock (- count 1)))())
(else
(begin (forward 15) (pendown) (forward 3) (penup) (left 180) (forward 18) (left 150) (clock (- count 1)));ticks of clock
)
)
)
(define (draw_rec)
(begin_fill) (left 90) (forward 4) (right 90) (forward 30) (right 90) (forward 8)
(right 90) (forward 30) (right 90) (forward 4) (right 90) (end_fill)
)
(define (draw_ppl count mult side)
(if (= count 0) (penup)
(begin (left side) (forward (* mult 10)) (begin_fill)
(forward (* mult 1)) ;bot
(right side) (forward (* mult 4)) ;leg
(left side) (forward (* mult 0.5)) ;fing
(right side) (forward (* mult 2.5)) ;arm
(right side) (forward (* mult 2)) ;top
(right side) (forward (* mult 2.5)) ;arm
(right side) (forward (* mult 0.5)) ; fing
(left side) (forward (* mult 4)) ; leg
(end_fill) (right side) (right side) (forward (* mult 7))
(begin_fill) (forward (* mult 0.5)) (left side) (forward (* mult 1)) (left side) (forward (* mult 0.5)) (left side) (forward (* mult 1)) (end_fill) ;head
(color "white") (begin_fill) (right side) (forward (* mult 0.5)) (right side) (forward (* mult 1)) (right side) (forward (* mult 0.5)) (right side) (forward (* mult 1)) (end_fill) (color "black") ;mask
(right side) (forward (* mult 7)) (right side) (forward (* mult 20)) (right side)
(color "#e7965f") (begin_fill) (draw_tree 4 mult side) (end_fill) (color "black") ;tree
(right side) (forward (* mult 30))
(left side)
(forward (* mult 2))
(draw_ppl (- count 1) (* mult 0.8) (- 360 side))
)
))
(define (draw_tree count mult side) ;draws a tree recursively and resetting the end to the starting point
(if (= count 0) (color "#e7965f")
(begin (left side) (forward (* 0.3 mult)) (right side)
(forward (* 6 mult)) (left 30) (draw_tree (- count 1) (* mult 0.65) side) (right 30)
(forward (* 2 mult)) (right side) (forward (* mult 0.6)) (right side)
(left 160) (draw_tree (- count 1) (* mult 0.65) side) (right 160)
(forward (* mult 4)) (left 155) (draw_tree (- count 1) (* mult 0.65) side) (right 155)
(forward (* mult 4)) (right side) (forward (* 0.3 mult)) (right side)
))
)
(define (swirle rad ext count)
(if (= count 0)
(penup)
(begin (circle rad ext) (if (> rad 30) (swirle (* rad 0.6) ext (- count 1)) (swirle (* rad 0.7) ext (- count 1))))
)
)
(define (smoke x y rad ext count side)
(if (= 0 count) (penup) (begin
(penup) (goto x y) (pendown)
(circle rad (* -1 (/ ext 2)))
(left 180)
(swirle rad ext 6)
(right (/ ext 2))
(smoke (+ x (* rad (* side 2.2))) (- y (* rad 1.2)) (* rad 1.5) ext (- count 1) side)))
)
(define (draw_smoke clr x y count)
(if (= count 0) (penup) (begin
(color clr) (setheading 0) (left 60)
(smoke (* -1 (+ x 20)) y 11 180 5 1)
(left 180)
(smoke (* -1 x) (- y 20) 11 -180 5 1)
(setheading 0) (right 60)
(smoke (+ x 20) y 11 180 5 -1)
(left 180)
(smoke (- x 10) (- y 10) 11 -180 5 -1)
(draw_smoke clr (+ x 1) (+ y 1) (- count 1))))
)
(define (draw)
(speed -10)
(bgcolor "#dad3cd")
(pendown)
(draw_smoke "#242424" 610 320 1)
(draw_smoke "#575757" 611 321 2)
(draw_smoke "#a3a3a3" 613 323 4)
(campanile)
(goto 0 -280)
(draw_ppl 6 20 90)
(hideturtle)
(exitonclick))
; Please leave this last line alone. You may add additional procedures above
; this line.
(draw)
*