<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Code &#038; form &#187; Libraries</title>
	<atom:link href="http://workshop.evolutionzone.com/category/libraries/feed/" rel="self" type="application/rss+xml" />
	<link>http://workshop.evolutionzone.com</link>
	<description>Computational aesthetics and programming for artists and designers.</description>
	<lastBuildDate>Sun, 29 Jan 2012 07:00:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>20111021 ITP Parametric Modeling workshop</title>
		<link>http://workshop.evolutionzone.com/2011/10/22/20111021-itp-parametric-modeling-workshop/</link>
		<comments>http://workshop.evolutionzone.com/2011/10/22/20111021-itp-parametric-modeling-workshop/#comments</comments>
		<pubDate>Sat, 22 Oct 2011 06:19:23 +0000</pubDate>
		<dc:creator>marius watz</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Libraries]]></category>
		<category><![CDATA[Processing / Java]]></category>
		<category><![CDATA[Workshops]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[digital-fabrication]]></category>
		<category><![CDATA[ITP]]></category>
		<category><![CDATA[mesh]]></category>
		<category><![CDATA[modelbuilder]]></category>
		<category><![CDATA[new york]]></category>
		<category><![CDATA[NYU]]></category>
		<category><![CDATA[parametric-design]]></category>
		<category><![CDATA[processing.org]]></category>

		<guid isPermaLink="false">http://workshop.evolutionzone.com/?p=597</guid>
		<description><![CDATA[Arc mesh tool created with Modelbuilder and ControlP5 I did a short lecture + workshop about digital fabrication and parametric modeling with Processing yesterday at NYU&#8217;s ITP program. Thanks to Dan Shiffman for the invite, it ended up being a lot of fun because of the great turnout of enthusiastic ITP&#8217;ers. It certainly made me [...]]]></description>
			<content:encoded><![CDATA[<div class="flickrImg"><img src="http://workshop.evolutionzone.com/wp-content/uploads/2011/10/simple_geo_arc_4.jpg" alt="" title="Arc mesh tool" width="520" class="alignnone size-full wp-image-598" /> </p>
<p>Arc mesh tool created with Modelbuilder and ControlP5</p></div>
<p>I did a short lecture + workshop about digital fabrication and parametric modeling with Processing yesterday at <a href="http://itp.nyu.edu/">NYU&#8217;s ITP program</a>. Thanks to <a href="http://www.shiffman.net/">Dan Shiffman</a> for the invite, it ended up being a lot of fun because of the great turnout of enthusiastic ITP&#8217;ers. It certainly made me even more regretful that I was unable to teach a fabbing course at ITP this semester, but with luck there will be other oppportunities.</p>
<p>As promised I have uploaded the pre-written examples I demo&#8217;ed as well as the code I (frenziedly) wrote live during our 1.5 hour coding session. The focus was to demonstrate the logic of the Modelbuilder library, a set of utilities and aimed at abstracting and simplifying some common tasks in computational creation of 3D meshes. </p>
<p>The library is really not all that sophisticated, but it shifts the focus away from OpenGL drawing logic towards a more object-oriented way of imaging 3D forms based on UVertexList objects. In a typical situation it should simplify a lot of tasks, as well as save dozens of for() loops and repetitive code. It also allows some pragmatic coding (aka &#8220;lazy&#8221;) coding practices enabling easy reuse of geometries due to the assumption that operations like &#8220;new UVertexList(vl)&#8221; should always copy input data by content rather than by reference.</p>
<p>I&#8217;m pleased to say that Modelbuilder performed well in the demo session, there&#8217;s nothing like live coding to reveal weaknesses or inconsistencies in code. But the Modelbuilder logic proved consistent under stress testing and we were able to do some pretty decent mesh generation in a limited amount of time. </p>
<div class="mediumtitle">Download: Workshop Code</div>
<p>A ZIP with all the files shown (including the Modelbuilder and ContolP5 libraries) can be downloaded from <a href="http://db.tt/5Ehmn6uz">http://db.tt/5Ehmn6uz</a>. It includes the following code examples:</p>
<ul>
<li><strong>simple_geo_arc_4</strong> A tool for creating a composition of 3D arcs (w/ valid face normal orientation and passing the &#8220;waterproof&#8221; criteria for 3D printing), generating output to STL format. This was written live in around 30 minutes. </li>
<li><strong>mb_04_gui_parametric</strong> A parametric 3D form generator created for my Makerbot residency &#8211; results look valid on screen but for some reason export to STL results in flawed models. I&#8217;ll look into debugging this example.</li>
<li><strong>mb_04_gui_heightfield</strong> An example showing how to create a heightfield mesh from an image, allowing interactive control of mesh resolution and Z scaling. Potentially useful for geographical elevation maps and Kinect depth maps.</li>
<li>A set of examples demonstrating the core Modelbuilder functions</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://workshop.evolutionzone.com/2011/10/22/20111021-itp-parametric-modeling-workshop/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Code: ModelBuilder library &#8211; first public release</title>
		<link>http://workshop.evolutionzone.com/2011/04/06/code-modelbuilder-library-public-release/</link>
		<comments>http://workshop.evolutionzone.com/2011/04/06/code-modelbuilder-library-public-release/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 19:59:12 +0000</pubDate>
		<dc:creator>marius watz</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Libraries]]></category>
		<category><![CDATA[Open source]]></category>
		<category><![CDATA[Processing / Java]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[3D printing]]></category>
		<category><![CDATA[digital-fabrication]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[makerbot]]></category>
		<category><![CDATA[modelbuilder]]></category>
		<category><![CDATA[processing.org]]></category>
		<category><![CDATA[stl]]></category>

		<guid isPermaLink="false">http://workshop.evolutionzone.com/?p=546</guid>
		<description><![CDATA[MakerBot models built with code included with the ModelBuilder library, also downloadable from my Thingiverse account Update, July 1 2011: I&#8217;ve uploaded ModelBuilder v0004, which fixes a few really silly bugs in 0003. Download it from http://code.google.com/p/codeandform/. I&#8217;m happy to announce the first public release of my new ModelBuilder library, created as part of my [...]]]></description>
			<content:encoded><![CDATA[<div class="flickrImg">
<p><a href="http://www.flickr.com/photos/watz/5420298061/" title="MakerBot models 5486 by watz, on Flickr"><img src="http://farm6.static.flickr.com/5093/5420298061_65e035cf68.jpg" width="500" height="333" alt="MakerBot models 5486"></a></p>
<p style="line-height:14px;">MakerBot models built with code included with the ModelBuilder library, also downloadable from my <a href="http://www.thingiverse.com/watz">Thingiverse account</a></p>
</div>
<p><strong>Update, July 1 2011: I&#8217;ve uploaded ModelBuilder v0004, which fixes a few really silly bugs in 0003. Download it from <a href="http://code.google.com/p/codeandform/">http://code.google.com/p/codeandform/</a>.</strong></p>
<p>I&#8217;m happy to announce the first public release of my new ModelBuilder library, created as part of my artist-in-residence project at <a href="http://blog.makerbot.com/2011/02/07/first-makerbot-artist-in-residence-marius-watz/">MakerBot Industries</a> and beta tested in the <a href="http://workshop.evolutionzone.com/2011/02/18/interactive-parametrics-workshop-w-studio-mode-and-makerbot-2/">Interactive Parametrics workshop</a>. The occasion for today&#8217;s release is the <a href="http://blog.makerbot.com/2011/04/04/makerbot-user-group-new-york-wednesday-april-6th/">MakerBot User Group New York</a>, where I&#8217;ll talk about the library and show off my MakerBot models. </p>
<p>ModelBuilder focuses on functions useful for digital fabrication purposes, such as creating meshes, centering models around origin, scaling to given dimensions, output to STL format etc. It emulates Processing&#8217;s beginShape / vertex / endShape logic to build mesh geometry which can then be manipulated and transformed. </p>
<p>The <a href="http://workshop.evolutionzone.com/code/modelbuilder/javadoc/unlekker/modelbuilder/UVertexList.html">UVertexList class</a> allows the user to build paths of vertices. Vertex lists are then fed into various <a href="http://workshop.evolutionzone.com/code/modelbuilder/javadoc/unlekker/modelbuilder/UGeometry.html#quadStrip(unlekker.modelbuilder.UVertexList[],%20int)">UGeometry.quadStrip()</a> functions to construct quad strip meshes, most likely eliminating the need for dozens of <em>for</em> loops in the process. See the online copy of the <a href="http://workshop.evolutionzone.com/code/modelbuilder/javadoc/index.html">ModelBuilder JavaDoc</a> for a more complete overview.</p>
<p><span id="more-546"></span><strong>Coders using the library to output models for 3D printing</strong> need to be aware of face orientation (see <a href="http://en.wikipedia.org/wiki/Cartesian_coordinate_system#Orientation_and_handedness">Wikipedia: Handedness</a>) so that face normals are generated correctly.<br />
Always check models to see if face normals are correct before attempting to 3D print them. As always, I recommed the Open Source tool <a href="http://www.meshlab.org/">MeshLab</a> for previewing and testing models. MeshLab will render backwards-facing faces as all black, giving an easy preview of incorrect geometry.</p>
<p>Happy mesh building, look forward to seeing models on <a href="http://www.thingiverse.com/">Thingiverse</a>!</p>
<div class="mediumtitle">Download</div>
<p>Download <a title="modelbuilder-0003.zip" href="http://code.google.com/p/codeandform/downloads/detail?name=ModelBuilder%20v0004.zip&#038;can=2&#038;q=#makechanges">modelbuilder-0004.zip</a> and unpack it. Copy the &#8220;modelbuilder&#8221; folder to your &#8220;libraries&#8221; folder and restart Processing. If you have the now obsolete unlekkerLib installed you should remove it before adding ModelBuilder, which effectively replaces unlekkerLib.</p>
<p>The ModelBuilder library folder includes (rudimentary) JavaDoc documentation, the library source code and a series of examples located in &#8220;modelbuilder/examples&#8221;. The most advanced example is mb_04_gui_parametric, which contains the code used to create MakerBot prints shown above. The &#8220;gui&#8221; examples use Andreas Schlegel&#8217;s <a href="http://www.sojamo.de/libraries/controlP5/">ControlP5 library</a>, which must be downloaded and installed before running them.</p>
<p>This should be considered an experimental in-progress release and some features are likely to change. As usual, niceties like good documentation have been left for last, so the best way to get a feel for the library is to run through the examples provided. Bug and / or success reports are welcome, just leave comments on this post.</p>
]]></content:encoded>
			<wfw:commentRss>http://workshop.evolutionzone.com/2011/04/06/code-modelbuilder-library-public-release/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Interactive Parametrics &#8211; Workshop w/ Studio Mode and MakerBot</title>
		<link>http://workshop.evolutionzone.com/2011/02/18/interactive-parametrics-workshop-w-studio-mode-and-makerbot-2/</link>
		<comments>http://workshop.evolutionzone.com/2011/02/18/interactive-parametrics-workshop-w-studio-mode-and-makerbot-2/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 02:15:12 +0000</pubDate>
		<dc:creator>marius watz</dc:creator>
				<category><![CDATA[Libraries]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[Open source]]></category>
		<category><![CDATA[Processing / Java]]></category>
		<category><![CDATA[Workshops]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[controlp5]]></category>
		<category><![CDATA[hemesh]]></category>
		<category><![CDATA[makerbot]]></category>
		<category><![CDATA[mesh]]></category>
		<category><![CDATA[meshlab]]></category>
		<category><![CDATA[modelbuilder]]></category>
		<category><![CDATA[parametric-design]]></category>
		<category><![CDATA[Rhino]]></category>
		<category><![CDATA[stl]]></category>
		<category><![CDATA[studio mode]]></category>
		<category><![CDATA[thingiverse]]></category>
		<category><![CDATA[toxiclibs]]></category>

		<guid isPermaLink="false">http://workshop.evolutionzone.com/?p=481</guid>
		<description><![CDATA[Workshop with Studio Mode &#038; MakerBot: Interactive Parametrics This weekend I&#8217;ll be teaching the Interactive Parametrics Workshop with Studio Mode (Gil Akos and Ronnie Parsons) and MakerBot (represented by Bre Pettis). We&#8217;ve been planning this for a while, but since it&#8217;s happening during my residency at MakerBot we thought it&#8217;d be fun to focus on [...]]]></description>
			<content:encoded><![CDATA[<div class="flickrImg"><a href="http://modelab.nu/?p=4152"><img src="http://modelab.nu/wp-content/uploads/2011/01/20110219_coLab_intParam01_950x250-590x155.jpg" alt="Interactive Parametrics Workshop" width=540/></a></p>
<p><a href="http://modelab.nu/?p=4152">Workshop with Studio Mode &#038; MakerBot: Interactive Parametrics</a></div>
<p>This weekend I&#8217;ll be teaching the <a href="http://modelab.nu/?p=4152">Interactive Parametrics Workshop</a> with <a href="http://studiomode.com/">Studio Mode</a> (Gil Akos and Ronnie Parsons) and <a href="http://makerbot.com">MakerBot</a> (represented by Bre Pettis). We&#8217;ve been planning this for a while, but since it&#8217;s happening during my <a href="http://workshop.evolutionzone.com/2011/02/07/makerbots-first-artist-in-residence-me/">residency</a> at MakerBot we thought it&#8217;d be fun to focus on the MakerBot as a possible output method. Our thanks to Bre and the MakerBot crew for supporting the workshop!</p>
<p>With a good mix of architects and code-hacking designers as our participants it should be an interesting weekend. We will be posting the resulting code examples and STL models after the workshop.</p>
<div class="mediumtitle">Tools &#038; libraries</div>
<p><span id="more-481"></span>We&#8217;ll be looking at strategies for parametric modeling using Processing, outputting MakerBot-ready models as STL files and printing them on site. </p>
<p>Processing lacks the hardcore math engine of typical CAD packages, but is far more flexible when it comes to working interactively with dynamic realtime systems. By extending Processing&#8217;s core functionality with libraries for simulation and 3D mesh construction we can combine realtime processes with advanced geometry tools.</p>
<p>We&#8217;ll be relying on a selection of Processing libraries:</p>
<ul>
<li>unlekker.ModelBuilder, a new library I&#8217;ll be releasing for the workshop that supports mesh-oriented parametric modeling for 3D printing. It&#8217;s nothing fancy, but it&#8217;ll get the job done in predictable ways.</li>
<li>Karsten Schmidt&#8217;s always excellent <a href="http://toxiclibs.org/">Toxiclibs </a> library offers volumetric modelling and advanced simulation functions.</li>
<li>Frederik Vanhoutte&#8217;s <a href="http://www.wblut.com/2010/05/04/hemesh-a-3d-mesh-library-for-processing/">Hemesh </a> library is a comprehensive set of tools for constructing and modifying meshes through procedural tools like extruding, subdividing, slicing, chamfering  etc. Hemesh allows the effortless creation of hypercomplex models.</li>
<li>Andreas Schlegel&#8217;s <a href="http://www.sojamo.de/libraries/controlP5/">ControlP5</a> library will be our steady workhorse for GUI interface elements.</li>
</ul>
<p>We&#8217;ll also be using <a href="http://www.rhino3d.com/">Rhino3D</a> and <a href="http://meshlab.org">MeshLab</a> to clean up models for fabrication.</p>
<div class="mediumtitle">Resources</div>
<p>Below is a list of links to tutorials and resources related to the tools we&#8217;ll be using:</p>
<ul>
<li><strong>Processing</strong><br />
<a href="http://modelab.nu/?tag=processing+primer">Processing Primers 1-3 on modeLab.nu</a><br />
<a href="http://processing.org/learning/">Processing.org/learning</a>, great collection of tutorials<br />
<a href="http://openprocessing.org/">OpenProcessing.org</a>, social network for sharing Processing sketches
</li>
<li><strong>Toxiclibs</strong><br />
<a href="http://toxiclibs.org/">Toxiclibs home page</a><br />
	<a href="http://openprocessing.org/portal/?userID=4530">Toxiclibs demos on OpenProcessing.org</a></li>
<li><strong>Hemesh</strong><br />
<a href="http://wblut.com/2010/05/04/hemesh-a-3d-mesh-library-for-processing/">Hemesh home page</a><br />
<a href="http://vormplus.be/blog/article/creating-3d-shapes-with-hemesh">Hemesh introduction tutorial</a><br />
<a href="http://wblut.com/2010/11/20/share-tell/">Hemesh Share &#038;&#038; Tell presentation by Frederik Vanhoutte</a><br />
<a href="http://creativeapplications.net/processing/hemesh-and-hemeshgui-processing/">Hemesh post on Creative Applications</a>
</li>
<li><strong>Makerbot / Thing-O-Matic</strong><br />
<a href="http://wiki.makerbot.com/thingomatic">MakerBot Thing-O-Matic details</a><br />
<a href="http://www.thingiverse.com/">Thingiverse &#8211; Open Source hub for digital design</a>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://workshop.evolutionzone.com/2011/02/18/interactive-parametrics-workshop-w-studio-mode-and-makerbot-2/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>TileSaver broken &#8211; temporary hack</title>
		<link>http://workshop.evolutionzone.com/2009/08/18/tilesaver-broken-temporary-hack/</link>
		<comments>http://workshop.evolutionzone.com/2009/08/18/tilesaver-broken-temporary-hack/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 05:22:26 +0000</pubDate>
		<dc:creator>marius watz</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Libraries]]></category>
		<category><![CDATA[Processing / Java]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[high-resolution]]></category>
		<category><![CDATA[output]]></category>
		<category><![CDATA[print]]></category>
		<category><![CDATA[processing.org]]></category>
		<category><![CDATA[tilesaver]]></category>
		<category><![CDATA[unlekkerlib]]></category>

		<guid isPermaLink="false">http://workshop.evolutionzone.com/?p=244</guid>
		<description><![CDATA[As documented in this thread on the Processing forums the TileSaver class seems to be broken for current versions of Processing. Sadly I&#8217;m not sure what the problem is and I don&#8217;t have time to fix it right now. However, I tried the original TileSaver code posted back in 2006 and miraculously that still works. [...]]]></description>
			<content:encoded><![CDATA[<p>As documented in <a href="http://processing.org/discourse/yabb2/YaBB.pl?num=1248245155/0#10">this thread on the Processing forums</a> the TileSaver class seems to be broken for current versions of Processing. Sadly I&#8217;m not sure what the problem is and I don&#8217;t have time to fix it right now.</p>
<p>However, I tried the original TileSaver code posted back in 2006 and miraculously that still works. This would imply a larger issue with the unlekkerLib library and Processing 1.0, which I&#8217;ll have to address when I have the time.</p>
<p>For now, here is a link to a working Processing sketch using the old TileSaver code: <a href="http://workshop.evolutionzone.com/files/TileSaverTest.zip">TileSaverTest.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://workshop.evolutionzone.com/2009/08/18/tilesaver-broken-temporary-hack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>unlekkerLib0003c: Now compatible with Processing 1.0</title>
		<link>http://workshop.evolutionzone.com/2009/04/16/unlekkerlib0003c-now-compatible-with-processing-10/</link>
		<comments>http://workshop.evolutionzone.com/2009/04/16/unlekkerlib0003c-now-compatible-with-processing-10/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 06:19:56 +0000</pubDate>
		<dc:creator>marius watz</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Libraries]]></category>
		<category><![CDATA[Processing / Java]]></category>
		<category><![CDATA[codeandform]]></category>
		<category><![CDATA[google code]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[processing.org]]></category>
		<category><![CDATA[tilesaver]]></category>
		<category><![CDATA[unlekkerlib]]></category>

		<guid isPermaLink="false">http://workshop.evolutionzone.com/?p=234</guid>
		<description><![CDATA[After several requests I&#8217;ve taken the time to make unlekkerLib compatible with Processing 1.0. Apologies to anyone who&#8217;s been inconvenienced by the lack of a 1.0 version. In particular, STL export should work again. However I haven&#8217;t had the chance to test the code very much, so please let me know if you find any [...]]]></description>
			<content:encoded><![CDATA[<p>After several requests I&#8217;ve taken the time to make <a href="http://workshop.evolutionzone.com/unlekkerlib/">unlekkerLib </a> compatible with Processing 1.0. Apologies to anyone who&#8217;s been inconvenienced by the lack of a 1.0 version.</p>
<p>In particular, STL export should work again. However I haven&#8217;t had the chance to test the code very much, so please let me know if you find any bugs.</p>
<div class="mediumtitle">Download</div>
<ul>
<li><a href="http://code.google.com/p/codeandform/downloads/detail?name=unlekkerLib0003c.zip&#038;can=2&#038;q=" title="unlekkerLib0003c">unlekkerLib0003c</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://workshop.evolutionzone.com/2009/04/16/unlekkerlib0003c-now-compatible-with-processing-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>unlekkerLib-0003: Fixed missing classes</title>
		<link>http://workshop.evolutionzone.com/2008/07/12/unlekkerlib-0003-fixed-missing-classes/</link>
		<comments>http://workshop.evolutionzone.com/2008/07/12/unlekkerlib-0003-fixed-missing-classes/#comments</comments>
		<pubDate>Sat, 12 Jul 2008 18:51:37 +0000</pubDate>
		<dc:creator>marius watz</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Libraries]]></category>
		<category><![CDATA[Processing / Java]]></category>
		<category><![CDATA[codeandform]]></category>
		<category><![CDATA[google code]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[processing.org]]></category>
		<category><![CDATA[tilesaver]]></category>
		<category><![CDATA[unlekkerlib]]></category>

		<guid isPermaLink="false">http://workshop.evolutionzone.com/?p=205</guid>
		<description><![CDATA[I&#8217;ve uploaded a new version of my unlekkerLib library. For some inexplicable reason version 0002 was missing some classes that were needed for certain examples to function. As a result the TileSaver class was broken, which was a serious omission. You can download unlekkerLib-0003 from the <a href="http://code.google.com/p/codeandform/downloads/list" title="Code &#038; Form Google Code repository">Code &#038; Form Google Code repository</a>. I&#8217;ve added the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve uploaded a new version of my <a href="http://workshop.evolutionzone.com/unlekkerlib/">unlekkerLib library</a>. For some inexplicable reason version 0002 was missing some classes that were needed for certain examples to function. As a result the TileSaver class was broken, which was a serious omission. </p>
<p>You can download unlekkerLib-0003 from the <a href="http://code.google.com/p/codeandform/downloads/list" title="Code &#038; Form Google Code repository">Code &#038; Form Google Code repository</a>. I&#8217;ve added the missing classes, but otherwise the library is the same. If you still experience problems please report them here.</p>
]]></content:encoded>
			<wfw:commentRss>http://workshop.evolutionzone.com/2008/07/12/unlekkerlib-0003-fixed-missing-classes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Code &amp; Form code library 0001+ Google Code repository</title>
		<link>http://workshop.evolutionzone.com/2008/04/12/code-form-code-library-0001-google-code-repository/</link>
		<comments>http://workshop.evolutionzone.com/2008/04/12/code-form-code-library-0001-google-code-repository/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 12:44:19 +0000</pubDate>
		<dc:creator>marius watz</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Libraries]]></category>
		<category><![CDATA[Processing / Java]]></category>
		<category><![CDATA[codeandform]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[google code]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[processing.org]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[unlekkerlib]]></category>

		<guid isPermaLink="false">http://workshop.evolutionzone.com/2008/04/12/code-form-code-library-0001-google-code-repository/</guid>
		<description><![CDATA[Contents of <a href="http://code.google.com/p/codeandform/downloads/list" title="Code &#038; Form code library v0001">Code &#038; Form code library v0001</a> I&#8217;ve decided to put my Processing hacks from the <a href="http://workshop.evolutionzone.com/code-hacks/" title="Code &#038; hacks page">Code &#038; hacks page</a> and consolidate them into a downloadable archive. Thus the <a href="http://workshop.evolutionzone.com/codeandformcodelib/" title="Code &#038; Form code library">Code &#038; Form code library</a> is born. It will contain various demos and hacks, as well as example code for the unlekkerLib library. It should [...]]]></description>
			<content:encoded><![CDATA[<div class="flickrImg"><a href="http://code.google.com/p/codeandform/downloads/list" title='codeandformCodeLib 0001 Folder structure'><img src='http://workshop.evolutionzone.com/wp-content/uploads/2008/04/codeandform-001-folder-snapshot.gif' alt='Code &#038; Form Code library 0001 Folder structure' /></a></p>
<p>Contents of <a href="http://code.google.com/p/codeandform/downloads/list" title="Code &#038; Form code library v0001">Code &#038; Form code library v0001</a></p></div>
<p>I&#8217;ve decided to put my Processing hacks from the <a href="http://workshop.evolutionzone.com/code-hacks/" title="Code &#038; hacks page">Code &#038; hacks page</a> and consolidate them into a downloadable archive. Thus the <a href="http://workshop.evolutionzone.com/codeandformcodelib/" title="Code &#038; Form code library">Code &#038; Form code library</a> is born. It will contain various demos and hacks, as well as example code for the unlekkerLib library. It should be much easier to publish code this way, since students etc. can simply download the archive and dump the contents in their sketchbook folder for quick access.</p>
<p>I&#8217;ve started a <a href="http://code.google.com/p/codeandform/" title="Google Code repository">Google Code repository</a> for this purpose, which seems a good way to go. I&#8217;m still figuring out SVN etc, hopefully I can switch to publishing the unlekkerLib source &#8220;live&#8221; through SVN once I figure it out. I&#8217;ll also publish archives of code written during past workshops to the repository.</p>
<p><strong>There seems to be a growing list</strong> of Processing-related Google Code repositories out there, examples include Toxi&#8217;s <a href="http://code.google.com/p/toxiclibs/" title="Toxiclibs">Toxiclibs</a>, <a href="http://code.google.com/p/interfascia/" title="interfascia">interfascia</a> and <a href="http://code.google.com/p/jddaniels/" title="jddaniels">jddaniels</a>. Do a <a href="http://code.google.com/hosting/search?q=processing.org&#038;projectsearch=Search+Projects" title="search for processing.org">search for processing.org</a> to find more.</p>
]]></content:encoded>
			<wfw:commentRss>http://workshop.evolutionzone.com/2008/04/12/code-form-code-library-0001-google-code-repository/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Library: unlekkerLib-0002</title>
		<link>http://workshop.evolutionzone.com/2007/10/28/library-unlekkerlib-0002/</link>
		<comments>http://workshop.evolutionzone.com/2007/10/28/library-unlekkerlib-0002/#comments</comments>
		<pubDate>Sun, 28 Oct 2007 00:30:34 +0000</pubDate>
		<dc:creator>marius watz</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Libraries]]></category>
		<category><![CDATA[Processing / Java]]></category>

		<guid isPermaLink="false">http://workshop.evolutionzone.com/2007/10/28/library-unlekkerlib-0002/</guid>
		<description><![CDATA[I just posted a quick update to <a href="http://workshop.evolutionzone.com/unlekkerlib/" title="unlekkerLib">unlekkerLib</a>. It seems the first version I posted used Java 5 because I hadn&#8217;t configured Eclipse correctly. This version is compiled for 1.4. I have tested it with Processing 0125, but please give me feedback if it gives you trouble. I added two new functions to the library, [...]]]></description>
			<content:encoded><![CDATA[<p>I just posted a quick update to <a href="http://workshop.evolutionzone.com/unlekkerlib/" title="unlekkerLib">unlekkerLib</a>. It seems the first version I posted used Java 5 because I hadn&#8217;t configured Eclipse correctly. This version is compiled for 1.4. I have tested it with Processing 0125, but please give me feedback if it gives you trouble.</p>
<p>I added two new functions to the library, nothing big but could be useful for some people:</p>
<div class="mediumtitle">[071028] unlekkerLib-0002 features:</div>
<ul>
<li><strong>unlekker.data.POVRay:</strong> Primitive POV-Ray triangle geometry export.</li>
<li><strong>unlekker.data.FeedReader:</strong> Feed reading utility class (requires installing extra JARs)</li>
</ul>
<p>To use the feed classes simply use the code from <a href="http://workshop.evolutionzone.com/2007/09/24/code-read-rss-feed-in-processing/" title="this previous post">this previous post</a>, minus the class definitions.</p>
]]></content:encoded>
			<wfw:commentRss>http://workshop.evolutionzone.com/2007/10/28/library-unlekkerlib-0002/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New library: unlekkerLib</title>
		<link>http://workshop.evolutionzone.com/2007/09/24/unlekkerlib/</link>
		<comments>http://workshop.evolutionzone.com/2007/09/24/unlekkerlib/#comments</comments>
		<pubDate>Mon, 24 Sep 2007 17:12:45 +0000</pubDate>
		<dc:creator>marius watz</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Libraries]]></category>
		<category><![CDATA[Open source]]></category>
		<category><![CDATA[Processing / Java]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[processing.org]]></category>
		<category><![CDATA[rapid-prototyping]]></category>
		<category><![CDATA[stereolithography]]></category>
		<category><![CDATA[stl]]></category>
		<category><![CDATA[unlekkerlib]]></category>

		<guid isPermaLink="false">http://workshop.evolutionzone.com/2007/09/24/unlekkerlib/</guid>
		<description><![CDATA[<a href="http://flickr.com/photos/watz/sets/72157594387603246/" title="Rapid prototyping objects">Rapid prototyping objects</a> generated with Processing and output to STL using unlekkerLib. I&#8217;ve just uploaded a new Processing library called unlekkerLib. It is a collection of tools and code snippets I use frequently, and which I&#8217;ve now just barely cleaned up enough for other people to use. Instead of releasing them piece by piece, I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<div class="flickrImg"><a href="http://www.flickr.com/photos/watz/1416633393/" title="Photo Sharing"><img src="http://farm2.static.flickr.com/1346/1416633393_84b9b43838.jpg" width="500" height="375" alt="AHO RP 004 Object #1 - #3 [lo]" /></a></p>
<p><a href="http://flickr.com/photos/watz/sets/72157594387603246/" title="Rapid prototyping objects">Rapid prototyping objects</a> generated with Processing and output to STL using unlekkerLib.</p></div>
<p>I&#8217;ve just uploaded a new Processing library called unlekkerLib. It is a collection of tools and code snippets I use frequently, and which I&#8217;ve now just barely cleaned up enough for other people to use. Instead of releasing them piece by piece, I&#8217;ve decided to bundle them together in a package hierarchy. </p>
<p>The main reason I decided to release it now is the STL export code I&#8217;ve written for my <a href="http://flickr.com/photos/watz/sets/72157594387603246/" title="rapid prototyping">rapid prototyping</a> projects. Several people have asked for the code, so I wanted to get it out there for you to play with. Obviously, it works as well with Processing as it does with regular Java.</p>
<p>Caveat emptor:There&#8217;s not much documentation but I do provide the source code. This is v.0001 &#8211; the very first release, so it&#8217;s pretty basic. See below for an idea of what the library contains. Right now the most exciting new component is the unlekker.data.STL class, which supports export and import of STL stereolithography files for rapid prototyping. Have a look at the <a href="http://workshop.evolutionzone.com/files/unlekkerLibDoc" title="Javadoc">Javadoc</a> for more details. </p>
<p>Updates will appear here: <a href="http://workshop.evolutionzone.com/unlekkerlib/">http://workshop.evolutionzone.com/unlekkerlib/</a>.</p>
<p><span id="more-142"></span>
<div class="mediumtitle">[070924] unlekkerLib-0001 features:</div>
<ul>
<li><strong>unlekker.data.STL:</strong> STL import and export.</li>
<li><strong>unlekker.util.Rnd:</strong> Mersenne Twister pseudo-random number generator.</li>
<li><strong>unlekker.util.TileSaver:</strong> The TileSaver class for creating high-res images from OpenGL graphics by tiling the viewport.</li>
<li><strong>unlekker.geom.Intersect:</strong> Line intersection and checking for collision with complex 2D polygons.</li>
</ul>
<div class="mediumtitle">Installation</div>
<p>Download <a href="http://workshop.evolutionzone.com/files/unlekkerLib-0001.zip" title="unlekkerLib-0001.zip">unlekkerLib-0001.zip</a> and unpack it.</p>
<p>Copy the &quot;unlekker&quot; folder from the &#8220;00 For processing library folder&#8221; folder into the &quot;libraries&quot; subfolder of your Processing application. The library should now appear as a choice in &quot;Import library&quot; next time you start Processing. </p>
<p>The Java source can be found in &#8220;00 For processing library folder > unlekker> src&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://workshop.evolutionzone.com/2007/09/24/unlekkerlib/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Code: Read RSS feeds in Processing</title>
		<link>http://workshop.evolutionzone.com/2007/09/24/code-read-rss-feed-in-processing/</link>
		<comments>http://workshop.evolutionzone.com/2007/09/24/code-read-rss-feed-in-processing/#comments</comments>
		<pubDate>Mon, 24 Sep 2007 01:08:24 +0000</pubDate>
		<dc:creator>marius watz</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Libraries]]></category>
		<category><![CDATA[Processing / Java]]></category>
		<category><![CDATA[Workshops]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[pde]]></category>
		<category><![CDATA[processing.org]]></category>
		<category><![CDATA[rome]]></category>
		<category><![CDATA[rss]]></category>

		<guid isPermaLink="false">http://workshop.evolutionzone.com/2007/09/24/code-read-rss-feed-in-processing/</guid>
		<description><![CDATA[After suggesting to my AHO class that they consider using RSS feeds in Processing, I realized that there is actually no built-in functionality to do so. The XML class built into Processing is too basic to handle feeds, it seems. To remedy the situation I&#8217;ve cooked up a quick hack using the <a href="https://rome.dev.java.net/" title="ROME library">ROME library</a> for [...]]]></description>
			<content:encoded><![CDATA[<p>After suggesting to my AHO class that they consider using RSS feeds in Processing, I realized that there is actually no built-in functionality to do so. The XML class built into Processing is too basic to handle feeds, it seems. To remedy the situation I&#8217;ve cooked up a quick hack using the <a href="https://rome.dev.java.net/" title="ROME library">ROME library</a> for RSS / Atom syndication.</p>
<p>To run the code below you&#8217;ll need to download <a href="https://rome.dev.java.net/" title="ROME">ROME</a> and <a href="http://www.jdom.org/" title="JDOM">JDOM</a>. Make a &#8220;code&#8221; subfolder in your sketch and paste &#8220;jdom.jar&#8221; and &#8220;rome-*.jar&#8221; into it, then run the code as given. The FeedReader and FeedEntry convenience classes take care of parsing the feed and returning the entries with the most common fields included. Error checking is rudimentary, however.</p>
<div class="mediumtitle">Code &#8211; feedParser.pde</div>
<p><span id="more-141"></span>
<pre name="code" class="java">// feedParser.pde
//
// Reads RSS and Atom feeds. Requires ROME
// (https://rome.dev.java.net/)
// and JDOM (http://www.jdom.org/), just make
// a code folder and copy "jdom.jar" and "rome-*.jar"
// into it.
//
// Marius Watz - http://workshop.evolutionzone.com

import com.sun.syndication.feed.synd.*;
import com.sun.syndication.io.*;

FeedReader feed;
String feedurl;

void setup() {
  size(200, 200);

  // load feed
  feedurl="http://feeds.feedburner.com/CodeForm";
  println("Loading feed: "+feedurl);
  feed=new FeedReader(feedurl);

  // print feed data
  println("Feed: "+feed.title);
  println("------------------------------");
  println("Description: "+feed.description);
  println("\nNumber of entries: "+feed.numEntries);
  println("------------------------------");

  // print feed entries
  for(int i=0; i< feed.numEntries; i++) {
    println(i+": "+feed.entry[i]);
  }
}

class FeedReader {
  SyndFeed feed;
  String url,description,title;
  int numEntries;
  FeedEntry entry[];

  public FeedReader(String _url) {
    url=_url;
    try {
      feed=new SyndFeedInput().build(new XmlReader(new URL(url)));
      description=feed.getDescription();
      title=feed.getTitle();

      java.util.List entrl=feed.getEntries();
      Object [] o=entrl.toArray();
      numEntries=o.length;

      entry=new FeedEntry[numEntries];
      for(int i=0; i< numEntries; i++) {
        entry[i]=new FeedEntry((SyndEntryImpl)o[i]);
        println(i+": "+entry[i]);
      }
    }
    catch(Exception e) {
      println("Exception in Feedreader: "+e.toString());
      e.printStackTrace();
    }
  }

}

class FeedEntry {
  Date pubdate;
  SyndEntryImpl entry;
  String author, contents, description, url, title;
  public String newline = System.getProperty("line.separator");

  public FeedEntry(SyndEntryImpl _entry) {
    try {
      entry=_entry;
      author=entry.getAuthor();
      Object [] o=entry.getContents().toArray();
      if(o.length>0) contents=((SyndContentImpl)o[0]).getValue();
      else contents="[No content.]";

      description=entry.getDescription().getValue();
      if(description.charAt(0)==
        System.getProperty("line.separator").charAt(0))
          description=description.substring(1);

      url=entry.getLink();
      title=entry.getTitle();
      pubdate=entry.getPublishedDate();
    }
    catch(Exception e) {
      println("Exception in FeedEntry: "+e.toString());
      e.printStackTrace();
    }

  }

  public String toString() {
    String s;

    s="Title: "+title+newline+
      "URL: "+url+newline+
      "Date: "+pubdate.toString()+newline;

    if(description.length()>50)
      s+="Descr: ["+description.substring(0,50)+
        "...]"+newline;
    else s+="Descr: ["+description+"]"+newline;

    if(contents.length()>50)
      s+="Contents: ["+contents.substring(0,50)+
        "...]"+newline;
    else s+="Contents: ["+contents+"]"+newline;
    return s;
  }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://workshop.evolutionzone.com/2007/09/24/code-read-rss-feed-in-processing/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

