Recently I've been looking at Povray, pyprocessing, and cfdg (version 3.0) as tools for creating digital images. I have branched two separate blogs where I mainly explore jruby + processing and processing.py

Wednesday, 28 October 2009

More is less (a simple flower)

When you run context free recursion is limited by the size of the smallest element (the default minimum size = 0.3 pixels). However there is a command line option -x which allows you to change the minimum size. For the image below I set that value to 10 pixels for aesthetic reasons.  In my next posts I intend to look at random walks and targeting a color.


   1 startshape flower 
   2 
   3 background{h 0 sat .15 b .22} // set color to red
   4 
   5 rule flower{
   6   6*{r 60}petal{b .7 sat .7 r 180 s .6 y .35 a -.3}
   7   flower{s .6 r -33 sat .1 b .1 h 4} // shift color towards a stronger yellow
   8 } 
   9 
  10 path petal {  
  11 MOVETO {x -0.5 y (sin(-30) / sqrt(3))}
  12 3* {r 120} {
  13 CURVEREL {x 0.5 x1 0.25 y1 0.1}
  14 CURVEREL {x 0.5}
  15 }
  16 CLOSEPOLY {p align}
  17 FILL{}
  18 STROKE{width .007 h 0 sat .9 b -.1} // paint border/vein
  19 }


2 comments:

Followers

Blog Archive

About Me

My photo
Pembrokeshire, United Kingdom
I have developed JRubyArt and propane new versions of ruby-processing for JRuby-9.1.5.0 and processing-3.2.2