<?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/"
	>

<channel>
	<title>Shapevent</title>
	<atom:link href="http://shapevent.com/sketchbook/feed/" rel="self" type="application/rss+xml" />
	<link>http://shapevent.com/sketchbook</link>
	<description>sketching with code - flash - actionscript - processing</description>
	<pubDate>Fri, 16 Apr 2010 18:23:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Gesture Capture Pics</title>
		<link>http://shapevent.com/sketchbook/2010/04/16/gesture-capture-pics/</link>
		<comments>http://shapevent.com/sketchbook/2010/04/16/gesture-capture-pics/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 18:23:26 +0000</pubDate>
		<dc:creator>zevan</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://shapevent.com/sketchbook/?p=459</guid>
		<description><![CDATA[I uploaded some pictures of my Gesture Capture performance to flickr:
Performance Pics
]]></description>
			<content:encoded><![CDATA[<p>I uploaded some pictures of my Gesture Capture performance to flickr:</p>
<p><a href="http://www.flickr.com/photos/shapevent/sets/72157623868945518/">Performance Pics</a></p>
]]></content:encoded>
			<wfw:commentRss>http://shapevent.com/sketchbook/2010/04/16/gesture-capture-pics/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Imperfect Boxes</title>
		<link>http://shapevent.com/sketchbook/2010/04/07/imperfect-boxes/</link>
		<comments>http://shapevent.com/sketchbook/2010/04/07/imperfect-boxes/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 19:39:22 +0000</pubDate>
		<dc:creator>zevan</dc:creator>
		
		<category><![CDATA[sketches]]></category>

		<guid isPermaLink="false">http://shapevent.com/sketchbook/?p=455</guid>
		<description><![CDATA[Today I was thinking about a simple way to draw imperfect boxes and this is what I came up with:

This technique is pretty straight forward and just uses lerp and a random offset:
PLAIN TEXT
Actionscript:




graphics.lineStyle&#40;0,0x000000&#41;;


rect&#40;this.graphics, new Rectangle&#40;100,100,200,200&#41;&#41;;


rect&#40;this.graphics, new Rectangle&#40;320, 100, 50, 200&#41;, 3&#41;;


rect&#40;this.graphics, new Rectangle&#40;390, 100, 50, 200&#41;&#41;;


rect&#40;this.graphics, new Rectangle&#40;460, 100, 100, 100&#41;&#41;;


rect&#40;this.graphics, new Rectangle&#40;460, 210, [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was thinking about a simple way to draw imperfect boxes and this is what I came up with:</p>
<p><img src="http://www.shapevent.com/sketchbook/wp-content/uploads/imperfect_boxes.gif" /></p>
<p>This technique is pretty straight forward and just uses lerp and a random offset:</p>
<div class="igBar"><span id="lactionscript-2"><a href="#" onclick="javascript:showPlainTxt('actionscript-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-2">
<div class="actionscript">
<ol>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">graphics.<span style="color: #0066CC;">lineStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">0</span>,0x000000<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">rect<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">graphics</span>, <span style="color: #000000; font-weight: bold;">new</span> Rectangle<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">100</span>,<span style="color: #cc66cc;color:#800000;">100</span>,<span style="color: #cc66cc;color:#800000;">200</span>,<span style="color: #cc66cc;color:#800000;">200</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">rect<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">graphics</span>, <span style="color: #000000; font-weight: bold;">new</span> Rectangle<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">320</span>, <span style="color: #cc66cc;color:#800000;">100</span>, <span style="color: #cc66cc;color:#800000;">50</span>, <span style="color: #cc66cc;color:#800000;">200</span><span style="color: #66cc66;">&#41;</span>, <span style="color: #cc66cc;color:#800000;">3</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">rect<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">graphics</span>, <span style="color: #000000; font-weight: bold;">new</span> Rectangle<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">390</span>, <span style="color: #cc66cc;color:#800000;">100</span>, <span style="color: #cc66cc;color:#800000;">50</span>, <span style="color: #cc66cc;color:#800000;">200</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">rect<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">graphics</span>, <span style="color: #000000; font-weight: bold;">new</span> Rectangle<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">460</span>, <span style="color: #cc66cc;color:#800000;">100</span>, <span style="color: #cc66cc;color:#800000;">100</span>, <span style="color: #cc66cc;color:#800000;">100</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">rect<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">graphics</span>, <span style="color: #000000; font-weight: bold;">new</span> Rectangle<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">460</span>, <span style="color: #cc66cc;color:#800000;">210</span>, <span style="color: #cc66cc;color:#800000;">100</span>, <span style="color: #cc66cc;color:#800000;">120</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> g0:Shape = makeGrid<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">g0.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;color:#800000;">200</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">g0.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;color:#800000;">120</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> g1:Shape = makeGrid<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">15</span>, <span style="color: #cc66cc;color:#800000;">9</span>, <span style="color: #cc66cc;color:#800000;">31</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">g1.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;color:#800000;">100</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">g1.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;color:#800000;">320</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> makeGrid<span style="color: #66cc66;">&#40;</span>num:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;color:#800000;">9</span>, cols:<span style="color: #0066CC;">Number</span>=<span style="color: #cc66cc;color:#800000;">3</span>, <span style="color: #0066CC;">size</span>:<span style="color: #0066CC;">Number</span>=<span style="color: #cc66cc;color:#800000;">30</span><span style="color: #66cc66;">&#41;</span>:Shape<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> grid:Shape = <span style="color: #000000; font-weight: bold;">new</span> Shape<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; grid.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">lineStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">0</span>,0x000000<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;&nbsp; </div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; addChild<span style="color: #66cc66;">&#40;</span>grid<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> smallSize:<span style="color: #0066CC;">Number</span> = <span style="color: #0066CC;">size</span> - <span style="color: #cc66cc;color:#800000;">10</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;color:#800000;">0</span>; i&lt;num; i++<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> xp:<span style="color: #0066CC;">Number</span> = <span style="color: #66cc66;">&#40;</span>i % cols<span style="color: #66cc66;">&#41;</span> * <span style="color: #0066CC;">size</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> yp:<span style="color: #0066CC;">Number</span> = <span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#40;</span>i / cols<span style="color: #66cc66;">&#41;</span> * <span style="color: #0066CC;">size</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; rect<span style="color: #66cc66;">&#40;</span>grid.<span style="color: #006600;">graphics</span>, <span style="color: #000000; font-weight: bold;">new</span> Rectangle<span style="color: #66cc66;">&#40;</span>xp,yp,smallSize,smallSize<span style="color: #66cc66;">&#41;</span>, <span style="color: #cc66cc;color:#800000;">3</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">return</span> grid;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> rect<span style="color: #66cc66;">&#40;</span>g:Graphics, rect:Rectangle, res:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;color:#800000;">8</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> a:Point = <span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span>rect.<span style="color: #0066CC;">left</span>, rect.<span style="color: #006600;">top</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> b:Point = <span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span>rect.<span style="color: #0066CC;">right</span>, rect.<span style="color: #006600;">top</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> c:Point = <span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span>rect.<span style="color: #0066CC;">right</span>, rect.<span style="color: #006600;">bottom</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> d:Point = <span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span>rect.<span style="color: #0066CC;">left</span>, rect.<span style="color: #006600;">bottom</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> diff:<span style="color: #0066CC;">Number</span> = <span style="color: #66cc66;">&#40;</span> b.<span style="color: #006600;">x</span> - a.<span style="color: #006600;">x</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> dab:<span style="color: #0066CC;">Number</span> = <span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#40;</span>diff/res<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> xp:<span style="color: #0066CC;">Number</span>, yp:<span style="color: #0066CC;">Number</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> action:<span style="color: #0066CC;">String</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>dab<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;color:#800000;">0</span>; i&lt;dab; i++<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; action = <span style="color: #ff0000;">"lineTo"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>i == <span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xp = a.<span style="color: #006600;">x</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; yp = a.<span style="color: #006600;">y</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; action = <span style="color: #ff0000;">"moveTo"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; xp = a.<span style="color: #006600;">x</span> + <span style="color: #66cc66;">&#40;</span>diff<span style="color: #66cc66;">&#41;</span> * <span style="color: #66cc66;">&#40;</span>i/dab<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; yp = a.<span style="color: #006600;">y</span> + <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> * <span style="color: #cc66cc;color:#800000;">5</span> - <span style="color: #cc66cc;color:#800000;">2</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; g<span style="color: #66cc66;">&#91;</span>action<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#40;</span>xp, yp<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; diff = c.<span style="color: #006600;">y</span> - b.<span style="color: #006600;">y</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; dab = <span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#40;</span>diff / res<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span>i = <span style="color: #cc66cc;color:#800000;">0</span>; i&lt;dab; i++<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; xp = b.<span style="color: #006600;">x</span> + <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> * <span style="color: #cc66cc;color:#800000;">5</span> - <span style="color: #cc66cc;color:#800000;">2</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; yp = b.<span style="color: #006600;">y</span> + <span style="color: #66cc66;">&#40;</span>diff<span style="color: #66cc66;">&#41;</span> * <span style="color: #66cc66;">&#40;</span>i/dab<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; g.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span>xp, yp<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; diff = d.<span style="color: #006600;">x</span> - c.<span style="color: #006600;">x</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; dab = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">abs</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#40;</span>diff / res<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span>i = <span style="color: #cc66cc;color:#800000;">0</span>; i&lt;dab; i++<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; xp = c.<span style="color: #006600;">x</span> + <span style="color: #66cc66;">&#40;</span>diff<span style="color: #66cc66;">&#41;</span> * <span style="color: #66cc66;">&#40;</span>i/dab<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; yp = c.<span style="color: #006600;">y</span> + <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> * <span style="color: #cc66cc;color:#800000;">5</span> - <span style="color: #cc66cc;color:#800000;">2</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; g.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span>xp, yp<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; diff = a.<span style="color: #006600;">y</span> - d.<span style="color: #006600;">y</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; dab = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">abs</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#40;</span>diff / res<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span>i = <span style="color: #cc66cc;color:#800000;">0</span>; i&lt;dab; i++<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; xp = d.<span style="color: #006600;">x</span> + <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> * <span style="color: #cc66cc;color:#800000;">5</span> - <span style="color: #cc66cc;color:#800000;">2</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; yp = d.<span style="color: #006600;">y</span> + <span style="color: #66cc66;">&#40;</span>diff<span style="color: #66cc66;">&#41;</span> * <span style="color: #66cc66;">&#40;</span>i/dab<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; g.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span>xp, yp<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://shapevent.com/sketchbook/2010/04/07/imperfect-boxes/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Synesthesia Sketch</title>
		<link>http://shapevent.com/sketchbook/2010/04/01/synesthesia-sketch/</link>
		<comments>http://shapevent.com/sketchbook/2010/04/01/synesthesia-sketch/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 15:09:31 +0000</pubDate>
		<dc:creator>zevan</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://shapevent.com/sketchbook/?p=446</guid>
		<description><![CDATA[I'm slowly working on some software related to synesthesia. This is a very simple but interesting sketch that I created. Clicking once will set the numbers to black, clicking again will associate random colors with the numbers 0-9:
Click numbers to toggle random colors






This is the first in a series of sketches I'll be doing related [...]]]></description>
			<content:encoded><![CDATA[<p>I'm slowly working on some software related to synesthesia. This is a very simple but interesting sketch that I created. Clicking once will set the numbers to black, clicking again will associate random colors with the numbers 0-9:</p>
<p><em>Click numbers to toggle random colors</em></p>
<p>
<object type="application/x-shockwave-flash" width="500" height="500">
<param name="movie" value="/sketchbook/wp-content/uploads/number_generator.swf" />
<embed src="/sketchbook/wp-content/uploads/number_generator.swf" type="application/x-shockwave-flash" width="500" height="500" >
</object>
</p>
<p>This is the first in a series of sketches I'll be doing related to synesthesia.</p>
]]></content:encoded>
			<wfw:commentRss>http://shapevent.com/sketchbook/2010/04/01/synesthesia-sketch/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Gesture Capture Stills</title>
		<link>http://shapevent.com/sketchbook/2010/03/31/gesture-capture-stills/</link>
		<comments>http://shapevent.com/sketchbook/2010/03/31/gesture-capture-stills/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 18:53:00 +0000</pubDate>
		<dc:creator>zevan</dc:creator>
		
		<category><![CDATA[Software]]></category>

		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://shapevent.com/sketchbook/?p=442</guid>
		<description><![CDATA[I'm working on getting Gesture Capture exhibited somewhere so I took a few stills of it in action. Additionally I created a mini-site to describe the project.
Mini-Site
Pics
]]></description>
			<content:encoded><![CDATA[<p>I'm working on getting Gesture Capture exhibited somewhere so I took a few stills of it in action. Additionally I created a mini-site to describe the project.</p>
<p><a href="http://www.shapevent.com/gesture_capture/" target="blank">Mini-Site</a><br />
<a href="http://www.flickr.com/photos/shapevent/sets/72157623617598161/">Pics</a></p>
]]></content:encoded>
			<wfw:commentRss>http://shapevent.com/sketchbook/2010/03/31/gesture-capture-stills/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Bicuspid Variation Tooth</title>
		<link>http://shapevent.com/sketchbook/2010/03/26/bicuspid-variation-tooth/</link>
		<comments>http://shapevent.com/sketchbook/2010/03/26/bicuspid-variation-tooth/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 16:05:27 +0000</pubDate>
		<dc:creator>zevan</dc:creator>
		
		<category><![CDATA[experiments]]></category>

		<category><![CDATA[in-progress]]></category>

		<category><![CDATA[nature]]></category>

		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://shapevent.com/sketchbook/?p=439</guid>
		<description><![CDATA[Last summer I spent some time in search of a nice equation for a tooth. This one worked out well in the end.
]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.shapevent.com/sketchbook/wp-content/uploads/bicuspid_v1.gif" /></p>
<p>Last summer I spent some time in search of a nice equation for a tooth. This one worked out well in the end.</p>
]]></content:encoded>
			<wfw:commentRss>http://shapevent.com/sketchbook/2010/03/26/bicuspid-variation-tooth/feed/</wfw:commentRss>
		</item>
		<item>
		<title>On Way Animated</title>
		<link>http://shapevent.com/sketchbook/2010/03/25/on-way-animated/</link>
		<comments>http://shapevent.com/sketchbook/2010/03/25/on-way-animated/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 14:46:54 +0000</pubDate>
		<dc:creator>zevan</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://shapevent.com/sketchbook/?p=436</guid>
		<description><![CDATA[I decided to animate one of my writings today. 
Have a look here.
]]></description>
			<content:encoded><![CDATA[<p>I decided to animate one of my writings today. </p>
<p>Have a look <a href="http://www.shapevent.com/movingtext/on_way.html" target="blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://shapevent.com/sketchbook/2010/03/25/on-way-animated/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Processsing Snippet</title>
		<link>http://shapevent.com/sketchbook/2010/03/17/processsing-snippet/</link>
		<comments>http://shapevent.com/sketchbook/2010/03/17/processsing-snippet/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 15:05:57 +0000</pubDate>
		<dc:creator>zevan</dc:creator>
		
		<category><![CDATA[code snippets]]></category>

		<guid isPermaLink="false">http://shapevent.com/sketchbook/?p=432</guid>
		<description><![CDATA[PLAIN TEXT
JAVA:




import processing.pdf.*;


&#160;


int pointNum = 14;


Point&#91;&#93; points = new Point&#91;pointNum&#93;;


void setup&#40;&#41;&#123;


&#160; size&#40;500,500, JAVA2D&#41;;&#160; 


&#160; beginRecord&#40;PDF, "shape.pdf"&#41;; 


&#160; translate&#40;width / 2, height / 2&#41;;


&#160; background&#40;255&#41;;


&#160; strokeWeight&#40;0.5&#41;;


&#160; smooth&#40;&#41;;


&#160; noFill&#40;&#41;;


&#160; addPoints&#40;&#41;;


&#160; connectPoints&#40;&#41;;


&#160; endRecord&#40;&#41;;


&#125;


&#160;


void addPoints&#40;&#41;&#123;


&#160; float step = TWO_PI / pointNum;


&#160; float theta = step / 2;


&#160; float radius = 200;


&#160; for &#40;int i = 0; i&#60;pointNum; i++&#41;&#123;


&#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<div class="igBar"><span id="ljava-4"><a href="#" onclick="javascript:showPlainTxt('java-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-4">
<div class="java">
<ol>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import processing.pdf.*;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333;">int</span> pointNum = <span style="color: #cc66cc;color:#800000;">14</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.google.com/search?q=allinurl%3APoint+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Point</span></a><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> points = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3APoint+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Point</span></a><span style="color: #66cc66;">&#91;</span>pointNum<span style="color: #66cc66;">&#93;</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333;">void</span> setup<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; size<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">500</span>,<span style="color: #cc66cc;color:#800000;">500</span>, JAVA2D<span style="color: #66cc66;">&#41;</span>;&nbsp; </div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; beginRecord<span style="color: #66cc66;">&#40;</span>PDF, <span style="color: #ff0000;">"shape.pdf"</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; translate<span style="color: #66cc66;">&#40;</span>width / <span style="color: #cc66cc;color:#800000;">2</span>, height / <span style="color: #cc66cc;color:#800000;">2</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; background<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">255</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; strokeWeight<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">0</span>.<span style="color: #cc66cc;color:#800000;">5</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; smooth<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; noFill<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; addPoints<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; connectPoints<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; endRecord<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333;">void</span> addPoints<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; float step = TWO_PI / pointNum;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; float theta = step / <span style="color: #cc66cc;color:#800000;">2</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; float radius = <span style="color: #cc66cc;color:#800000;">200</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span> i = <span style="color: #cc66cc;color:#800000;">0</span>; i&lt;pointNum; i++<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;float x = radius * cos<span style="color: #66cc66;">&#40;</span>theta<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;float y = radius * sin<span style="color: #66cc66;">&#40;</span>theta<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;points<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span> = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3APoint+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Point</span></a><span style="color: #66cc66;">&#40;</span>x, y<span style="color: #66cc66;">&#41;</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;theta += step;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333;">void</span> connectPoints<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span> i = <span style="color: #cc66cc;color:#800000;">0</span>; i&lt;pointNum; i++<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;<a href="http://www.google.com/search?q=allinurl%3APoint+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Point</span></a> a = points<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span> j = <span style="color: #cc66cc;color:#800000;">0</span>; j&lt;pointNum; j++<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3APoint+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Point</span></a> b = points<span style="color: #66cc66;">&#91;</span>j<span style="color: #66cc66;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>a != b<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #808080; font-style: italic;">//if (int(a.x) == int(b.x) || int(a.y) == int(b.y)){</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;line<span style="color: #66cc66;">&#40;</span>a.<span style="color: #006600;">x</span>, a.<span style="color: #006600;">y</span>, b.<span style="color: #006600;">x</span>, b.<span style="color: #006600;">y</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// }</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">class</span> <a href="http://www.google.com/search?q=allinurl%3APoint+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Point</span></a><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; float x;</div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; float y;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <a href="http://www.google.com/search?q=allinurl%3APoint+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Point</span></a><span style="color: #66cc66;">&#40;</span>float x, float y<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006600;">x</span> = x;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006600;">y</span> = y; </div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #808080; font-style: italic;">// ellipse(x,y, 10, 10);</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family:  Monaco, Arial, 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: Monaco, Arial, 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Connect the dots, try changing pointNum.</p>
<p>Actually have a good deal more to say about this snippet... maybe in the next day or two.</p>
]]></content:encoded>
			<wfw:commentRss>http://shapevent.com/sketchbook/2010/03/17/processsing-snippet/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Znode</title>
		<link>http://shapevent.com/sketchbook/2010/03/15/znode/</link>
		<comments>http://shapevent.com/sketchbook/2010/03/15/znode/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 00:42:19 +0000</pubDate>
		<dc:creator>zevan</dc:creator>
		
		<category><![CDATA[Ideas]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[UI]]></category>

		<category><![CDATA[in-progress]]></category>

		<category><![CDATA[programming]]></category>

		<category><![CDATA[projects]]></category>

		<category><![CDATA[sketches]]></category>

		<category><![CDATA[techniques]]></category>

		<guid isPermaLink="false">http://shapevent.com/sketchbook/?p=420</guid>
		<description><![CDATA[I'm working on a node based editor for brainstorming. I often find myself drawing psuedo-UML on whiteboards and inside the flash IDE. I like UML but it's often more than i need so I've slowly been developing Znode... which will allow the creation of super simple diagrams like these:

I hope to have Znode finished and [...]]]></description>
			<content:encoded><![CDATA[<p>I'm working on a node based editor for brainstorming. I often find myself drawing psuedo-UML on whiteboards and inside the flash IDE. I like UML but it's often more than i need so I've slowly been developing Znode... which will allow the creation of super simple diagrams like these:</p>
<p><img src="http://shapevent.com/sketchbook/wp-content/uploads/znode.gif" /></p>
<p>I hope to have Znode finished and open sourced in a week or two. The code is all pretty simple. Here is a short feature list:</p>
<p>Add nodes with text<br />
Resize nodes<br />
Connect nodes to other nodes<br />
Zoom in and out<br />
Pan<br />
Save and Load Node structures (XML format)</p>
<p>And for phase two of the project:<br />
Undo and Redo functionality</p>
]]></content:encoded>
			<wfw:commentRss>http://shapevent.com/sketchbook/2010/03/15/znode/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Programming Like a Portrait Painter</title>
		<link>http://shapevent.com/sketchbook/2010/03/14/programming-like-a-portrait-painter/</link>
		<comments>http://shapevent.com/sketchbook/2010/03/14/programming-like-a-portrait-painter/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 22:14:31 +0000</pubDate>
		<dc:creator>zevan</dc:creator>
		
		<category><![CDATA[programming]]></category>

		<category><![CDATA[techniques]]></category>

		<guid isPermaLink="false">http://shapevent.com/sketchbook/?p=417</guid>
		<description><![CDATA[Beginner programmers are attached to their code. REALLY attached. After having been programming for around 10 years I realize that the way for me to write the best software is to work more like a painter. A painter might do 10 or 20 sketches before actually moving on and painting a portrait. The painter may [...]]]></description>
			<content:encoded><![CDATA[<p>Beginner programmers are attached to their code. REALLY attached. After having been programming for around 10 years I realize that the way for me to write the best software is to work more like a painter. A painter might do 10 or 20 sketches before actually moving on and painting a portrait. The painter may review some of these sketches and take elements from them - maybe in one study, the chin was more accurate, maybe in another study the ears came out perfect. The painter will use these sketches as a reference as he works on the final portrait.</p>
<p>I do the same thing with programming. If I want to program something complex, I'll do anywhere from 3 to 6 studies/sketches. These code sketches are usually messy quickly written code. The idea is to get my head wrapped around the problem. It isn't until I feel I have a good grasp of the problem that I go ahead and try and tackle it. Even then, when I hit a wall I'll often go back to sketching mode. </p>
<p>The main requirement for this approach is time. You need to make sure your client understands right off the bat that programming software isn't a speedy process. </p>
<p>This technique is nothing new, there are variations and fancier names for this kind of thing... I just thought since I find myself telling this to my students all the time, I'd write a quick post about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://shapevent.com/sketchbook/2010/03/14/programming-like-a-portrait-painter/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Gesture Capture</title>
		<link>http://shapevent.com/sketchbook/2010/03/11/gesture-capture/</link>
		<comments>http://shapevent.com/sketchbook/2010/03/11/gesture-capture/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 04:59:10 +0000</pubDate>
		<dc:creator>zevan</dc:creator>
		
		<category><![CDATA[code snippets]]></category>

		<category><![CDATA[drawing]]></category>

		<category><![CDATA[projects]]></category>

		<category><![CDATA[sketches]]></category>

		<category><![CDATA[shapevent]]></category>

		<guid isPermaLink="false">http://shapevent.com/sketchbook/?p=412</guid>
		<description><![CDATA[Gesture Capture is a mini-drawing program that allows the user to draw single gestures (shapes, letters etc...) - the program then randomly scales, rotates, tints and translates these gestures repeatedly on the canvas. The user may continue to draw as it does this, the more gesture drawn, the more the program will have to randomly [...]]]></description>
			<content:encoded><![CDATA[<p>Gesture Capture is a mini-drawing program that allows the user to draw single gestures (shapes, letters etc...) - the program then randomly scales, rotates, tints and translates these gestures repeatedly on the canvas. The user may continue to draw as it does this, the more gesture drawn, the more the program will have to randomly choose from.</p>
<p><a href="http://actionsnippet.com/swfs/gesture_capture.html" target="blank"><br />
Try Gesture Capture:</p>
<p><img src="http://www.shapevent.com/sketchbook/wp-content/uploads/ges_cap.jpg" /></a></p>
<p>I created Gesture Capture as an entry for actionsnippet and something made me think of it today. I was playing with it for awhile and decided it was worth mentioning here.</p>
<p>The original post and code can be found <a href="http://actionsnippet.com/?p=1671" target="blank">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://shapevent.com/sketchbook/2010/03/11/gesture-capture/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
