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

Thursday, 18 August 2011

Rules based generation of processing sketches

In a way somewhat akin to the contextfreeart (cfdg) rules Adam Parrish has explored the possibility of such a grammar and rules to generate processing sketches.  I have played with extended his java code to do the following:-

  1. Explore java jdk 7.0 coin features (switch on String and implied generics diamond)
  2. Add weighting to the rules
  3. Extend to 3D
  4. Extend to pyprocessing
  5. Explore using NetBeans 7.0.1 git plugin
See the results at Github

I found that I could clone and pull from GitHub within NetBeans, however I needed to use command line git to push changes back to Master (on GitHub).
I think the switch on String is really neat (replaces a nasty chain of if else), if you are using NetBeans-7.0.1 with library and source set to jdk 1.7.0 the ide suggests and completes the changes for you. The 3D works best with P3D mode, or with OPENGL using the disable depth test hint. I had the idea of immediately running the generated sketches, I thought this would work best with pyprocessing (no antlr/compile stages required) so I re-factored the lot to pure python.

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