;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: (Unbalanced ;;; ;;; Description: ;;; ((((((((( ;;; )))))))) ;;; Error: unexpected end of file. (define (draw-parenthesis dir x y col size thickness) (if (> thickness 0) (begin (penup) (setheading 90) (setposition x y) (pendown) (color col) (circle size (if dir -180 180)) (draw-parenthesis dir (+ x 1) y col size (- thickness 1))))) (define (get lst index) (if (= index 0) (car lst) (get (cdr lst) (- index 1)))) (define step (/ (screen_width) 80)) (define (transformX x) (+ (/ (screen_width) -2) (* step (+ x 1))))) (define (transformY y) (- (/ (screen_height) 2) (* step (+ y 1))))) (define (draw-all-parenthesis) (define dirs '(#t #t #f #t #t #f #t #f #t #t #f #t #t #t #f #t #f #f #f #f #f)) (define posX '(11 19 32 13 17 25 30 31 15 21 25 30 41 49 52 57 63 64 65 66 67)) (define posY '(35 35 35 40 40 40 40 40 45 45 45 45 45 45 45 45 45 45 45 45 45)) (define colors '("#F92672" "#FD971F" "#A6E22E" "#66D9EF" "#006DC4" "#3F516F")) (define (draw-all-parenthesis-helper depth dirs posX posY) (if (not (null? dirs)) (begin (draw-parenthesis (car dirs) (transformX (car posX)) (transformY (car posY)) (get colors (- depth (if (car dirs) 0 1))) 10 3) (draw-all-parenthesis-helper ((if (car dirs) + -) depth 1) (cdr dirs) (cdr posX) (cdr posY))))) (draw-all-parenthesis-helper 0 dirs posX posY)) (define (draw) (bgcolor "#282A36") (speed 0) (draw-all-parenthesis) (hideturtle) (exitonclick)) ; Please leave this last line alone. You may add additional procedures above ; this line. (draw)