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

Tuesday, 16 November 2010

Experimenting with eisenscript syntax

Here I experiment with the eisenscript flip (fx) command using faux recursion (md = 2), and the set raytracer::size instruction.

   1 // Camera settings. Place these before first rule call.
   2 set translation [0.0633663 0.0987654 -20]
   3 set rotation [0.737822 0.498871 -0.454654 -0.613818 0.776162 -0.144459 0.280819 0.385657 0.878888]
   4 set pivot [0 0 0]
   5 set scale 0.55
   6 
   7 set background gray
   8 
   9 balljack
  10 
  11 rule balljack{
  12 {x -4 s 2.1} box::phong
  13 {rz 30 ry 30} jack
  14   {x 4 s 2.1} sphere::reflection
  15   }
  16 
  17 rule jack{
  18 arm
  19 {ry 90}arm
  20 {rz 90}arm
  21 }
  22 
  23 rule arm md 2{
  24 5 *{x 0.28284271} sphere::phong
  25 {fx}arm  // trying the flip option 
  26 }
  27 
  28 set raytracer::size [600x0]  // nb using 0 to preserve aspect ratio
  29 set raytracer::samples 8
  30 set raytracer::max-threads 2
  31 set raytracer::reflection 0.4
  32 set raytracer::phong [0.6,0.6,0.3]
  33 
  34 
  35 

StructureSynth rendered

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