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, 13 September 2009

Carpet Surprise

   1 startshape carpet
   2 
   3 background{b -.7}
   4 
   5 rule carpet{
   6 patch{sat .2 b .7 h -20}
   7 carpet{s .3333 y .3333}
   8 carpet{s .3333 x .3333 y .3333}
   9 carpet{s .3333 x .3333}
  10 carpet{s .3333 x .3333 y -.3333}
  11 carpet{s .3333 y -.3333}
  12 carpet{s .3333 x -.3333 y -.3333}
  13 carpet{s .3333 x -.3333}
  14 carpet{s .3333 x -.3333 y .3333}
  15 }
  16 
  17 rule patch{
  18 SQUARE{b -.1 s .3333 h 360 sat .3}
  19 }
  20 rule patch{
  21 hexagon{b .1 s .3333 h 220 sat .5}
  22 }
  23 rule patch{
  24 CIRCLE{b .1 s .3333 h 60 sat .8}
  25 }
  26 
  27 path hexagon{
  28 MOVETO{x .25 y (sqrt(3)/4)}
  29 LINETO{x .5 y 0}
  30 LINETO{x .25 y (-sqrt(3)/4)}
  31 LINETO{x -.25 y (-sqrt(3)/4)}
  32 LINETO{x -.5 y 0}
  33 LINETO{x -.25 y (sqrt(3)/4)}
  34 CLOSEPOLY{}
  35 STROKE{width 0.01 b -1}
  36 FILL{}
  37 }

1 comment:

  1. That's a really nice design and I like the colours.

    ReplyDelete

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