Curling Recursion 2 from Nikolaus Gradwohl on Vimeo.

"/>

Curling Recursion 2 from Nikolaus Gradwohl on Vimeo.

"/>

Curling Animation II

Nikolaus Gradwohl2010-08-22T14:02:35+02:00

I made another animation with Context Free Art and a small ruby script. The scroll down to see the sourcecode I have used for this file. This animation uses the same technique i used for my first one

Curling Recursion 2 from Nikolaus Gradwohl on Vimeo.

test.cfdg contains the following code

startshape FOO 

rule FOO {
    FOO1 {}
    FOO2 {}
}

rule FOO1 {
    CIRCLE { size 0.5 }
    FOO1 { x 1 y 1 size 0.95 rotate @@rotate@@ }
    FOO1 { x 1 y 1 size 0.5 }

}

rule FOO2 {
    CIRCLE { size 0.5 }
    FOO2 { x 1 y 1 size 0.95 rotate -@@rotate@@ }
    FOO2 { x 1 y 1 size 0.5 }
}

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} -v AAAAAA")
}

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:

Curling Recursion
Where Opposites Meet
Animation Node experiment - circular sound visualizer
Animation Node experiment - boxed surface
Animation Node experiment - polar coordinates

Trackbacks

Comments

Leave a response

Leave a comment