;;; Title: Snowman ;;; ;;; Description: ;;; winter time is here, ;;; celebrate your cheer with snow ;;; make a snowman, yo! ;########################################### ;# Draw left eye # ;########################################### (define (draw-left-eye) (penup) (fd 100) (lt 90) (fd 10) (lt 90) (fd 5) (pendown) (circile 5) ) ;######################################### ; Draw right eye # ;######################################### (define (draw-right-eye) (penup) (rt 90) (fd 40) (pendown) (circle 5) (penup) (rt 180) (fd 100) (pendown) (circle 5) ) ;#################################### ;# Draw multi-layer hat # ;#################################### (define (draw-hat) (penup) (rt 270) (fd 50) (pendown) (lt 90) (fd 100) (rt 90) (fd 5) (rt 90) (fd 100) (lt 90) (fd 5) (lt 90) (fd 100) (rt 90) (fd 5) (rt 90) (fd 100) (lt 90) (fd 5) (lt 90) (fd 100) (rt 90) (fd 5) (rt 90) (fd 100) (penup) (lt 90) (fd 5) (lt 90) (fd 20) (pendown) (fd 60) (penup) (fd 20) (rt 90) (fd 5) (rt 90) (fd 20) (pendown) (fd 60) (penup) (lt 90) (fd 5) (lt 90) (pendown) (fd 60) (penup) (rt 90) (fd 5) (rt 90) (pendown) (fd 60) (penup) (lt 90) (fd 5) (lt 90) (pendown) (fd 60) (penup) (rt 90) (fd 5) (rt 90) (pendown) (fd 60) (penup) (lt 90) (fd 5) (lt 90) (pendown) (fd 60) (penup) (rt 90) (fd 5) (rt 90) (pendown) (fd 60) (penup) (lt 90) (fd 5) (lt 90) (pendown) (fd 60) (penup) (rt 90) (fd 5) (rt 90) (pendown) (fd 60) (penup) (lt 90) (fd 5) (lt 90) (fd 20) (pendown) (fd 20) (penup) (rt 90) (fd 5) (rt 90) (pendown) (fd 20) (penup) (lt 90) (fd 5) (lt 90) (pendown) (fd 20) (penup) (rt 90) (fd 5) (rt 90) (pendown) (fd 20) (penup) (lt 90) (fd 5) (lt 90) (pendown) (fd 20) (penup) (rt 90) (fd 5) (rt 90) (pendown) (fd 20) (penup) (lt 90) (fd 5) (lt 90) (pendown) (fd 20) (penup) (rt 90) (fd 5) (rt 90) (pendown) (fd 20) (penup) (lt 90) (fd 5) (lt 90) (fd 5) (pendown) (fd 10) (penup) (rt 90) (fd 5) (rt 90) (pendown) (fd 10) (penup) (lt 90) (fd 5) (lt 90) (pendown) (fd 10) (penup) (rt 90) (fd 5) (rt 90) (pendown) (fd 10) (penup) (lt 90) (fd 5) (lt 90) (pendown) (fd 10) (penup) (rt 90) (fd 5) (rt 90) (pendown) (fd 10) (penup) ) (define (draw-tree r) (if (< r 5) (begin (fd r) (bk r)) (begin (pendown) (fd (/ r 3)) (lt 30) (draw-tree (* (/ r 3) 2)) (rt 30) (bk (/ r 3)) (fd (/ r 2)) (rt 25) (draw-tree (/ r 2)) (lt 25) (bk (/ r 2)) (fd (* (/ 5 6) r)) (rt 25) (draw-tree (/ r 2)) (lt 25) (bk (* r (/ 5 6))) (penup)))) ;############################# ; Draw scarf and body # ;############################# (define (draw-body) (pendown) (penup) (rt 265) (pendown) (circle 150) (rt 180) (fd 30) (circle 80) (rt 270) ) ;############################################ ;# Draw snowman body, eyse, hat, and a tree # ;############################################# (draw-body) (draw-left-eye) (draw-right-eye) (draw-hat) (lt 90) (draw-tree 80) ;################### ;# draw nose # ;################### (penup) (rt 180) (fd 210) (rt 90) (fd 15) (lt 90) (pendown) (lt 90) (fd 30) (rt 135) (fd 30) (rt 118) (fd 25) (penup) (lt 90) (fd 200) (exitonclick) )