Wednesday, December 5, 2007

Five code lines


line = LinearBezier.build( :support=, [Point::O, Point::X])
ondulation = Ondulation2.build( :support=, line, :freq=, 3, :amp=, 0.5 )
palette = Palette.new( :colorlist=, [ Color.blue, 0.0, Color.orange, 0.5, Color.yellow, 1.0 ] )
[ondulation.sampler(:point).geo( 2.5 ), palette].samples(50) do |point, color|
render.add_object( Circle.new( :center=, point, :radius=, 0.01 ), Style.new( :fill=, color ))
end