;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: TLOP ;;; ;;; Description: ; The Life of Pablo ; Vote Yes and We’ll love you like ; Kanye loves Kanye (define (square x) (* x x)) (define (change_color fraction) (cond ((> fraction 270) (color "red")) ((> fraction 220) (color "orange")) ((> fraction 170) (color "yellow")) ((> fraction 120) (color "green")) ((> fraction 80) (color "blue")) ((> fraction 40) (color "purple")) (else (color "violet")) ) ) (define (finish) (pendown) (fd 10) (lt 90) (fd 310) (penup) (bk 310) (rt 90) (bk 310) ) (define (lines length fraction) (pendown) (change_color fraction) (fd 10) (lt (* (atan (/ fraction length)) 57.2958)) (fd (sqrt (+ (square length) (square fraction)))) (penup) (bk (sqrt (+ (square length) (square fraction )))) (rt (* (atan (/ fraction length)) 57.2958)) (if (= fraction 300) (finish) (lines (- length 10) (+ fraction 10)) )) (define (repeat k fn) (if (> k 0) (begin (fn) (repeat (- k 1) fn)) 'done)) (define (draw) (lines 300 10) (fd 310) (rt 30) (fd 310) (rt 180) ) (define (edge) (rt 90) (fd 310) (lt 90) (fd 310) (lines 300 10) (lt 90) ) (bgcolor "#0d0c04") (penup) (goto 0 -310) (speed 0) (repeat 12 draw) (repeat 4 edge) (hideturtle) ; Please leave this last line alone. You may add additional procedures above ; this line. All Scheme tokens in this file (including the one below) count ; toward the token limit.