;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: circuLIT ;;; ;;; Description: ;;; You think its moving ;;; But you know that it is not ;;; You're an edgy teen (speed 0) (define (draw) ; YOUR CODE HERE (define (overall dwidth size) (bgcolor "black") (define angle (maindiagonal dwidth)) (define xpos (/ (- width) 2)) (define ypos (/ (- height) 2)) (jump xpos ypos) ;bottom (define lst1 (pos)) (define help1 (car lst1)) (define help2 (car (cdr lst1))) (bottomrow help1 help2 size angle "blue" "green") (dside1diagonal dwidth angle) (define lst1 (pos)) (define help1 (car lst1)) (define help2 (car (cdr lst1))) (bottomrow help1 help2 size angle "green" "blue") (dside2diagonal dwidth angle) (define lst1 (pos)) (define help1 (car lst1)) (define help2 (car (cdr lst1))) (bottomrow help1 help2 size angle "blue" "green") (dside3diagonal dwidth angle) (define lst1 (pos)) (define help1 (car lst1)) (define help2 (car (cdr lst1))) (bottomrow help1 help2 size angle "green" "blue") ;bottom (define xpos (/ (- width) 2)) (define ypos (+ (/ (- height) 2) 40)) (jump xpos ypos) ;top (define lst1 (pos)) (define help1 (car lst1)) (define help2 (car (cdr lst1))) (toprow help1 help2 size angle "blue" "green") (uside1diagonal dwidth angle) (define lst1 (pos)) (define help1 (car lst1)) (define help2 (car (cdr lst1))) (toprow help1 help2 size angle "green" "blue") (uside2diagonal dwidth angle) (define lst1 (pos)) (define help1 (car lst1)) (define help2 (car (cdr lst1))) (toprow help1 help2 size angle "blue" "green") (uside3diagonal dwidth angle) (define lst1 (pos)) (define help1 (car lst1)) (define help2 (car (cdr lst1))) (toprow help1 help2 size angle "green" "blue") ;top ) (overall 40 20) (exitonclick)) (define width (screen_width)) (define height (screen_height)) ;allows to move pen to specific coordinates without drawing (define (jump x y) (pu) (goto x y) (pd) ) (define (maindiagonal dwidth) (jump (/ (- width) 2)(/ (- height) 2)) (fill_color "red") (begin_fill) (goto (/ (- width) 2) (+ (/ (- height) 2) dwidth)) (goto (- (/ width 2) dwidth) (/ height 2)) (goto (/ width 2) (/ height 2)) (goto (/ (- width) 2) (/ (- height) 2)) (end_fill) (define angle (* (/ 180 3.1415) (atan (/ height width)))) (print (pos)) angle ) ;for 20 ;first diagonal below main diagonal (define (dside1diagonal dwidth angle) (jump (+ 155 dwidth (/ (- width) 2)) (/ (- height) 2)) (fill_color "red") (begin_fill) (goto (+ (/ (- width) 2) 155) (/ (- height) 2)) (seth angle) (fd 772) (seth 270) (fd dwidth) (goto (+ 155 dwidth (/ (- width) 2)) (/ (- height) 2)) (end_fill) ) ;first diagonal above main diagonal (define (uside1diagonal dwidth angle) (jump (/ (- width) 2) (+ (/ (- height) 2) 185 dwidth)) (fill_color "red") (begin_fill) (goto (/ (- width) 2) (+ (/ (- height) 2) 185)) (fd 772) (seth 180) (fd dwidth) (goto (/ (- width) 2) (+ (/ (- height) 2) 185 dwidth)) (end_fill) ) ;second diagonal below main diagonal (define (dside2diagonal dwidth angle) (jump (+ 345 dwidth (/ (- width) 2)) (/ (- height) 2)) (fill_color "red") (begin_fill) (goto (+ (/ (- width) 2) 345) (/ (- height) 2)) (seth angle) (fd 500) (seth 270) (fd dwidth) (goto (+ 345 dwidth (/ (- width) 2)) (/ (- height) 2)) (end_fill) ) ;second diagonal above main diagonal (define (uside2diagonal dwidth angle) (jump (/ (- width) 2) (+ (/ (- height) 2) 370 dwidth)) (fill_color "red") (begin_fill) (goto (/ (- width) 2) (+ (/ (- height) 2) 370)) (fd 500) (seth 180) (fd dwidth) (goto (/ (- width) 2) (+ (/ (- height) 2) 370 dwidth)) (end_fill) ) ;third diagonal below main diagonal (define (dside3diagonal dwidth angle) (jump (+ 535 dwidth (/ (- width) 2)) (/ (- height) 2)) (fill_color "red") (begin_fill) (goto (+ (/ (- width) 2) 535) (/ (- height) 2)) (seth angle) (fd 242) (seth 270) (fd dwidth) (goto (+ 535 dwidth (/ (- width) 2)) (/ (- height) 2)) (end_fill) ) ;third diagonal above main diagonal (define (uside3diagonal dwidth angle) (jump (/ (- width) 2) (+ (/ (- height) 2) 555 dwidth)) (fill_color "red") (begin_fill) (goto (/ (- width) 2) (+ (/ (- height) 2) 555)) (fd 500) (seth 180) (fd dwidth) (goto (/ (- width) 2) (+ (/ (- height) 2) 555 dwidth)) (end_fill) ) ;builds the general pattern below main diagonal (define (wholeshapedownwards size angle color1 color2 first) ;need to start with heading of 250 (seth (+ 210 angle)) ;Big shape (fill_color "white") (begin_fill) (circle size 120) (rt (- 30)) (define lst1 (pos)) (define x1 (car lst1)) (define y1 (car (cdr lst1))) (fd (+ size 5)) (rt (- 30)) (circle size 120) (define lst2 (pos)) (define x2 (car lst2)) (define y2 (car (cdr lst2))) (rt (- 30)) (fd (+ size 5)) (end_fill) ;Big shape ;Left Ellipse (fill_color color1) (begin_fill) (seth(+ 210 angle)) (circle size 120) (rt (- 60)) (circle size 120) (end_fill) ;Left Ellipse ;Right Ellipse (fill_color color2) (begin_fill) (jump x2 y2) (rt (- 60)) (circle size 120) (rt (- 60)) (circle size 120) (end_fill) ;Right Ellipse lst1 ) ;builds general pattern above maindiagonal (define (wholeshapeupwards size angle color1 color2 first) ;Big shape (define lst1 (pos)) (define xorg (car lst1)) (define yorg (car (cdr lst1))) (fill_color "white") (begin_fill) (seth (+ 30 angle)) (circle size 120) (define lst2 (pos)) (define x2 (car lst2)) (define y2 (car (cdr lst2))) (lt 30) (fd (+ size 5)) (lt 30) (circle size 120) (define lst3 (pos)) (define x1 (car lst3)) (define y1 (car (cdr lst3))) (lt 30) (fd (+ size 5)) (end_fill) ;Big shape ;Left Ellipse (fill_color color1) (begin_fill) (lt 30) (circle size 120) (lt 60) (circle size 120) (end_fill) ;Left Ellipse (jump x1 y1) ;Right Ellipse (fill_color color2) (begin_fill) (lt 60) (circle size 120) (lt 60) (circle size 120) (end_fill) ;Right Ellipse (jump xorg yorg) lst2 ) (define (drowofwholeshape xpos ypos size angle color1 color2 first) (if (or (> xpos (/ width 2)) (> ypos (/ height 2))) nil (if first (begin (define lst1 (wholeshapedownwards size angle color1 color2 first)) (define rowx (car lst1)) (define rowy (car (cdr lst1))) (seth angle) (pu) (fd (* (/ 5 4) size)) (pd) (define lst2 (pos)) (define xpos1 (car lst2)) (define ypos1 (car (cdr lst2))) (drowofwholeshape xpos1 ypos1 size angle color1 color2 False) lst1 ) (begin (wholeshapedownwards size angle color1 color2 first) (seth angle) (pu) (fd (* (/ 5 4) size)) (pd) (define lst2 (pos)) (define xpos1 (car lst2)) (define ypos1 (car (cdr lst2))) (drowofwholeshape xpos1 ypos1 size angle color1 color2 False) nil ) ) ) ) ;builds a row of the general pattern above main diagonal (define (urowofwholeshape xpos ypos size angle color1 color2 first) (if (or (> xpos (/ width 2)) (> ypos (/ height 2))) nil (if first (begin (define lst1 (wholeshapeupwards size angle color1 color2 first)) (define rowx (car lst1)) (define rowy (car (cdr lst1))) (seth angle) (pu) (fd (* 2.5 size)) (pd) (define lst2 (pos)) (define xpos1 (car lst2)) (define ypos1 (car (cdr lst2))) (urowofwholeshape xpos1 ypos1 size angle color1 color2 False) lst1 ) (begin (wholeshapeupwards size angle color1 color2 first) (seth angle) (pu) (fd (* 2.5 size)) (pd) (define lst2 (pos)) (define xpos1 (car lst2)) (define ypos1 (car (cdr lst2))) (urowofwholeshape xpos1 ypos1 size angle color1 color2 False) nil ) ) ) ) ;builds multiple (3) row of the general pattern below main diagonal (define (bottomrow xpos ypos size angle color1 color2) (define lst1 (drowofwholeshape xpos ypos size angle color1 color2 True)) (define rowx (car lst1)) (define rowy (car (cdr lst1))) (jump rowx rowy) (seth angle) (fd size) (define lst2 (pos)) (define help1 (car lst2)) (define help2 (car (cdr lst2))) (define lst3 (drowofwholeshape help1 help2 size angle color1 color2 True)) (define rowx (car lst3)) (define rowy (car (cdr lst3))) (jump rowx rowy) (seth angle) (fd size) (define lst2 (pos)) (define help1 (car lst2)) (define help2 (car (cdr lst2))) (drowofwholeshape help1 help2 size angle color1 color2 True) ) ;builds multiple (3) row of the general pattern above main diagonal (define (toprow xpos ypos size angle color1 color2) (define lst1 (urowofwholeshape xpos ypos size angle color1 color2 True)) (define rowx (car lst1)) (define rowy (car (cdr lst1))) (jump rowx rowy) (seth angle) (fd size) (define lst2 (pos)) (define help1 (car lst2)) (define help2 (car (cdr lst2))) (define lst3 (urowofwholeshape help1 help2 size angle color1 color2 True)) (define rowx (car lst3)) (define rowy (car (cdr lst3))) (jump rowx rowy) (seth angle) (fd size) (define lst2 (pos)) (define help1 (car lst2)) (define help2 (car (cdr lst2))) (urowofwholeshape help1 help2 size angle color1 color2 True) ) ; Please leave this last line alone. You may add additional procedures above ; this line. ;(urowofwholeshape 0 0 20 0 "green" "blue" False) ;(define angle (maindiagonal 40)) ;(define xpos (/ (- width) 2)) ;(define ypos (/ (- height) 2)) ;(jump xpos ypos) ;(define lst1 (pos)) ;(define help1 (car lst1)) ;(define help2 (car (cdr lst1))) ;(print help1) ;(print help2) ;(toprow 0 0 20 43 "blue" "green") (draw)