# Grapher is based on a context free art design # by ColorMeImpressed (takes a bit of time to run) # http://www.contextfreeart.org/gallery/view.php?id=2844 # CMIN = -2.0 # Important to specify float else get random int from range? CMAX = 2.0 FUZZ = 0.04 SZ = 5 def setup size 600, 600 no_stroke color_mode(HSB, 1.0) background(0) frame_rate(4000) end def draw translate(width/2, height/2) dot(rand(-PI .. PI), rand(-PI .. PI), rand(CMIN .. CMAX)) unless frame_count > 200000 end def dot(px, py, c) func = sin(px) + sin(py) + c # change function to change the graph eg. #func = sin(px) + tan(py) + c #func = cos(px) + sin(py) + c if abs(func) <= FUZZ fill(((CMIN - c) / (CMIN - CMAX)), 1, 1) ellipse px * width / TWO_PI, py * height / TWO_PI, SZ, SZ else dot(rand(-PI .. PI), rand(-PI .. PI), rand(CMIN .. CMAX)) end end
Experiments with ruby-processing (processing-2.2.1) and JRubyArt for processing-3.0
Friday, 21 December 2012
Context free sketch in regular ruby processing
Sometimes it is not necessary to use the ruby-cf3 library. I was contemplating adding parametrized shape to cf3ruby, so I thought I would try a simple context free art sketch to experiment with. Turn out this pretty easy to implement in regular ruby-processing (now using ruby-1.9 syntax for random range):-
Labels:
context free art,
equations,
graph,
ruby-processing
Subscribe to:
Post Comments (Atom)
Followers
Blog Archive
-
▼
2012
(26)
-
▼
December
(17)
- Bezier Patch as a VBO (PShape)
- Bezier Patch in ruby-processing
- Rotating Arcs Sketch in Ruby Processing
- Context free sketch in regular ruby processing
- Exporting cf3ruby directly to 'large' pdf
- Context Free Tree in cf3ruby
- New context_free.rb (cf3ruby)
- MeshToVBO conversion ruby-processing
- Fix for ruby-processing context free
- What works what does not and may not
- Retained Shape (FBO) in Ruby Processing
- Creating a Mock Vanilla Processing Distribution
- Landscape shader in ruby-processing
- Fish-eye shader revisited with ruby-processing and...
- PShader Example in ruby-processing
- A 3D-texture example with my hacked ruby-processing
- Testing ruby-processing with processing-2.0
-
▼
December
(17)
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
No comments:
Post a Comment