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, 18 October 2009

Another Interlocking Tiling Pattern from the Alhambra

A context free rule with multiple flips, I found it easier to double up the rules, there is probably a way round it.

   1 startshape start
   2 
   3 rule start{
   4   2*{x 5.35 flip 90}four_column{}
   5 }
   6 
   7 rule four_column{
   8   2*{x 2.3 flip 90}two_column{}
   9 }
  10 
  11 rule two_column{
  12   2*{x .78 flip 90}column{b .3}
  13 } 
  14 
  15 // alternate left and right pointing tee
  16 rule column{ 
  17    8*{y .88 flip 90}tee{r 90} 
  18 }
  19 
  20 // path of a vertical tee
  21 path tee{ 
  22   MOVETO{x 0 y -.39}
  23   LINETO{x -.2 y .07}
  24   LINETO{x -.44 y 0}
  25   LINETO{x -.49 y .21}
  26   LINETO{x 0 y .39}
  27   LINETO{x .49 y .21}
  28   LINETO{x .44 y 0}
  29   LINETO{x .2 y .07}
  30   CLOSEPOLY{}  
  31   FILL{}
  32 }
 

 

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