(load "stk-turtle-stuff") (cs) ;;;;;;;;;;;;;;;;Plotter (define (drawing-step position) (define temp-key (random (+ 1 (abs (last position))))) (penup) (setxy (* 5 (car position)) (* 5 (car (cdr position)))) (pendown) (forward (/ temp-key 60))) ;;;;;;;;;;;;;;;Picture ;;;;formula (define (rule x y) (define temper (+ (* (- x 3) (- x 3)) (* (- y 20) (- y 20)))) (* (+ (cond ((< y (* 10 (+ (* 3 (sin (/ x 10)) (sin (/ x 10)) (sin (/ x 5))) (/ x 5) (* x x 0.000571428571) (* x x x -0.000067))) ) (* 2 (+ x y 100))) ;;Mountain in distance (else (min temper 90))) ;;rising sun (cond ((< y (* 80 (exp (/ (* (- x 55) (- x 55)) -20)))) (- (* 11 x) y)) (else 0))) ;;Nearer mountain (cond ((and (< 43 y 48) (< 20 x 80) (< 2 (random 7))) 0) (else 1)) ;;Cloud )) ;;;;attribute value to each point (define (make-position-list x y) (cond ((not (= x y 40)) (cons (list x y (rule (+ x 30) (+ y 30))) (cond ((= y 40) (make-position-list (+ 1 x) -30)) (else (make-position-list x (+ 1 y)))))) (else (list )))) (define position-list (make-position-list -40 -30)) ;;;;;;;;;;;;;;;Draw (define (start-drawing) (map drawing-step position-list))