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

Monday, 6 February 2012

Exporting to PovRAY from toxiclibs-21

NB: code updated 14 February 2012 to work with a further revised library.
Previously I have published modifications/additions to the toxiclibscore (version 20), that would facilitate the export of toxiclibs mesh objects to PovRAY mesh2, this approach produces a neat result, but does require re-compiling of toxiclibscore.  Karsten recently published an application developed at a workshop this features a pre-release of version 21 of his libraries, so I was keen to see if my PovRAY export code would work with this library.  In the absence of source code with the pre-release version, I coded a library to extend the toxiclibscore that allows direct exporting of either TriangleMesh, WETriangleMesh or an array of to a union of PovRAY mesh2 object/s. I also modified the FacadeApp class (from the workshop) see here:-

My povmesh library is available to download/test here. How it was done:- Karsten has kindly supplied the facade example as an eclipse project. I was able to import the eclipse project into NetBeans (I've never got on with eclipse, to do the import I ignored dependencies (Mac or Windows binaries are no good to me anyway), and I just needed to point the NetBeans project to the jogl binaries at run time. My library involved a bit of refactoring, and now favors composition over inheritance (much cleaner code). Here is the PovRAY output:-

Mesh created by Facade Tool, directly exported as a PovRAY mesh2 object rendered with PovRAY 3.7beta


Blog Archive

About Me

My photo
Pembrokeshire, United Kingdom
I have developed JRubyArt and propane new versions of ruby-processing for JRuby- and processing-3.2.2