sketch experiment 8 - circles animated

Nikolaus Gradwohl2020-10-14T02:19:13+00:00

for this sketch experiment I animated the circles i create in experiment 3

experiment nr 8

(make-instance 'blub )
(defsketch blub ((title "circles anim") (p 0))
  (background (rgb 1 1 1 ))
  (incf p 0.1)
  (translate 200 50)
  (dotimes (i 720)
    (with-pen (make-pen :stroke (rgb 0 0 0 0.1 ))
      (push-matrix)

      (setf f (+ p  (* (sin (* 6.28 (/ i 720)) ) (+ 0 (* 100 (cos (/ i 72.3)))))))
      (circle (* 100 (sin (* 3.14 (/ i 180)))) (/ i 2.7) f)
      (pop-matrix )
      )
    )
  )
read more ...

beanie sewing

Nikolaus Gradwohl2020-10-12T16:53:47+00:00

since sewing masks already works pretty well, I tried to make something a little bit more challenging so here is "beanie sewing test - iteration 1"

hmmm - i think i will need some more before I'm done

beanie v1

read more ...

sketch experiment 7 - osc events

Nikolaus Gradwohl2020-10-11T16:46:19+00:00

for my latest sketch experiment I implemented a osc event receiver that changes the size of a bouncing rectangle. The osc events are sent by a processing sketch.

experiment nr 7

read more ...

sketch experiment 6 - color

Nikolaus Gradwohl2020-10-10T16:11:23+00:00

For my next sketch experiment I played with the hsb command to create animated colors

experiment no 6

What is a litte bit wired in sketch is how the sketch width and height affect the window size - i originally planned to resize the window to fit 11 circles each 40 pixel in diameter - but the only windowsize where the drawing area is centered seems to be 400 - not yet sure why - i will try to dig into the sourcecode of the sketch macro and figure out what happens here

here is the source code of my experiment

(defsketch blub ( 
  (title "sketch ex6")
  (width 400) 
  (height 400)

  (f 0)
  (p 0) 
  (w (/ 400 11))
)
  (incf f 0.01)
  (background (rgb .9 .9 .9))

  (dotimes (i 11) 
   (dotimes (j 11 )
     (setf dx (- 5 i))
     (setf dy (- 5 j)) 
     (if (> f 1) (setf f (- f 1)))

     (setf p (+ f (* .1 (sqrt (+ (* dx dx) (* dy dy))))))
     (if (> p 1) (setf p (ffloor p)))

     (push-matrix) 
     (translate (+ (/ w 2) (* i w)) (+ 20 (* j w)))
       (with-pen (make-pen :fill (hsb p 1 1))
         (ellipse 0 0 (- (/ w 2) 2) (- (/ w 2) 2) ))
     (pop-matrix)
   )
  )
)
read more ...

sketch experiment 5 - grid

Nikolaus Gradwohl2020-10-09T14:28:15+00:00

For my next sketch experiment I placed some rectangles on a grid and rotated them but delayed the rotation by the distance of the center.

experiment no 5

this is the code I used to create the sketch - I probably should have transofrmed the distance calculation into a function now that I think of it. well - maybe next time :-)

(defsketch blub (
  (title "sketch ex5")
  (width 410)
  (height 410)
  (f 0)
  (p 0)
)
  (incf f 0.1)
  (background (rgb .9 .9 .9))

  (dotimes (i 10)
   (dotimes (j 10 )
     (setf dx (- 5 i))
     (setf dy (- 5 j))
     (setf p (- f (* 2 (sqrt (+ (* dx dx) (* dy dy))))))
     (push-matrix)
     (translate (+ 30 (* i 40)) (+ 25 (* j 40)))
     (rotate p)
     (rect -19 -19 36 36)
     (pop-matrix)
   )
  )
)
read more ...

sketch experiment 3 - animation

Nikolaus Gradwohl2020-10-08T16:32:59+00:00

For experiment number 4 of my exploration of the commonlisp based sketch framewor, I started working with animations.

experiment no 4

obviously my previous sketches have been animations as well - they just drew the same picture at every frame.

(defsketch blub (
  (title "sketch ex4")
  (width 400)
  (height 400)
  (f 0)
  (p 0)
)
  (incf f 0.1)
  (background (rgb 1 1 1))
  (dotimes (i 100)
    (setf p (- f (/ i 5)))
    (with-pen (make-pen :stroke (rgb 0 0 0 0.1))
      (ellipse (/ width 2) (/ height 2)
               (* 100 (sin (/ p 10))) (* 100 (cos (/ p 17))))
    )
  )
)
read more ...

sketch experiment 3 - circles

Nikolaus Gradwohl2020-10-07T18:42:32+00:00

my third sketch experiment is using a similar technique I used in a previous ronin example - drawing a lot of circles along a curved path with a very transparent pen.

Its still a static image that gets rendered - I din't experiment with animations yet, but its very high on my todolist.

circles

(make-instance 'blub )
(defsketch blub ()
  (background (rgb 1 1 1))
  (translate 200 50)
  (dotimes (i 720)
    (with-pen (make-pen :stroke (rgb 0 0 0 0.1 ))
      (push-matrix)

      (setf f (* (sin (* 6.28 (/ i 720)) ) (+ 0 (* 100 (cos (/ i 72.3))))))
      (circle (* 100 (sin (* 3.14 (/ i 180)))) (/ i 2.7) f)
      (pop-matrix )
      )
    )
  )
read more ...

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.

read more ...

sketch experiment 1 - openlisp based media art framework

Nikolaus Gradwohl2020-10-05T18:07:44+00:00

Today I used sketch for the first time. It's a commonlisp based media art framework similar to processing. I haven't made something fancy yet, but so far I like it.

I also installed the vim plugin vlime for the first time - but I'm not yet sure if I really like it - maybe I need to use it for a little while to get used to it.

sketch boxes

the graphic was created using this lisp code

(defsketch boxes () (background (rgb 0 0 0.5)) (dotimes (i 11)
(with-pen (make-pen :fill (rgb 0 1 0)) (rect (+ (* i 30) 40) 100 10 200) ) ) )

read more ...

nested cubes in processing

Nikolaus Gradwohl2020-10-04T03:33:17+00:00

for this processing sketch I created a set of 5 nested cubes - each half the size of it's predecessor.

nested cubes

Each cube rotates around the x and y axis with different speeds and each cube rotates at a 10% slower rate than its predecessor.

To make the 3D effect a little bit more prominent I activated the "ENABLE_STROKE_PERSPECTIVE" hint, so the lines of the cubes wireframe get thinner the further they are away from the camera.

Initally i planned to render the cubes only as wireframes, but after experimenting with them for a while I decided to go for a transparent light blue shading.

read more ...