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

Monday, 29 June 2009

Rolling the dice

Well sometimes you get nothing with some rules, and sometimes you get something like what you seek, thats the beauty of chance. Try these rules and you will see what I mean...

   1:startshape mondrian
2:background {b -1}
4:rule mondrian{
5: reflect{}
8:rule reflect{
9: rectangle {s 30 hue 360}
10: rectangle {x 30 s 20 30 flip 90 hue 60}
11: rectangle {y 25 flip 180 s 30 15 hue -300 }
12: }
14:rule rectangle {
15: SQUARE { sat 1 b 1 }
18:rule reflect .5 {}

My fractional empty reflect rule has high probability just to emphasise the point, also is no longer required to avoid the infinite recursion when I first introduced it.
These experiments convinced me that image reflection is not really possible (requires context) in context free. I also played with a python script that converts images to cfdg rules, which was a bit of fun, but be warned you end up with masses of rules and very big cfdg file.

1 comment:


Blog Archive

About Me

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