# levy.rb ruby-processing NB: :alpha is now implemented ruby-processing require 'cf3', 'pdf' include_package 'processing.pdf' 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 2000, 2000, PDF, "levy.pdf" setup_the_levy smooth draw_it end def draw exit end def draw_it background 255 @levy.render :start, size: 250, stop_size: 2, start_x: width/4, start_y: height/2 end
Experiments with ruby-processing (processing-2.2.1) and JRubyArt for processing-3.0
Showing posts with label pdf. Show all posts
Showing posts with label pdf. Show all posts
Wednesday, 19 December 2012
Exporting cf3ruby directly to 'large' pdf
With the processing pdf export library it is easy to export processing sketches to pdf. This is also true for ruby-processing sketches, including those using the cf3ruby library see example below:-
Labels:
cf3,
context free DSL,
pdf,
ruby processing
Subscribe to:
Comments (Atom)
Followers
About Me
- monkstone
- I have developed JRubyArt and propane new versions of ruby-processing for JRuby-9.1.5.0 and processing-3.2.2