<?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>W:Blut &#187; library</title>
	<atom:link href="http://www.wblut.com/tags/library/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wblut.com</link>
	<description>Experiments in generative graphics</description>
	<lastBuildDate>Tue, 13 Dec 2011 18:12:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>

   <image>
    <title>W:Blut</title>
    <url>http://0.gravatar.com/avatar/f53eecb68a71cc8113e72e1e53c94f7d.png?s=48</url>
    <link>http://www.wblut.com</link>
   </image>
		<item>
		<title>Hemesh: hommage — disclaimer</title>
		<link>http://www.wblut.com/2011/01/03/hemesh-hommage-disclaimer/</link>
		<comments>http://www.wblut.com/2011/01/03/hemesh-hommage-disclaimer/#comments</comments>
		<pubDate>Mon, 03 Jan 2011 21:36:13 +0000</pubDate>
		<dc:creator>Frederik Vanhoutte</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Hemesh]]></category>
		<category><![CDATA[Inspiration]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[generative]]></category>
		<category><![CDATA[geometry]]></category>
		<category><![CDATA[hemesh]]></category>
		<category><![CDATA[library]]></category>

		<guid isPermaLink="false">http://www.wblut.com/?p=1466</guid>
		<description><![CDATA[A somewhat more serious post after the previous one (well, actually Matt Pearson’s previous post ). Sometimes you get wrapped up in writing a piece of code, getting it to work your only purpose. Inevitably you turn to existing code, ripping and tearing through it to get at its beating heart. With the internet providing [...]]]></description>
			<content:encoded><![CDATA[<div style="float:left; width:650px; padding-left:25px;">
<p>A somewhat more serious post after the previous one (well, actually Matt Pearson’s previous post <img src='http://www.wblut.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ). Sometimes you get wrapped up in writing a piece of code, getting it to work your only purpose. Inevitably you turn to existing code, ripping and tearing through it to get at its beating heart.</p>
<p>With the internet providing access to such an amount of information, it can be easy to forget where a particular solution came from. On the other hand, including complete generic libraries to benefit from a few classes in specific instances would quickly bloat any project. I tried to compile a list of code that was ravaged for the good of hemesh:</p>
<ol>
<li><a href="http://javolution.org/" class="liexternal">Javolution</a> is included in the hemesh distribution. This high-performance library offers fast, reliable alternatives for many of JAVA’s basic classes. Without FastTable and FastMap, hemesh would be a lot slower.</li>
<li><a href="http://www.savarese.com/software/libssrckdtree-j/" class="liexternal">libssrckdtree-j Generic k-d tree Java library</a>: only a barebone skeleton remains of this truly generic k-d tree implementation, wblut.kdtree.WB_KDTree and wblut.kdtree.WB_KDNeighbor. It provides lightning-fast closest-point calculation and degenerate-vertex checking. Although k-d tree algorithms are well-described, implementing a fast one yourself is a less than trivial task.</li>
<li><a href="http://www.cs.gmu.edu/~sean/research/" class="liexternal">Sean Luke's fast Mersenne Twister random number generator</a> is my preferred RNG throughout hemesh. For (my) convenience it is exposed through wblut.math.WB_MTRandom, WB_RandomDisc and WB_RandomSpherical.</li>
<li>Marius Watz’ <a href="http://workshop.evolutionzone.com/unlekkerlib/" class="liexternal">unlekkerLib</a> provided the foundation for the wblut.hemesh.HE_Mesh.saveToSTL function.</li>
<li>The Fortune’s sweep algorithm for 2D Voronoi is often discussed but rarely implemented. wblut.geom.WB_Voronoi2D is a bare-bones adaptation of <a href="http://shaneosullivan.wordpress.com/2007/04/05/fortunes-sweep-line-voronoi-algorithm-implemented-in-java/" class="liexternal">Zhenyu Pan's JAVA transcription</a> of Shane O’Sullivan’s C implementation
</li>
<li> <a href="http://www.cs.ubc.ca/~lloyd/java/quickhull3d.html" class="liexternal">John Lloyd’s QuickHull3D pack­age</a> makes a reappearance as a convex hull generator for the wblut.hemesh.modifiers.HEM_Wireframe joints.
</li>
</ol>
<p>Not only code is scavenged without mercy, a whole range of reference material on algorithms is scoured:</p>
<ol>
<li>The<a href="http://local.wasp.uwa.edu.au/~pbourke/" class="liexternal"> über-reference Paul Bourke</a>. Invaluable for many geometric algorithms, especially in HEC_IsoSurface.</li>
<li><a href="http://www.amazon.com/exec/obidos/tg/detail/-/1558607323?tag=realtimecolli-20" class="liexternal">Christer Ericson's Real-time Collision Detection</a> for many of the geometric datastructures and intersection algorithms in wblut.geom.</li>
<li><a href="http://www.cs.umbc.edu/~squire/" class="liexternal">Code provided by Jon Squire</a> served as the starting point for the basic platonic solid creators in wblut.hemesh.</li>
<li> <a href="http://www.flickr.com/photos/onecm/5142412580/" class="liexternal">Scloopy</a>’s reference to <a href="http://repository.tamu.edu/bitstream/handle/1969.1/548/etd-tamu-2004A-VIZA-mandal-1.pdf" class="lipdf">a paper by Mandal and Esan</a> proved just the thing I needed for wblut.hemesh.modifiers.HEM_Wireframe.</li>
<li> A thousand page tome has added its burden to my desk: <a href="http://www.amazon.com/Geometric-Computer-Graphics-Morgan-Kaufmann/dp/1558605940" class="liexternal">Geometric Tools for Computer Graphics</a> by Philip Schneider and David Eberly. Its contents are increasingly implemented in hemesh’s geometric backbone. If hemesh turns out to be stable, this book deserves the praise. If not,  it’s me that messed up somewhere…</li>
<li><a href="http://www.flickr.com/photos/imagedesmaths/" class="liexternal">David Marec</a> was so gracious to provide me with meticulously compiled vertex and connectitivity data for a whole host of polyhedra. Not only was the data flawless, it was also almost directly usable. A rare fortune indeed.
</li>
</ol>
<p>While hemesh grows into different areas, these lists will undoubtedly expand. I just hope the need for proper bookkeeping won’t spoil the fun of coding… </p>
</div>
<div style="clear:both;"></div>
]]></content:encoded>
			<wfw:commentRss>http://www.wblut.com/2011/01/03/hemesh-hommage-disclaimer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Share &amp;&amp; Tell</title>
		<link>http://www.wblut.com/2010/11/20/share-tell/</link>
		<comments>http://www.wblut.com/2010/11/20/share-tell/#comments</comments>
		<pubDate>Sat, 20 Nov 2010 15:53:36 +0000</pubDate>
		<dc:creator>Frederik Vanhoutte</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Hemesh]]></category>
		<category><![CDATA[Inspiration]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[construct]]></category>
		<category><![CDATA[generative]]></category>
		<category><![CDATA[geometry]]></category>
		<category><![CDATA[hemesh]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[subdivision]]></category>
		<category><![CDATA[voronoi]]></category>

		<guid isPermaLink="false">http://www.wblut.com/?p=1401</guid>
		<description><![CDATA[I’ve had the good fortune of being invited by Corneel Cannaerts to give a presentation on the first Share &#38;&#38; Tell hosted by dorkbot and timelab. Not really knowing what to talk about, I decided to take a gamble. What better way to discuss creative coding than using Processing to build the entire presentation. This [...]]]></description>
			<content:encoded><![CDATA[<div style="float:left; width:650px; padding-left:25px;">
<p>
I’ve had the good fortune of being invited by <a href="http://www.introspector.be/" class="liexternal">Corneel Cannaerts</a> to give a presentation on the first <a href="http://www.timelab.org/node/298" class="liexternal">Share &amp;&amp; Tell</a> hosted by <a href="http://www.timelab.org/dorkbot" class="liexternal">dorkbot</a> and <a href="http://www.timelab.org/" class="liexternal">timelab</a>. </p>
<p>
Not really knowing what to talk about, I decided to take a gamble. What better way to discuss creative coding than using Processing to build the entire presentation. This holds the risk of a crash-and-burn-with-audience. On the other hand, the alternative would’ve been Powerpoint. For a crowd of design-savvy individuals, a burning wreck is probably preferable.</p>
<p> For what it’s worth on its own, I’ve put it online. It’s a demonstration of the <a href="http://code.google.com/p/hemesh2010/downloads/list" class="liexternal">HE_Mesh</a> library built around the theme of surface division and space partitioning. The title <em>Division, The wrong way to draw a grid</em> was inspired by <a href="http://zenbullets.com/blog/" class="liexternal">Matt Pearson</a>’s upcoming book <a href="http://zenbullets.com/blog/?page_id=799" class="liexternal"><em>Generative Art: A Practical Guide Using Processing</em></a>.</p>
<p>The core idea of the presentation is that the traditional, <em>right</em> way to define a grid, a collection of points and explicit connectivity, doesn’t lend itself well to generative exploration. Modifying a grid while maintaining structural integrity requires extensive rulesets or hefty constraints. In my experience the code will turn out to be rigid and predictable. In another context this might be desirable. But generative and parametric algorithms differ from traditional art techniques.They are not meant to execute an idea, rather they should be tools to inspire and give new ideas.</p>
<p>I present two alternative approaches to a grid. Slides 4 to 10 handle the grid as a surface or volume divided by planar slices. While we lose some generality, the advantage of this dual representation is that it doesn’t break down under perturbation. The grid connectivity is implicitely defined by the slicing operations. We are completely free to devise rulesets without having to worry about integrity issues. The iterative construction technique, the surface or volume is divided into a growing collection of subsurfaces or subvolumes, opens new venues for further exploration by modifying the impact of each step.</p>
<p>Slides 11 to 16 expose a rather different approach. Constructs made with more or less global slicing operations are obviously geometric and hold little of the organic. Nature works on a local scale, bottom-up. The Voronoi construction of a grid reflects this locality. In a sense it’s another dual representation, this time defined by a collection of control points. The points themselves can be generated by any of a huge number of conceivable methods:pure math, physical particle simulation, autonomous agents, external data … The connectivity is implicitely defined by the process that generates the cells and handles noise in a robust way. Voronoi structures can also be easily nested, first generation cells further refined by local point configurations, adding another layer of depth. We humans have developed an acute sense of balance between the geometric and the organic. Voronoi divisions come pretty close to the sweet spot.
</p>
<p>The image of the Giant’s Causeway in slide 1 was taken from <a href="http://travel.spotcoolstuff.com/amazing-attraction/walk-along-the-giants-causeway/" class="liexternal">this site</a>. Unfortunately it’s not credited so I can’t properly acknowledge the photographer. The Causeway is a beautiful example of structure created by division rather than growth. Philip Ball gives a marvelous exposé on its origins in the third part, <a href="http://www.amazon.co.uk/Branches-Natures-patterns-tapestry-three/dp/0199237980" class="liexternal"><em>Branches</em></a> , of his trilogy <em>Nature’ Patterns</em>. I heartily recommend getting the entire trilogy.</p>
<p>
<strong>The presentation:</strong><br />
The image takes you to the Processing sketch itself. Use <em>up</em> and <em>down</em> to move from slide to slide. The slides typically respond to a mouse-click and/or the spacebar. Imagine some more or less coherent babble, invite some good friends over and you can relive the Share &amp;&amp; Tell experience right there and then in your own living room!</p>
</div>
<div style="clear:both;"></div>

<p><a href="http://www.wblut.com/constructs/shareAndTell/" class="liimagelink"><img src="http://www.wblut.com/blog/wp-content/2010/11/Panorama-950x890.jpg" alt="Share &amp;&amp; Tell" title="Share &amp;&amp; Tell" width="950" height="890" class="alignnone size-large wp-image-1402" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.wblut.com/2010/11/20/share-tell/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Hemesh : voronoi example</title>
		<link>http://www.wblut.com/2010/10/20/hemesh-voronoi-example/</link>
		<comments>http://www.wblut.com/2010/10/20/hemesh-voronoi-example/#comments</comments>
		<pubDate>Wed, 20 Oct 2010 20:55:33 +0000</pubDate>
		<dc:creator>Frederik Vanhoutte</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Hemesh]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[construct]]></category>
		<category><![CDATA[generative]]></category>
		<category><![CDATA[geometry]]></category>
		<category><![CDATA[half-edge]]></category>
		<category><![CDATA[hemesh]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[voronoi]]></category>

		<guid isPermaLink="false">http://www.wblut.com/?p=1265</guid>
		<description><![CDATA[hemesh 1.2.3 voronoi example]]></description>
			<content:encoded><![CDATA[<div style="float:left; width:400px;">
<p> <a href="http://www.wblut.com/constructs/voronoiExample/" class="liimagelink"><img src="http://www.wblut.com/blog/wp-content/2010/10/vorEx.jpg" alt="voronoi example" title="voronoi example" width="400" height="400"  /></a></p>

</div>

<div style="float:right; width:500px;">
<pre><code>
//requires hemesh 1.2.3
import wblut.hemesh.*;
import wblut.hemesh.modifiers.*;
import wblut.hemesh.creators.*;
import wblut.geom.*;

float[][] points;
int numpoints;
HE_Mesh container;
HE_Mesh[] cells;
int numcells;
WB_Plane P1,P2;

void setup() {
&nbsp;&nbsp;size(800,800,P3D);
&nbsp;&nbsp;//create a sphere
&nbsp;&nbsp;HEC_Geodesic geo=new HEC_Geodesic(this);
&nbsp;&nbsp;geo.setRadius(300).setLevel(2); 
&nbsp;&nbsp;container=new HE_Mesh(geo);
&nbsp;&nbsp;
&nbsp;&nbsp;//slice off most of both hemispheres
&nbsp;&nbsp;P1=new WB_Plane(new WB_Point(0,0,-10), new WB_Vector(0,0,1));
&nbsp;&nbsp;P2=new WB_Plane(new WB_Point(0,0,10), new WB_Vector(0,0,-1));
&nbsp;&nbsp;HEM_Slice s=new HEM_Slice().setPlane(P1);
&nbsp;&nbsp;container.modify(s);
&nbsp;&nbsp;s=new HEM_Slice().setPlane(P2);
&nbsp;&nbsp;container.modify(s);
&nbsp;&nbsp;
&nbsp;&nbsp;//generate points
&nbsp;&nbsp;numpoints=50;
&nbsp;&nbsp;points=new float[numpoints][3];
&nbsp;&nbsp;for(int i=0;i&lt;numpoints;i++) {
&nbsp;&nbsp;&nbsp;&nbsp;points[i][0]=random(-250,250);
&nbsp;&nbsp;&nbsp;&nbsp;points[i][1]=random(-250,250);
&nbsp;&nbsp;&nbsp;&nbsp;points[i][2]=random(-20,20);
&nbsp;&nbsp;}
&nbsp;&nbsp;
&nbsp;&nbsp;//generate voronoi cells
&nbsp;&nbsp;HEMC_VoronoiCells vcmc=new HEMC_VoronoiCells(this);
&nbsp;&nbsp;vcmc.setPoints(points).setContainer(container).setOffset(5);
&nbsp;&nbsp;cells=vcmc.create();
&nbsp;&nbsp;numcells=cells.length;
}

void draw() {
&nbsp;&nbsp;background(255);
&nbsp;&nbsp;lights();
&nbsp;&nbsp;translate(width/2,height/2,0);
&nbsp;&nbsp;rotateX(1f/height*mouseY*TWO_PI-PI);
&nbsp;&nbsp;rotateY(1f/width*mouseX*TWO_PI-PI);
&nbsp;&nbsp;drawFaces();
&nbsp;&nbsp;drawEdges();
}

void drawEdges(){
&nbsp;&nbsp;smooth();
&nbsp;&nbsp;stroke(0);
&nbsp;&nbsp;strokeWeight(2);
&nbsp;&nbsp;for(int i=0;i&lt;numcells;i++) {
&nbsp;&nbsp;&nbsp;&nbsp;cells[i].drawEdges();
&nbsp;&nbsp;} 
}

void drawFaces(){
&nbsp;&nbsp;noSmooth();
&nbsp;&nbsp;noStroke();
&nbsp;&nbsp;for(int i=0;i&lt;numcells;i++) {
&nbsp;&nbsp;&nbsp;&nbsp;fill(100+i,i,i);
&nbsp;&nbsp;&nbsp;&nbsp;cells[i].drawFaces();
&nbsp;&nbsp;}&nbsp;&nbsp; 
}

</code></pre>


</div>
<div style="clear:both"></div>]]></content:encoded>
			<wfw:commentRss>http://www.wblut.com/2010/10/20/hemesh-voronoi-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 11/20 queries in 0.059 seconds using disk: basic

Served from: www.wblut.com @ 2012-02-05 06:03:14 -->
