(define hrep (string->list "0123456789ABCDEF")) (define (getindex lst i) (if (= i 0) (car lst) (getindex (cdr lst) (- i 1)))) (define (dectohex n) (list->string (list (getindex hrep (/ (- n (modulo n 16)) 16)) (getindex hrep (modulo n 16))))) (define (randbetween x y) (+ (random (+ (- y x) 1)) x)) ;;; 51 words (define (gencolor lst) (string-append "#" (dectohex (first lst)) (dectohex (second lst)) (dectohex (third lst)))) ;;; 64 words (13) (define (star size) (pd) (define half_size (floor (/ size 2))) (color "#ffffff") (begin_fill) (repeat 4 (forward size) (right 90)) (end_fill) (pu) (setheading 90) (forward half_size) (setheading 0) (color "#000000") (begin_fill) (circle half_size) (end_fill) (setheading 90) (forward size) (setheading 0) (color "#000000") (begin_fill) (circle half_size) (end_fill) (forward size) (setheading 0) (color "#000000") (begin_fill) (circle half_size) (end_fill) (setheading 270) (forward size) (setheading 0) (color "#000000") (begin_fill) (circle half_size) (end_fill)) ;;; 130 (66) (define (calc_color f s p) (gencolor (list (+ (first f) (floor (* (- (first s) (first f)) p))) (+ (second f) (floor (* (- (second s) (second f)) p))) (+ (third f) (floor (* (- (third s) (third f)) p)))))) (define (grad_circle r sc ec i s m) (if (= m 1) (begin (pu) (right 90) (forward r) (left 90) (pd) (color (gencolor sc)) (begin_fill) (circle r) (end_fill) (left 90) (forward 1) (right 90) (grad_circle r sc ec (+ i 1) s 0)) (if (= m 0) (if (or (= r i) (>= i s)) (pu) (begin (define diff (if (= s 99999) (/ i r) (/ i s))) (color (calc_color sc ec diff)) (begin_fill) (circle (- r i)) (end_fill) (left 90) (forward 1) (right 90) (grad_circle r sc ec (+ i 1) s 0))) (pu)))) ;;; 252 words (122) (pu) (setxy -300 300) (setheading 180) (color "#000000") (begin_fill) (pd) (repeat 4 (forward 600) (left 90)) (end_fill) (pu) (setxy 0 0) (setheading 0) (repeat (randbetween 30 60) (setxy (randbetween -300 300) (randbetween -300 300)) (pd) (star (randbetween 10 12)) (pu)) ;;; 275 words (23) (define rad_glow (randbetween 15 25)) (define rad (randbetween 90 120)) (setxy (randbetween -140 140) 180) (grad_circle (+ rad rad_glow) '(0 0 0) '(244 216 28) 0 rad_glow 1) (grad_circle rad '(244 216 28) '(255 255 255) 0 99999 0) ;;; 319 words (44) (define rad (randbetween 20 45)) (setxy (randbetween -160 160) 102) (grad_circle rad '(123 194 255) '(0 138 255) 0 5 1) (grad_circle (- rad 5) '(0 138 255) '(0 88 163) 0 (/ rad 2) 0) ;;; 362 words (43) (define rad (randbetween 35 60)) (setxy (randbetween -160 160) 52) (grad_circle rad '(208 128 255) '(185 64 255) 0 5 1) (grad_circle (- rad 5) '(185 64 255) '(161 0 255) 0 (/ rad 2) 0) ;;; 405 words (43) (define rad (randbetween 55 75)) (setxy (randbetween -150 150) -17) (grad_circle rad '(71 189 116) '(11 140 61) 0 5 1) (grad_circle (- rad 5) '(11 140 61) '(0 102 39) 0 (/ rad 2) 0) ;;; 448 words (43) (define rad (randbetween 80 100)) (setxy (randbetween -140 140) -97) (grad_circle rad '(255 59 59) '(204 16 16) 0 5 1) (grad_circle (- rad 5) '(204 16 16) '(76 0 0) 0 (/ rad 2) 0) ;;; 491 words (43)