Sha256: 15f20494c3091a2fe641e00348aabddca9b86a79fb9c9c892c8d2156a3b75d61
Contents?: true
Size: 684 Bytes
Versions: 5
Compression:
Stored size: 684 Bytes
Contents
# levy.rb ruby-processing NB: :alpha is now implemented ruby-processing require 'cf3' def setup_the_levy @levy = ContextFree.define do shape :start do levy brightness: 0.9 end shape :levy do square alpha: 0.1 split do levy size: 1/Math.sqrt(2), rotation: -45, x: 0.5, brightness: 0.9 rewind levy size: 1/Math.sqrt(2), rotation: 45, x: 0.5, brightness: 0.9 end end end end def setup size 400, 400 setup_the_levy draw_it save_frame("levy.png") end def draw # Do nothing. end def draw_it background 255 @levy.render :start, size: 250, stop_size: 2, start_x: width/4, start_y: height/2 end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
cf3-0.0.5 | samples/levy.rb |
cf3-0.0.4 | samples/levy.rb |
cf3-0.0.3 | samples/levy.rb |
cf3-0.0.2 | samples/levy.rb |
cf3-0.0.1 | samples/levy.rb |