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

Sunday, 25 July 2010

Exploring StructureSynth (towards a Hilbert?)

Now I've upgraded my linux box I thought I would give StructureSynth another go (a kind of 3D context free), whilst we are still waiting for Mark to come up with his 3D cfdg. The syntax is similar to cfdg but you put the parameters 1st. And then of course the big difficulty you have to think in 3D, the advantage of my new box is I don't have to wait very long for results. I have used my jEdit context free highlight scheme for syntax highlighting.

   1 // hilbert.es EisenScript for StrucureSynth
   2 
   3 set background #232
   4 
   5 R3
   6 
   7 rule R1 {
   8   5 * { x 1} box
   9   4 * { y 1} 1 * { x 1} box
  10 }
  11 
  12 rule R2 {
  13   R1
  14   1 * { y 4 rx 90 } 5 * {x 1} box
  15 }
  16 
  17 rule R3{
  18   4 * { z 1 } box
  19   { x -5 } R2
  20   1 * { y 4} 4 * { z 1} box
  21   1 * { rx 90 ry -90 y 4 } 4 * { z 1 } box
  22   1 * { z 4 y 4 ry -90 } 4 * { z 1 } box
  23 }


This looks like the starting point for the Hilbert fractal.  Would be better done by recursion methinks!!!!

No comments:

Post a Comment

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