Curling Recursion from Nikolaus Gradwohl on Vimeo.

"/>

Curling Recursion from Nikolaus Gradwohl on Vimeo.

"/>

Curling Recursion

Nikolaus Gradwohl2010-06-03T10:30:00+02:00

I made this animation with Context Free Art and a small ruby script. The scroll down to see the sourcecode I have used for this file

Curling Recursion from Nikolaus Gradwohl on Vimeo.

test.cfdg contains the following code

startshape FOO

rule FOO {
    CIRCLE { size 0.5 }
    FOO { x 1 y 0 size 0.95 rotate @@rotate@@ }
    FOO { x 1 y 1 size 0.4}
    FOO { x 1 y -1 size 0.4}
}

looper.rb looks like this

f = open('test.cfdg')
template = f.read()

( 1..500 ).each{ |i| 
    cfdg = "#{template}"
    cfdg[ '@@rotate@@' ]=  "#{10 * i / 500.0}" 
    tmp = open("tmp.cfdg", 'w' )
    tmp.write(cfdg)
    tmp.close()

    fn =  'out/test%03d.png' % i 
    puts fn
    system("../ContextFree/cfdg tmp.cfdg #{fn}")
}

the single frames can be combined to a video using this mencoder command

mencoder "mf://*.png" -mf fps=12 -o output.avi -ovc lavc
Tweet This! submit to reddit Digg!   Tags: | no comments | no trackbacks

See also:

newspaper cubes
Drawing a Rose
Row Row Row the boat ...
Lyrics word cloud
pencil drawing of my drawing-doll

Trackbacks

Comments

Leave a response

Leave a comment