;;; READ FIRST: ;;; Image below constructs a 128X128 image. ;;; To scale higher, change the 128 in lines ;;; 19, 23, 32, and 54 to the desired number. ;;; In the case that the lines are different, ;;; just change every 128 you find. ;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: ;;; ;;; Description: ;;; (define SIZE 128) (define RAD (/ SIZE 4)) (define POINTS ()) (define COLORS ()) (setup 128 128) (define (draw) (generate_points_colors 0 0) (exitonclick) ) (define (generate_points_colors r i) (if (= r 128) (hideturtle) (generate_points_colors_outer r i) ) ) ; (define (create points colors) ; (if (null? points) ; (penup) ; (begin ; (penup) ; (color_test (color_rgb (car colors) (car (cdr colors)) (car (cdr (cdr colors))))) ; (setx (car points)) ; (sety (car (cdr points))) ; (pendown) ; (dot 1) ; (create (cdr (cdr points)) (cdr (cdr (cdr colors)))) ; ) ; ) ; ) (define (generate_points_colors_outer r i) (if (= i 128) (generate_points_colors (+ r 1) 0) (begin (define c (complex (- (/ r RAD) 2) (- (/ i RAD) 2) )) (define z c) (define (generate_points_colors_inner x q) (if (= 10 x) q (begin (define mul (complex_mul (abs (imag q)))) (define add (complex_add (abs (real q)) mul)) (define pow (complex_pow add 2.45)) (define the_log (log (complex_add pow 0.01))) (generate_points_colors_inner (+ x 1) the_log) ) ) ) (begin (define z_copy (generate_points_colors_inner 0 z)) (define z_prime (abs (tanh (absolute z_copy)))) (define z_prime1 (* (abs (sin (* (angle z_copy) 2.0))) z_prime)) (define z_prime2 (* (abs (sin (* (angle z_copy) 3.0))) z_prime)) (define z_prime3 (* (abs (sin (* (angle z_copy) 5.0))) z_prime)) (penup) (color_test (color_rgb (int (* z_prime1 256.0)) (int (* z_prime2 256.0)) (int (* z_prime3 256.0)))) (setx r) (sety i) (pendown) (dot 1) (generate_points_colors_outer r (+ i 1)) ; (generate_points_colors_outer r (+ i 1) (append points (list r i)) (append colors (list (int (* z_prime1 256.0)) ; (int (* z_prime2 256.0)) (int (* z_prime3 256.0)) ))) ) ) ) ) ; Please leave this last line alone. You may add additional procedures above ; this line. (draw)