<?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>toxiclibs &#187; Featured</title>
	<atom:link href="http://toxiclibs.org/category/featured/feed/" rel="self" type="application/rss+xml" />
	<link>http://toxiclibs.org</link>
	<description>Building blocks for computational design</description>
	<lastBuildDate>Fri, 27 Aug 2010 10:01:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>CfP: Community showreel 2010</title>
		<link>http://toxiclibs.org/2010/08/cfp-community-showreel-2010/</link>
		<comments>http://toxiclibs.org/2010/08/cfp-community-showreel-2010/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 02:42:04 +0000</pubDate>
		<dc:creator>toxi</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Showcase]]></category>

		<guid isPermaLink="false">http://toxiclibs.org/?p=431</guid>
		<description><![CDATA[It&#8217;s this time of the year again &#8211; Showreel time! By now the project has grown to over 270+ classes distributed in 8 sub-libraries and especially this past year has seen the potential &#038; impact of these libs realised in different fields from architecture, education, generative product design to interactive installations, and that not just [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s this time of the year again &#8211; Showreel time! By now the project has grown to over 270+ classes distributed in 8 sub-libraries and especially this past year has seen the potential &#038; impact of these libs realised in different fields from architecture, education, generative product design to interactive installations, and that not just in the Processing based core-community.</p>
<p>So just like last year&#8217;s effort, I&#8217;d very much wish for and would like to produce another showreel of all the recent interesting projects &amp; experiments done by YOURSELVES with the various library packages. The aim of this undertaking is simply to create a record, a snapshot, some overview and inspiration for other (possibly new) users of these libs. <strong>To make this happen I really do need your help &amp; generous contributions in the form of footage, both video and still image assets.</strong> Finished projects are desirable, but often the work-in-progress stages are highly interesting too, so if possible, please do include these too. All work will be clearly credited and the reel will be premiered during <a href="http://www.flashonthebeach.com/sessions/index.php?pageid=2208" onclick="pageTracker._trackPageview('/outgoing/www.flashonthebeach.com/sessions/index.php?pageid=2208&amp;referer=');">my talk</a> at <a href="http://www.flashonthebeach.com" onclick="pageTracker._trackPageview('/outgoing/www.flashonthebeach.com?referer=');">Flash On The Beach</a> on September 27, 2010. Afterwards the video will be hosted on Vimeo.</p>
<p>Like last year, the guidelines are remaining as follows:</p>
<ul>
<li>only submit projects you&#8217;ve worked on/own rights to/have permission to include</li>
<li>project name, client (if any), year, author(s), project URL</li>
<li>list of toxiclibs package(s) used</li>
<li>video resolution 1280&#215;720 (if possible, lower res might be fine too)</li>
<li>screenshots/photos (if you have stills only, more than one would be extremely helpful)</li>
<li>(optional) your vimeo username for crediting using their system</li>
</ul>
<p><strong>Please get in touch via email: toxiclibs at postspectacular dot com</strong></p>
<p>I can provide FTP upload space if you don&#8217;t have any yourself. Alternatively, you might want to sign up with <a href="http://aws.amazon.com/s3/" onclick="pageTracker._trackPageview('/outgoing/aws.amazon.com/s3/?referer=');">Amazon S3</a>, <a href="http://dropbox.com/" onclick="pageTracker._trackPageview('/outgoing/dropbox.com/?referer=');">Dropbox</a>, <a href="http://box.net" onclick="pageTracker._trackPageview('/outgoing/box.net?referer=');">Box.net</a> or similar services&#8230;</p>
<p><strong>Entry deadline is: Monday 20 September 2010, 12:00pm GMT</strong></p>
<p>Your help is v.appreciated &#038; I shall thank you dearly!!!!</p>
<p>Once more for the record, here&#8217;s the previous reel from 2009&#8230;</p>
<p><object width="680" height="382"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=6644720&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=6644720&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="680" height="382"></embed></object><br /></p>
]]></content:encoded>
			<wfw:commentRss>http://toxiclibs.org/2010/08/cfp-community-showreel-2010/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Upcoming: The Winged-Edge mesh class</title>
		<link>http://toxiclibs.org/2010/08/wingededge-mesh/</link>
		<comments>http://toxiclibs.org/2010/08/wingededge-mesh/#comments</comments>
		<pubDate>Sat, 07 Aug 2010 12:02:56 +0000</pubDate>
		<dc:creator>toxi</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[core]]></category>

		<guid isPermaLink="false">http://toxiclibs.org/?p=406</guid>
		<description><![CDATA[Just earlier this week I finished a project for which I needed to work with quite large 3D meshes (2 million+ triangles). The meshes needed to be stored in such a way that one can efficiently navigate from a given vertex to its various neighbours and so forth (e.g. for use in a steering system)&#8230; [...]]]></description>
			<content:encoded><![CDATA[<p>Just earlier this week I finished a project for which I needed to work with quite large 3D meshes (2 million+ triangles). The meshes needed to be stored in such a way that one can efficiently navigate from a given vertex to its various neighbours and so forth (e.g. for use in a steering system)&#8230; So a <a href="http://en.wikipedia.org/wiki/Breadth-first_search" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Breadth-first_search?referer=');">traversal graph</a> was needed and I&#8217;ve finally implemented the <a href="http://en.wikipedia.org/wiki/Polygon_mesh#Winged-Edge_Meshes" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Polygon_mesh_Winged-Edge_Meshes?referer=');">Winged-Edge structure</a> on top the existing <a href="http://hg.postspectacular.com/toxiclibs/src/tip/src.core/toxi/geom/mesh/TriangleMesh.java" onclick="pageTracker._trackPageview('/outgoing/hg.postspectacular.com/toxiclibs/src/tip/src.core/toxi/geom/mesh/TriangleMesh.java?referer=');">TriangleMesh class in toxiclibs</a>, something I&#8217;ve been meaning to do for a long while.</p>
<p>Having connectivity information for each vertex, edge and face of the mesh allows for a whole wide range of new, exciting applications and my first exploration on this front deals with various subdivision and mesh smoothing strategies and their use as generative modeling tools&#8230; I&#8217;m currently developing an extensible architecture to make this system as flexible as possible and you&#8217;ll be able to create your own custom strategies to decide about the location of new vertices, but without having to deal with any of the actual subdivision complexities itself, like splitting edges &#038; faces. The same interface pattern thinking is also applied to mesh smoothing and currently I&#8217;ve implemented <a href="http://en.wikipedia.org/wiki/Laplacian_smoothing" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Laplacian_smoothing?referer=');">Laplacian smoothing</a> and am working on other options as well&#8230; </p>
<p>All this should be very interesting for all users with a more architectural background, but IMHO has also lots of potential for those creating digital fabrication tools. If you have any interest in this and/or some useful pointers to share, please do get in touch! </p>
<p>Pending further testing, this new mesh structure and support architecture will available in the next release (0020)&#8230;</p>
<p><object width="680" height="382"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=13950132&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=13950132&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="680" height="382"></embed></object><br /></p>
<p>The mesh in the video and the examples below are using normal shading to help verifying the correctness of the edge/face splitting algorithm. Each vertex is tinted using its normal vector XYZ components interpreted as RGB color intensities.</p>
<p><a href="http://www.flickr.com/photos/toxi/sets/72157624566599422/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/toxi/sets/72157624566599422/?referer=');"><img src="http://toxiclibs.org/wp-content/uploads/2010/08/toxi.test_.SubdivTest013-680x396.png" alt="" title="toxi.test.SubdivTest013" width="680" height="396" class="alignnone size-large wp-image-409" /></a></p>
<p><a href="http://www.flickr.com/photos/toxi/sets/72157624566599422/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/toxi/sets/72157624566599422/?referer=');"><img src="http://toxiclibs.org/wp-content/uploads/2010/08/toxi.test_.SubdivTest014-680x394.png" alt="" title="toxi.test.SubdivTest014" width="680" height="394" class="alignnone size-large wp-image-410" /></a></p>
<p>These following images show a displacement-subdivided cube with (right) &#038; without (left) mesh smoothing applied&#8230;</p>
<p><a href="http://www.flickr.com/photos/toxi/sets/72157624566599422/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/toxi/sets/72157624566599422/?referer=');"><img src="http://toxiclibs.org/wp-content/uploads/2010/08/toxi.test_.SubdivTest015-303x175.png" alt="" title="toxi.test.SubdivTest015" width="303" height="175" class="alignnone size-medium wp-image-411" /></a> <a href="http://www.flickr.com/photos/toxi/sets/72157624566599422/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/toxi/sets/72157624566599422/?referer=');"><img src="http://toxiclibs.org/wp-content/uploads/2010/08/toxi.test_.SubdivTest016-303x175.png" alt="" title="toxi.test.SubdivTest016" width="303" height="175" class="alignnone size-medium wp-image-412" /></a></p>
<p>Some slightly older experiments from the early stages of developing the system. These meshes started out as a simple 8-point cube, subdivided 4-5 levels and then rendered as VBOs with standard gouroud shading&#8230;</p>
<p><a href="http://www.flickr.com/photos/toxi/4821906878/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/toxi/4821906878/?referer=');"><img alt="" src="http://farm5.static.flickr.com/4143/4821906878_6b4897b3c9_b.jpg" title="winged-edge mesh subdivision" class="alignnone" width="680" /></a></p>
<p><a href="http://www.flickr.com/photos/toxi/4821305417" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/toxi/4821305417?referer=');"><img alt="" src="http://farm5.static.flickr.com/4098/4821305417_54645e84e3_b.jpg" title="winged-edge mesh" class="alignnone" width="680" /></a></p>
<p><a href="http://www.flickr.com/photos/toxi/4821283185" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/toxi/4821283185?referer=');"><img alt="" src="http://farm5.static.flickr.com/4137/4821283185_1b4c3a34be_b.jpg" title="winged-edge mesh" class="alignnone" width="680" /></a></p>
<p><a href="http://www.flickr.com/photos/toxi/4821304053" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/toxi/4821304053?referer=');"><img alt="" src="http://farm5.static.flickr.com/4076/4821304053_f977aa3d5f_b.jpg" title="winged-edge mesh" class="alignnone" width="680" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://toxiclibs.org/2010/08/wingededge-mesh/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Olhares de Processing: Porto workshop</title>
		<link>http://toxiclibs.org/2010/06/olhares-de-processing-porto-workshop/</link>
		<comments>http://toxiclibs.org/2010/06/olhares-de-processing-porto-workshop/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 16:14:04 +0000</pubDate>
		<dc:creator>toxi</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[workshop]]></category>

		<guid isPermaLink="false">http://toxiclibs.org/?p=336</guid>
		<description><![CDATA[Before it gets too quiet here (sorry about that recent work &#38; travel-induced hiatus, there&#8217;re loads of updates coming), I&#8217;m super happy to announce details of the next workshop related to this project, incl. a preliminary outline/focus topics for us to get our teeth into. This upcoming workshop is entitled Olhares de Processing (Glimpses of [...]]]></description>
			<content:encoded><![CDATA[<p>Before it gets too quiet here (sorry about that recent work &amp; travel-induced hiatus, there&#8217;re <strong>loads</strong> of updates coming), I&#8217;m super happy to announce details of the next workshop related to this project, incl. a preliminary outline/focus topics for us to get our teeth into. This upcoming workshop is entitled <a href="http://bit.ly/olharesdeprocessing" onclick="pageTracker._trackPageview('/outgoing/bit.ly/olharesdeprocessing?referer=');">Olhares de Processing</a> (Glimpses of Processing) and will take place at the <a href="http://artes.ucp.pt/en/" onclick="pageTracker._trackPageview('/outgoing/artes.ucp.pt/en/?referer=');">School of Arts @ Universidade Católica Portuguesa Porto</a> in conjunction with the <a href="http://olhares-outono.ucp.pt" onclick="pageTracker._trackPageview('/outgoing/olhares-outono.ucp.pt?referer=');">Festival de Artes Digitais Olhares de Outono</a>.</p>
<p>Mark these dates in your calendar: <strong>July 12-18th 2010</strong> &#8211; It&#8217;s going to be a whole 7 long days of code crafting in the north of Portugal and I&#8217;m looking very forward to it! The workshop is limited to 14 participants. Bookings are handled by the University and should be done via their <a href="http://bit.ly/olharesdeprocessing" onclick="pageTracker._trackPageview('/outgoing/bit.ly/olharesdeprocessing?referer=');">special website</a>. Thank you dearly!</p>
<p>The planned outline is below the poster I made for this unique occasion, so please do read on:</p>
<p><img class="alignnone size-full wp-image-345" title="olhares_poster_a0" src="http://toxiclibs.org/wp-content/uploads/2010/06/olhares_poster_a0.jpg" alt="Workshop poster" width="680" height="920" /></p>
<p>The general idea is to split our time into 4 days of intense tutorials and hands-on examination of core principles &amp; techniques of the computational design approach in the context of creating &#8220;generative identities&#8221;, without prescribing too much what shape &amp; form these should take. Part of our workshop&#8217;s remit is also to enquire the current possibilities. The final 3 days will then be used to build your own project(s) to be use for the Olhares de Outono festival later in November.</p>
<p>The topics listed below are not set in stone and we&#8217;ll decide as group on what to focus (much depends on the skills &amp; interests of the participants). Similarly, if you&#8217;d like to experiment/include external devices into your project (Wiimote, Arduino), please bring them along. The workshop space is equipped with iMacs, but there&#8217;re also a couple of spaces to use your own machine as well&#8230; At the end of the workshop, we all should have at least one completed (if not polished) project for the festival, and should strive to document it (the project) too.</p>
<h3>Day 1: Getting ready</h3>
<h4 id="Processing">Processing</h4>
<ul>
<li>recap of basics
<ul>
<li>types</li>
<li>structures</li>
<li>working with libraries</li>
<li>exporting</li>
</ul>
</li>
</ul>
<ul>
<li>scope
<ul>
<li>learning curve</li>
<li>use as environment (PDE)</li>
<li>use online vs. offline</li>
<li>use as library in larger frameworks</li>
<li>P5 within the bigger picture
<ul>
<li>JavaScript</li>
<li>Java (Android)</li>
<li>OpenFrameworks</li>
<li>Cinder</li>
</ul>
</li>
</ul>
</li>
</ul>
<h4 id="Toxiclibs">Toxiclibs</h4>
<ul>
<li>Overview</li>
<li>Recent updates</li>
<li>Philosophy</li>
<li>Resources</li>
<li>Use cases</li>
<li>Exercises
<ul>
<li>Key techniques/classes</li>
<li>Layering processes/Combining modules</li>
<li>Easier handling in Processing</li>
</ul>
</li>
</ul>
<h4 id="OOP">OOP</h4>
<ul>
<li>Concepts
<ul>
<li>Interfaces</li>
<li>Inheritance</li>
<li>Polymorphism</li>
<li>Encapsulation</li>
</ul>
</li>
</ul>
<ul>
<li>Best practices
<ul>
<li>Events</li>
<li>Architecture</li>
<li>Design patterns</li>
<li>Anti patterns</li>
<li>Reusability</li>
<li>Open source</li>
</ul>
</li>
</ul>
<h4 id="Eclipse">Eclipse</h4>
<ul>
<li>overview</li>
<li>project setup</li>
<li>using Processing as lib only</li>
<li>editor features
<ul>
<li>code completion</li>
<li>navigation</li>
<li>refactoring</li>
</ul>
</li>
</ul>
<h3 id="Day2Workingwithdata">Day 2: Working with data</h3>
<h4 id="datamodellingprocessing">Data modelling/processing</h4>
<ul>
<li>Collections
<ul>
<li>Hashmaps
<ul>
<li>Histograms:
<ul>
<li>Images, FFT</li>
<li>Tag clouds</li>
</ul>
</li>
</ul>
</li>
<li>Lists
<ul>
<li>Iterators</li>
</ul>
</li>
<li>Queues
<ul>
<li>Priority based processing</li>
<li>Pipes</li>
<li>Stacks</li>
</ul>
</li>
<li>Trees
<ul>
<li>recursion</li>
<li>sorted sets using comparators
<ul>
<li>sort by custom criteria</li>
<li>spatial subdivision (quadtree, octree etc.)</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<ul>
<li>XML
<ul>
<li>standard formats
<ul>
<li>Atom</li>
<li>RSS</li>
</ul>
</li>
<li>code generation from data model
<ul>
<li>XML Schema</li>
<li>JAXB</li>
</ul>
</li>
<li>Defining your own formats
<ul>
<li>Loading/saving app state</li>
<li>Presets</li>
<li>Configuration</li>
</ul>
</li>
</ul>
</li>
</ul>
<ul>
<li>
<ul>
<li>Aggregation
<ul>
<li>merging of sources and/or time samples</li>
<li>set theory
<ul>
<li>union</li>
<li>intersection</li>
<li>difference</li>
<li>relationships (1:1, 1:N, N:M)</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<h4 id="Visualisation">Visualisation</h4>
<ul>
<li>basic graph theory</li>
<li>finding &amp; creating metaphors</li>
<li>techniques
<ul>
<li>geometry basics</li>
<li>coordinate systems
<ul>
<li>spherical (Geomapping example)</li>
<li>polar (color transforms)</li>
<li>cartesian</li>
</ul>
</li>
<li>vector maths</li>
<li>mapping/geometric transformations
<ul>
<li>M-&gt;N dimensions</li>
<li>time -&gt; space</li>
</ul>
</li>
<li>mesh generation</li>
</ul>
</li>
<li>animation
<ul>
<li>interpolation curves</li>
<li>state transitions</li>
<li>viewport changes
<ul>
<li>transformation matrix</li>
<li>camera control (e.g. 3rd person camera)</li>
</ul>
</li>
</ul>
</li>
<li>exporting data
<ul>
<li>high res bitmap</li>
<li>PDF</li>
<li>image sequence + automatic FFMPEG assembly</li>
<li>3D data for digital fabrication</li>
</ul>
</li>
</ul>
<h3 id="Day3Interactions">Day 3: Interactions</h3>
<p>Building on previous day exercises</p>
<h4 id="HCI">HCI</h4>
<ul>
<li>Wiimote</li>
<li>Mobile</li>
<li>Computer vision</li>
<li>TUIO / OSC
<ul>
<li>
<ul>
<li>multitouch</li>
<li>reacTIVision</li>
<li>external devices</li>
</ul>
</li>
</ul>
</li>
<li>QRCodes</li>
<li>Location triggers
<ul>
<li>GPS/compass based AR</li>
</ul>
</li>
<li>Serial input
<ul>
<li>Firmata</li>
</ul>
</li>
</ul>
<h4 id="Machinemachineinteractions">Machine-machine interactions</h4>
<ul>
<li>asynchronous event handling
<ul>
<li>twitter updates</li>
<li>reacting to Pachube sensor data</li>
</ul>
</li>
<li>multi-threading</li>
<li>network communications/protocols
<ul>
<li>UDP</li>
<li>OSC</li>
</ul>
</li>
</ul>
<h3 id="Day4Generativetechniques">Day 4: Generative techniques</h3>
<p>Building on previous day exercises</p>
<h4 id="Processesasdesigntools">Processes as design tools</h4>
<ul>
<li>inputs
<ul>
<li>observation</li>
<li>abstraction</li>
<li>mental model building</li>
</ul>
</li>
<li>behaviour
<ul>
<li>parametrization</li>
<li>rules</li>
<li>feedback</li>
</ul>
</li>
<li>simulation
<ul>
<li>agents</li>
<li>automata</li>
<li>erosion</li>
<li>fluids</li>
<li>particles</li>
<li>physics</li>
</ul>
</li>
<li>randomness
<ul>
<li>balance of control</li>
<li>bias</li>
<li>chaos vs. determinism</li>
<li>role of authorship?</li>
<li>techniques &amp; differences</li>
</ul>
</li>
</ul>
<h3 id="Day57Workonownprojects">Day 5-7: Work on own projects</h3>
<h4>Process</h4>
<ul>
<li>If possible form pairs/groups</li>
<li>2 reviews/status reports/discussion per day with all<br />
participants</li>
<li>Karsten giving help &amp; support to all groups</li>
<li>Final review and presentation on Sunday PM</li>
<li>Project documentations</li>
</ul>
<p>And once again, please head over to <a href="http://bit.ly/olharesdeprocessing" onclick="pageTracker._trackPageview('/outgoing/bit.ly/olharesdeprocessing?referer=');">this site</a> for further organisational things &amp; the signup form&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://toxiclibs.org/2010/06/olhares-de-processing-porto-workshop/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>simutils-0001: Gray-Scott reaction diffusion</title>
		<link>http://toxiclibs.org/2010/02/simutils-grayscott/</link>
		<comments>http://toxiclibs.org/2010/02/simutils-grayscott/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 08:05:39 +0000</pubDate>
		<dc:creator>toxi</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Usage]]></category>
		<category><![CDATA[colorutils]]></category>
		<category><![CDATA[simutils]]></category>
		<category><![CDATA[volumeutils]]></category>

		<guid isPermaLink="false">http://toxiclibs.org/?p=217</guid>
		<description><![CDATA[This is part 2 of the discussion of the classes &#38; processes provided by the recently released simutils package. The first part of this series dealt with Diffusion-limited Aggregation (DLA) and this next process too is related to the simulated diffusion of particles. However, whereas the DLA process dealt with individual particles, this next one [...]]]></description>
			<content:encoded><![CDATA[<p>This is part 2 of the discussion of the classes &amp; processes provided by the recently released <a href="http://toxiclibs.org/category/simutils/">simutils</a> package. <a href="http://toxiclibs.org/2010/02/new-package-simutils/">The first part of this series dealt with Diffusion-limited Aggregation</a> (DLA) and this next process too is related to the simulated diffusion of particles. However, whereas the DLA process dealt with individual particles, this next one is only looking at the concentrations of particles of different &#8220;substances&#8221; in a two-dimensional simulation space.</p>
<p>The Gray-Scott reaction diffusion model is a member of a whole variety of <a href="http://en.wikipedia.org/wiki/Reaction-diffusion_system" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Reaction-diffusion_system?referer=');">RD systems</a>, popular largely due to its ability to produce a very varied number of biological looking (and behaving) patterns, both static and constantly changing. Some patterns are reminiscent of cell devision, gastrulation or the formation of spots &amp; stripes on furry animals. As with all RD models, these patterns are the result of an iterative process evaluating each cell of the simulation space based on the concentrations of the two main parameters (for Gray-Scott usually named <strong>f</strong> and <strong>K</strong>) of the reaction equation as well as taking into account the concentrations of these 2 substances in neighboring cells. So conceptually the reaction diffusion system lies somewhere between the isolated DLA process working with individual particles and the entirely rulebased evaluation of a cell&#8217;s neighborhood in traditional cellular automatas, which we will deal with in the next post.</p>
<p>The image below, by <a href="http://mrob.com/pub/comp/xmorphia/" onclick="pageTracker._trackPageview('/outgoing/mrob.com/pub/comp/xmorphia/?referer=');">Robert Munafo</a>, is a fantastically helpful map of possible patterns resulting from various combinations of the <strong>f</strong> and <strong>K</strong> coefficients. Click the image to go to his website and explore the parameters in more detail (there&#8217;re close-ups and videos of all interesting combinations).</p>
<p><a href="http://mrob.com/pub/comp/xmorphia/" onclick="pageTracker._trackPageview('/outgoing/mrob.com/pub/comp/xmorphia/?referer=');"><img class="alignnone size-large wp-image-245" title="gs-parameter-map" src="http://toxiclibs.org/wp-content/uploads/2010/02/gs-parameter-map-680x680.jpg" alt="GS parameter map" width="680" height="680" /></a></p>
<p>As with the other classes of the <a href="http://toxiclibs.org/category/simutils/">simutils</a> package, the GrayScott implementation comes with several small demos to help you get started. The most basic use case (<a href="http://code.google.com/p/toxiclibs/source/browse/trunk/toxiclibs/examples/sim/HelloGrayScott/HelloGrayScott.pde" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/toxiclibs/source/browse/trunk/toxiclibs/examples/sim/HelloGrayScott/HelloGrayScott.pde?referer=');">HelloGrayScott</a>) is just setting up a simulation with default parameters and then allows you to draw in the simulation space with the mouse. Each frame, the reaction is updated, its new state translated into grayscale pixels and then rendered to the screen. The important thing to know here is that there&#8217;re 2 separate results states available, normally called the <strong>u</strong> and <strong>v</strong> buffers.</p>
<pre class="brush:java">
GrayScott gs;

// create a new simulation instance
// the "false" refers to a non-tiled space with walls
// set to true to create tiling patterns
gs=new GrayScott(width,height,false);

// configure the simulation params to:
// f=0.023, K=0.074
// diffusion speed for u buffer = 0.095
// diffusion speed for u buffer = 0.03
gs.setCoefficients(0.023,0.074,0.095,0.03);
</pre>
<p>The main <code>draw()</code> loop then just does this:</p>
<pre class="brush:java">
void draw() {
  if (mousePressed) {
    // set cells around mouse pos to max saturation
    gs.setRect(mouseX, mouseY,20,20);
  }
  loadPixels();
  // update simulation by 10 time steps per frame
  for(int i=0; i&lt;10; i++) gs.update(1);
  // read out the v buffer and translate into grayscale colors
  for(int i=0; i&lt;gs.v.length; i++) {
    float cellValue=gs.v[i];
    // the cell values in v are usually in the range 0.0 .. 0.33
    int col=255-(int)(min(255,cellValue*768));
    // use the col value for red, green and blue and set alpha to full opacity
    pixels[i]=col&lt;&lt;16|col&lt;&lt;8|col|0xff000000;
  }
  updatePixels();
}
</pre>
<p>To avoid this manual pixel pushing and enable us to make some of the subtle changes of densities more obvious, we can also use the handy (and also new) <a href="http://code.google.com/p/toxiclibs/source/browse/trunk/toxiclibs/src.color/toxi/color/ToneMap.java" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/toxiclibs/source/browse/trunk/toxiclibs/src.color/toxi/color/ToneMap.java?referer=');"><code>ToneMap</code></a> class of the <a href="http://toxiclibs.org/category/colorutils/">colorutils</a> package. This allows us to map a number range to different positions (colors) on a multi-color gradient and so potentially better visualize the different densities. The basic usage of this class is shown below:</p>
<pre class="brush:java">
import toxi.color.*;

ToneMap toneMap;

// define a color gradient by adding colors at certain key points
// a gradient is like a 1D array with target colors at certain points
// all inbetween values are automatically interpolated (customizable too)
// this gradient here will contain 256 values
ColorGradient gradient=new ColorGradient();
gradient.addColorAt(0, NamedColor.BLACK);
gradient.addColorAt(128, NamedColor.RED);
gradient.addColorAt(192, NamedColor.YELLOW);
gradient.addColorAt(255, NamedColor.WHITE);

// now create a ToneMap instance using this gradient
// this maps the value range 0.0 .. 0.33 across the entire gradient width
// a 0.0 input value will be black, 0.33 white
toneMap=new ToneMap(0, 0.33, gradient);
</pre>
<p>Now we can refactor our Gray-Scott rendering code into something even simpler:</p>
<pre class="brush:java">
for(int i=0; i&lt;gs.v.length; i++) {
    // take a GS v value and turn it into a packed integer ARGB color value
    pixels[i]=toneMap.getARGBToneFor(gs.v[i]);
}
</pre>
<p>Btw. The <code>ToneMap</code> class is a nice example of the whole reusable &#8220;building block philosophy&#8221; of toxiclibs (and the object oriented approach in general). The class is simply a <a href="http://en.wikipedia.org/wiki/Object_composition" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Object_composition?referer=');">composition</a> of other library classes and under the hood delegates everything to these elements:</p>
<p><img src="http://toxiclibs.org/wp-content/uploads/2010/02/tonemap.png" alt="ToneMap composition" title="ToneMap composition" width="379" height="266" class="aligncenter size-full wp-image-275" /></p>
<p>All other GrayScott demos, as well as all Cellular Automata examples, make use of this ToneMap class, so do have a look at those for more reference&#8230; </p>
<p>Since a homogeneous configuration of the entire sim grid will always just provide one particular character/patterning, the <code>GrayScott</code> class has been designed with extension in mind. The <a href="http://code.google.com/p/toxiclibs/source/browse/trunk/toxiclibs/examples/sim/CustomGrayScott/CustomGrayScott.pde" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/toxiclibs/source/browse/trunk/toxiclibs/examples/sim/CustomGrayScott/CustomGrayScott.pde?referer=');">CustomGrayScott</a> demo shows how to impose a pattern on the actual simulation parameters themselves, so that cells at different positions are evaluated using different parameters:</p>
<pre class="brush:java">
class PatternedGrayScott extends GrayScott {

  // our constructor just passes things on to the parent class
  PatternedGrayScott(int w, int h, boolean tiling) {
    super(w,h,tiling);
  }

  // this function is called for each cell
  // to retrieve its f coefficient
  public float getFCoeffAt(int x, int y) {
    // here we only take the x coordinate
    // and choose one of 2 options (even &#038; odd)
    x/=32;
    return 0==x%2 ? f : f-0.005;
  }

  // this function is called for each cell
  // to retrieve its K coefficient
  public float getKCoeffAt(int x, int y) {
    // here we only use the y coordinate
    // and create a gradient falloff for this param
    return k-y*0.00004;
  }
}
</pre>
<p>Instead of using the default GrayScott class, we only need to change one line in the setup() method to use our extended version instead:</p>
<pre class="brush:java">
GrayScott gs;

void setup() {
	size(200,200);
	gs=new PatternedGrayScott(width,height,false);
	...
}
</pre>
<p>The result of this is shown below&#8230; Easy, huh? :)</p>
<p><img class="alignnone size-full wp-image-193" title="CustomGrayScott001" src="http://toxiclibs.org/wp-content/uploads/2010/02/CustomGrayScott001.png" alt="" width="680" height="362" /></p>
<p>Having this mechanism in place, it can be also used to create more interesting types of masking. For a commission to produce a <a href="http://postspectacular.com/work/printmag/" onclick="pageTracker._trackPageview('/outgoing/postspectacular.com/work/printmag/?referer=');">cover design for Print Magazine</a> in 2008, I generated a type face from simple line &#038; arc segments and used it as mask to manipulate the concentrations of the f &#038; K parameters to achieve two different types of patterning: one for the inside of the letter shapes, the other for the outside&#8230;</p>
<p><object width="680" height="383"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=1272071&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=1272071&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="680" height="383"></embed></object><br /></p>
<p>The frames of that animation were then stacked up along the Z axis in 3D space and with the help of the <a href="http://toxiclibs.org/category/volumeutils/">volumeutils</a> classes turned into 3D mesh, <a href="http://code.google.com/p/toxiclibs/source/browse/trunk/toxiclibs/src.core/toxi/geom/util/STLWriter.java" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/toxiclibs/source/browse/trunk/toxiclibs/src.core/toxi/geom/util/STLWriter.java?referer=');">exported as STL format</a> (also see <a href="http://toxiclibs.org/docs/core/toxi/geom/util/TriangleMesh.html#saveAsSTL%28java.lang.String%29">TriangleMesh.saveAsSTL()</a>) and finally fabricated into the physical, 3D printed sculpture shown below. In a way, the sculpture can be seen as a map of its entire creation process&#8230;</p>
<p><img class="size-full wp-image-237" title="typeform_square_680" src="http://toxiclibs.org/wp-content/uploads/2010/02/typeform_square_680.jpg" alt="Type &amp; Form sculpture" width="680" height="680" /></p>
<p>Here&#8217;re some more rendered detail shots of the sculpture. <a href="http://postspectacular.com/work/printmag/" onclick="pageTracker._trackPageview('/outgoing/postspectacular.com/work/printmag/?referer=');">More information about this project is here</a> and the <a href="http://www.flickr.com/photos/toxi/sets/72157604724789091/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/toxi/sets/72157604724789091/?referer=');">related flickr set</a>.</p>
<p><img class="aligncenter size-full wp-image-265" title="typeform_detail1" src="http://toxiclibs.org/wp-content/uploads/2010/02/typeform_detail1.jpg" alt="" width="680" height="382" /></p>
<p><img src="http://toxiclibs.org/wp-content/uploads/2010/02/typeform_detail2.jpg" alt="" title="typeform_detail2" width="680" height="382" class="aligncenter size-full wp-image-266" /></p>
<p>Finally, the <a href="http://code.google.com/p/toxiclibs/source/browse/trunk/toxiclibs/examples/sim/GrayScottImage/GrayScottImage.pde" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/toxiclibs/source/browse/trunk/toxiclibs/examples/sim/GrayScottImage/GrayScottImage.pde?referer=');"><code>GrayScottImage</code></a> demo shows another supported technique of using the library: the seeding of the simulation using a bitmap image.</p>
<p><img class="alignnone size-full wp-image-194" title="GrayScottImage002" src="http://toxiclibs.org/wp-content/uploads/2010/02/GrayScottImage002.png" alt="" width="680" height="362" /></p>
]]></content:encoded>
			<wfw:commentRss>http://toxiclibs.org/2010/02/simutils-grayscott/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>toxiclibs community showreel</title>
		<link>http://toxiclibs.org/2009/09/toxiclibs-showreel/</link>
		<comments>http://toxiclibs.org/2009/09/toxiclibs-showreel/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 19:14:57 +0000</pubDate>
		<dc:creator>toxi</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Showcase]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[branding]]></category>
		<category><![CDATA[fabrication]]></category>
		<category><![CDATA[inspiration]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[showreel]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://toxiclibs.postspectacular.com/?p=11</guid>
		<description><![CDATA[In a way 2009 was the best year for this project so far: more commits than ever, more examples, more documentation and above all more (as well as more or less happy) users &#8211; thank you all for your support &#38; patience!  Especially since the April release (nicknamed &#8220;CADA&#8221;) I noticed increased interest and myself [...]]]></description>
			<content:encoded><![CDATA[<p>In a way 2009 was the best year for this project so far: more commits than ever, more examples, more documentation and above all more (as well as more or less happy) users &#8211; thank you all for your support &amp; patience!  Especially since the April release (nicknamed <a href="http://www.cada1.net/?p=68" onclick="pageTracker._trackPageview('/outgoing/www.cada1.net/?p=68&amp;referer=');">&#8220;CADA&#8221;</a>) I noticed increased interest and myself became really interested in what other people have been using the libraries for. I&#8217;m often getting feedback from people about issues and how-to&#8217;s, but I didn&#8217;t quite know what the big wide world is up to with them. So in summer I reached out to existing users and posted <a href="http://code.google.com/p/toxiclibs/wiki/CFPShowreelVideo" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/toxiclibs/wiki/CFPShowreelVideo?referer=');">a public call for submission to create a community showreel</a> of projects realised with the libraries so far.</p>
<p>Edited in a non-stop 24h session, I&#8217;m really happy with the result &amp; seeing these projects together in one piece gave me an immense buzz, but see for yourself!</p>
<p><object width="680" height="382"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=6644720&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=6644720&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="680" height="382"></embed></object><br /></p>
<p>We will be attempting to do another one of these later this year, so if you have built anything cool with any of the library packages you&#8217;d want to contribute, please do get in touch here, via email, <a href="http://www.flickr.com/groups/toxiclibs/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/groups/toxiclibs/?referer=');">flickr</a>, <a href="http://www.vimeo.com/groups/toxiclibs/" onclick="pageTracker._trackPageview('/outgoing/www.vimeo.com/groups/toxiclibs/?referer=');">vimeo</a> or <a href="http://twitter.com/toxiclibs" onclick="pageTracker._trackPageview('/outgoing/twitter.com/toxiclibs?referer=');">twitter</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://toxiclibs.org/2009/09/toxiclibs-showreel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
