;;; Your entry for the Scheme contest ;;; ;;; Title: ;;; Helix Rings ;;; ;;; Description: ;;; Not quite concentric? ;;; Tail-end recursion on arcs ;;; Form nested braid loops (define colors (list 'navy 'gray12 'gold 'navy)) (define (pickcolor n x) (if (= (modulo n 4) 0) (car x) (pickcolor (- n 1) (cdr x)))) (define n 0) (define (arc x y z a) (color (pickcolor n colors)) (set! n (+ n 1)) (if (> y 0) (begin (circle x z) (circle (- x) a) (arc x (- y 1) z a)) 0)) (define (drawcircles xc yc r n) (if (= n 0) 0 (begin (pu) (goto xc yc) (seth 0) (pd) (arc r 36 165 115) (drawcircles (/ xc 2) (/ yc 2) (/ r 2) (- n 1))))) ;(drawcircles 80 200 50 7) (speed 0) (drawcircles 130 200 50 7) ;squiggle (pu) (goto -250 -250) (seth 60) (color 'red) (pd) (circle -15 60) (circle 15 60) (ht) ;(exitonclick) ;wordcount 124