sketch experiment 2 - affine transformation

Nikolaus Gradwohl2020-10-07T02:27:50+00:00

I continued my exploration of lisp-country with sketch and made a sketch experimenting with loops and affine transformations.

rotation

that's the sketch that generates the image.

(make-instance 'blub ) (defsketch blub () (background (rgb 1 1 1)) (dotimes (i 200) (with-pen (make-pen :stroke (rgb 0 0 0 0.2 )) (push-matrix) (translate ( i 2) ( i 2)) (rotate (/ (* i 360) 200)) (setf f (/ i 2)) (rect (- (/ f 2)) (- (/ f 2)) f f ) (pop-matrix ) ) ) )

The documentation is a bit thin at the moment - but the sourcecode is quite readable, and there are some example programs I used as a starting point to figure out how to use it.

Tweet This! submit to reddit Digg! Tags: | no comments | no trackbacks

See also:

sketch experiment 8 - circles animated
sketch experiment 7 - osc events
sketch experiment 6 - color
sketch experiment 5 - grid
sketch experiment 3 - animation

Trackbacks

Comments

Leave a response

Leave a comment