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

Wednesday, 27 April 2011

ContextFree 3.0 Alpha has been released

So far so good with my testing of context free 3.0 alpha, new features include the ability to define constants see the  proposed syntax changes here I have just uploaded a revised syntax highlighting mode at jedit.
Revised version 26 June 2011 for latest changes to syntax (linux v12):-

PHI = (sqrt(5) + 1)/2   
IPHI = 1/PHI
 
 
startshape sunstar
 
CF::Size = [s 0.7 0.7 x 0 y 0]  // trim to hide full shape
 
shape sunstar{ 
  star[z -1]
  sun[z -0.9]
  sunstar[s IPHI z 0.1]
}
 
shape sun{
  loop 5 [r 72]kite[]  
}
 
shape star{
  loop 5 [r 72]dart[]  
}
 
shape kite {                    
  sharp[b 0.9 sat 1]
  sharp[flip 72]
}
 
shape dart {
  flat[b 0.9 sat 1]
  flat[flip 36]
}

path sharp {     
    LINETO(1, 0)                  
    LINETO(cos(36), sin(36))
    CLOSEPOLY()
    FILL [b 0.7 sat 0.8 h 0]
    STROKE [width 0.01 b -1]
}
 
path flat {
    LINETO((cos(36) * PHI), (sin(36) * PHI))
    LINETO(1, 0)
    CLOSEPOLY()
    FILL [b 0.7 sat 0.8 h 60]
    STROKE [width 0.01 b -1]
}

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