<?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>C i b o M a h t o . c o m</title>
	<atom:link href="http://www.cibomahto.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cibomahto.com</link>
	<description>building making designing dreaming</description>
	<lastBuildDate>Wed, 15 Aug 2012 19:38:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Rob Mug Box</title>
		<link>http://www.cibomahto.com/2012/08/robmugbox/</link>
		<comments>http://www.cibomahto.com/2012/08/robmugbox/#comments</comments>
		<pubDate>Wed, 15 Aug 2012 19:33:49 +0000</pubDate>
		<dc:creator>mahto</dc:creator>
				<category><![CDATA[Ideas]]></category>

		<guid isPermaLink="false">http://www.cibomahto.com/?p=1714</guid>
		<description><![CDATA[Here&#8217;s a little piece that Kyle and I put together last year, as a response to Wafaa Bilal&#8217;s 3rdi project. The Rob/Mug Box tracks a target&#8217;s geolocation data: when the box is within range of that person, &#8220;mug&#8221; lights up; &#8230; <a href="http://www.cibomahto.com/2012/08/robmugbox/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://player.vimeo.com/video/44916980" width="600" height="338" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></p>
<p>Here&#8217;s a little piece that <a href="http://kylemcdonald.net/">Kyle</a> and I put together last year, as a response to Wafaa Bilal&#8217;s <a href="http://wafaabilal.com/thirdi/">3rdi</a> project.</p>
<blockquote><p>The Rob/Mug Box tracks a target&#8217;s geolocation data: when the box is within range of that person, &#8220;mug&#8221; lights up; and when the box is near that person&#8217;s home, &#8220;rob&#8221; lights up. This is the first in a series of boxes designed to provide binary feedback about our complicated world.</p>
<p>As our first target, we chose Wafaa Bilal. In December 2010 Wafaa Bilal started a year long performance called &#8220;The 3rd I&#8221; where he broadcast one photo every minute from a camera on the back of his head. 3rdi.me/ Each photo is geotagged, so we scraped this data and fed it to the Rob/Mug Box. In this video, recorded summer 2011, our agent tracked down Wafaa in a local cafe and followed him home.
</p></blockquote>
<p>The <a href="github.com/cibomahto/RobMugBox">source code</a> is of course on Github.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cibomahto.com/2012/08/robmugbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>StickyMan, a thought experiment in manipulating gravity</title>
		<link>http://www.cibomahto.com/2012/08/stickyman-a-thought-experiment-in-manipulating-gravit/</link>
		<comments>http://www.cibomahto.com/2012/08/stickyman-a-thought-experiment-in-manipulating-gravit/#comments</comments>
		<pubDate>Fri, 10 Aug 2012 14:00:17 +0000</pubDate>
		<dc:creator>mahto</dc:creator>
				<category><![CDATA[Ideas]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.cibomahto.com/?p=1697</guid>
		<description><![CDATA[I developed StickyMan (source here ), a quickie game idea during the Baltimore Hackathon a few months ago. The question I wanted to answer was, &#8220;What if Lode Runner got stuck in an Escher painting?&#8221;. The idea is that gravity &#8230; <a href="http://www.cibomahto.com/2012/08/stickyman-a-thought-experiment-in-manipulating-gravit/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.cibomahto.com/2012/08/stickyman-a-thought-experiment-in-manipulating-gravit/stickyman/" rel="attachment wp-att-1703"><img src="http://www.cibomahto.com/wp-content/uploads/2012/08/stickyman.png" alt="" title="stickyman" width="600" height="617" class="alignnone size-full wp-image-1703" /></a></p>
<p>I developed <a href="pop.openprocessing.org/sketch/63862">StickyMan</a> (<a href="https://github.com/cibomahto/stickyman.git">source here</a> ), a quickie game idea during the Baltimore Hackathon a few months ago. The question I wanted to answer was, &#8220;What if <a href="http://en.wikipedia.org/wiki/Lode_Runner">Lode Runner</a> got stuck in an <a href="http://en.wikipedia.org/wiki/M._C._Escher">Escher</a> painting?&#8221;. The idea is that gravity is relative, and every time you hit a wall, that wall becomes the ground. I had fun fudging with the transforms until it more or less functioned. If I had more time, the plan was to make it so that you had to use gravity to indirectly manipulate different colored boxes into different holes, as if you were in charge of the shipping department for MC Escher.</p>
<p>More explanation after the break.<span id="more-1697"></span></p>
<p>I&#8217;ve often longed for and dreamed of the chance to walk through one of Eschers grand halls and stairways, most notably those in <a href="http://en.wikipedia.org/wiki/Relativity_(M._C._Escher)">Relativity</a>:<br />
<a href="http://www.cibomahto.com/2012/08/stickyman-a-thought-experiment-in-manipulating-gravit/eschers_relativity/" rel="attachment wp-att-1698"><img src="http://www.cibomahto.com/wp-content/uploads/2012/08/Eschers_Relativity-600x571.jpg" alt="" title="Escher&#039;s_Relativity" width="600" height="571" class="alignnone size-medium wp-image-1698" /></a><br />
Since I haven&#8217;t come up with a great way to realize this physically, the next best idea was to make it into a game. Using the <a href="http://www.jbox2d.org/">JBox2D</a> library made the implementation fairly straightforward- just set up gravity in the right direction, then change it as needed. Player controls were a little more difficult, since they needed to change direction depending on where the gravity vector was- I ended up multiplying the gravity force by a sine or cosine to rotate it to the correct direction for left and right. Jumping works similarly, except that there is a bug in how landing is detected, so you can jump up and up through a pile of boxes.</p>
<p>Some games that include similar concepts:<br />
* <a href="http://en.wikipedia.org/wiki/Echochrome">Echochrome</a>, a PS 3 game where you manipulate the 3D camera perspective of a game to change the 2D reality that a character experiences- it&#8217;s mind blowing if you haven&#8217;t seen it before:<br />
<iframe width="600" height="450" src="http://www.youtube.com/embed/QfICeBtVv8U?rel=0" frameborder="0" allowfullscreen></iframe><br />
* <a href="http://en.wikipedia.org/wiki/And_Yet_It_Moves">And yet it moves</a>, a very similar platformer, where the player has direct control of gravity, and needs to use it to manipulate the world around him<br />
<iframe width="600" height="338" src="http://www.youtube.com/embed/NCgKOp-8bsE?rel=0" frameborder="0" allowfullscreen></iframe><br />
* <a href="http://neverball.org/">Neverball</a>, a game where you tilt the floor of a maze in order to manipulate a marble to collect coins and reach end gates.</p>
<p>It turns out there are a bunch of other games that also explore this mechanic, but this one is mine! Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cibomahto.com/2012/08/stickyman-a-thought-experiment-in-manipulating-gravit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making gradients in Processing using OpenGL</title>
		<link>http://www.cibomahto.com/2012/08/making-gradients-in-processing-using-opengl/</link>
		<comments>http://www.cibomahto.com/2012/08/making-gradients-in-processing-using-opengl/#comments</comments>
		<pubDate>Wed, 08 Aug 2012 07:44:10 +0000</pubDate>
		<dc:creator>mahto</dc:creator>
				<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.cibomahto.com/?p=1664</guid>
		<description><![CDATA[I&#8217;ve been working on a display project using Processing, and wanted to add some linear gradients and fuzzed edges to make the display look a bit nicer. The example linear and radial gradient functions work ok, but are somewhat processor &#8230; <a href="http://www.cibomahto.com/2012/08/making-gradients-in-processing-using-opengl/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.cibomahto.com/?attachment_id=1667" rel="attachment wp-att-1667"><img src="http://www.cibomahto.com/wp-content/uploads/2012/08/Screen-Shot-2012-08-08-at-3.03.00-PM.png" alt="" title="Screen Shot 2012-08-08 at 3.03.00 PM" width="600" height="444" class="alignnone size-full wp-image-1667" /></a></p>
<p>I&#8217;ve been working on a display project using <a href="http://processing.org">Processing</a>, and wanted to add some linear gradients and fuzzed edges to make the display look a bit nicer. The example <a href="http://processing.org/learning/basics/lineargradient.html">linear</a> and <a href="processing.org/learning/basics/radialgradient.html">radial</a> gradient functions work ok, but are somewhat processor intensive, so I wanted to find a better way to achieve the same effect.<br />
<span id="more-1664"></span><br />
Someone on the processing forum suggested using opengl shapes to achieve this. The idea is that you can make a gradient by drawing a polygon (or triangle) shape, and specifying a different color for each vertex of the shape. This causes the gpu to do all the heavy lifting of actually drawing the gradient. Here is an example of how to draw a simple linear gradient using this method:</p>
<p><a href="http://www.cibomahto.com/?attachment_id=1670" rel="attachment wp-att-1670"><img src="http://www.cibomahto.com/wp-content/uploads/2012/08/Screen-Shot-2012-08-08-at-3.26.53-PM.png" alt="" title="Screen Shot 2012-08-08 at 3.26.53 PM" width="600" height="458" class="alignnone size-full wp-image-1670" /></a></p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">processing.opengl.*</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  size<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">550</span>, <span style="color: #cc66cc;">400</span>, OPENGL<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  noStroke<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> draw<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>  
  color leftColor <span style="color: #339933;">=</span> color<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">255</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">255</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  color rightColor <span style="color: #339933;">=</span> color<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">255</span>,<span style="color: #cc66cc;">255</span>,<span style="color: #cc66cc;">255</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  beginShape<span style="color: #009900;">&#40;</span>POLYGON<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    fill<span style="color: #009900;">&#40;</span>leftColor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      vertex<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    fill<span style="color: #009900;">&#40;</span>rightColor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      vertex<span style="color: #009900;">&#40;</span>width, <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    fill<span style="color: #009900;">&#40;</span>rightColor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      vertex<span style="color: #009900;">&#40;</span>width, height<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    fill<span style="color: #009900;">&#40;</span>leftColor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      vertex<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>, height<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  endShape<span style="color: #009900;">&#40;</span>CLOSE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>I played around with this for a while, and eventually achieved the effects i wanted- linear gradients near the edges of the window to (hopefully) subtly draw attention to the center of the screen, and a function to draw fuzzy rectangles by repeating the gradient technique around the edges of a regular rectangle. Here&#8217;s the source code, which draws the aforementioned background, as well as a fuzzy rectangle that changes size and fuzziness as you move the mouse cursor around:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">processing.opengl.*</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  size<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">550</span>, <span style="color: #cc66cc;">400</span>, OPENGL<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  noStroke<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Draw a rectangle which can have differently colored edges</span>
<span style="color: #666666; font-style: italic;">// @param x X coordinate of the top-left corner of the rectangle (pixels)</span>
<span style="color: #666666; font-style: italic;">// @param y X coordinate of the top-left corner of the rectangle (pixels)</span>
<span style="color: #666666; font-style: italic;">// @param widt Width of the rectangle (pixels)</span>
<span style="color: #666666; font-style: italic;">// @param heigh Height of the rectangle (pixels)</span>
<span style="color: #666666; font-style: italic;">// @param tlcolor Color of the top-left rectangle corner</span>
<span style="color: #666666; font-style: italic;">// @param trcolor Color of the top-right rectangle corner</span>
<span style="color: #666666; font-style: italic;">// @param brcolor Color of the bottom-right rectangle corner</span>
<span style="color: #666666; font-style: italic;">// @param blcolor Color of the bottom-left rectangle corner</span>
<span style="color: #666666; font-style: italic;">// </span>
<span style="color: #000066; font-weight: bold;">void</span> makeRectangle<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> x, <span style="color: #000066; font-weight: bold;">int</span> y, <span style="color: #000066; font-weight: bold;">int</span> widh, <span style="color: #000066; font-weight: bold;">int</span> heigh,
                   color tlcolor, color trcolor,
                   color brcolor, color blcolor<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  beginShape<span style="color: #009900;">&#40;</span>POLYGON<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    fill<span style="color: #009900;">&#40;</span>tlcolor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      vertex<span style="color: #009900;">&#40;</span>x, y<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    fill<span style="color: #009900;">&#40;</span>trcolor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      vertex<span style="color: #009900;">&#40;</span>x<span style="color: #339933;">+</span>widh, y<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    fill<span style="color: #009900;">&#40;</span>brcolor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      vertex<span style="color: #009900;">&#40;</span>x<span style="color: #339933;">+</span>widh, y<span style="color: #339933;">+</span>heigh<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    fill<span style="color: #009900;">&#40;</span>blcolor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      vertex<span style="color: #009900;">&#40;</span>x, y<span style="color: #339933;">+</span>heigh<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  endShape<span style="color: #009900;">&#40;</span>CLOSE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Draw a gradient corner by making triangles</span>
<span style="color: #666666; font-style: italic;">// TODO: do this directly somehow; a shader?</span>
<span style="color: #666666; font-style: italic;">// @param x X coordinate of the center of the semicircle (pixels)</span>
<span style="color: #666666; font-style: italic;">// @param y Y coordinate of the center of the semicircle (pixels)</span>
<span style="color: #666666; font-style: italic;">// @param rad Radius of the semicircle (pixels)</span>
<span style="color: #666666; font-style: italic;">// @param divisions Number of triangle divisions to make (more=smoother)</span>
<span style="color: #666666; font-style: italic;">// @param quadrant Which quadrant to draw in </span>
<span style="color: #666666; font-style: italic;">// @param insideColor Color to use for the center of the semicircle</span>
<span style="color: #666666; font-style: italic;">// @param outsideColor Color to use for the outside of the semicircle</span>
<span style="color: #000066; font-weight: bold;">void</span> makeGradientCorner<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> x, <span style="color: #000066; font-weight: bold;">int</span> y, <span style="color: #000066; font-weight: bold;">int</span> rad,
                <span style="color: #000066; font-weight: bold;">int</span> divisions, <span style="color: #000066; font-weight: bold;">int</span> quadrant,
                color insideColor, color outsideColor<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  beginShape<span style="color: #009900;">&#40;</span>TRIANGLES<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
    <span style="color: #000000; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">float</span> angle <span style="color: #339933;">=</span> quadrant<span style="color: #339933;">*</span>PI<span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span>
        angle <span style="color: #339933;">&lt;</span> <span style="color: #009900;">&#40;</span>quadrant <span style="color: #339933;">+</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span>PI<span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span> <span style="color: #339933;">-</span> .001<span style="color: #339933;">;</span>
        angle <span style="color: #339933;">+=</span> PI<span style="color: #339933;">/</span>divisions<span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      fill<span style="color: #009900;">&#40;</span>insideColor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        vertex<span style="color: #009900;">&#40;</span>x, y<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      fill<span style="color: #009900;">&#40;</span>outsideColor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        vertex<span style="color: #009900;">&#40;</span>x<span style="color: #339933;">+</span>cos<span style="color: #009900;">&#40;</span>angle<span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span>rad,                y<span style="color: #339933;">-</span>sin<span style="color: #009900;">&#40;</span>angle<span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span>rad<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        vertex<span style="color: #009900;">&#40;</span>x<span style="color: #339933;">+</span>cos<span style="color: #009900;">&#40;</span>angle<span style="color: #339933;">+</span>PI<span style="color: #339933;">/</span>divisions<span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span>rad, y<span style="color: #339933;">-</span>sin<span style="color: #009900;">&#40;</span>angle<span style="color: #339933;">+</span>PI<span style="color: #339933;">/</span>divisions<span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span>rad<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  endShape<span style="color: #009900;">&#40;</span>CLOSE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Draw a fuzzy rectangle at the specified position</span>
<span style="color: #666666; font-style: italic;">// @param x X coordinate of the top-left corner of the rectangle (pixels)</span>
<span style="color: #666666; font-style: italic;">// @param y X coordinate of the top-left corner of the rectangle (pixels)</span>
<span style="color: #666666; font-style: italic;">// @param widt Width of the rectangle (pixels)</span>
<span style="color: #666666; font-style: italic;">// @param heigh Height of the rectangle (pixels)</span>
<span style="color: #666666; font-style: italic;">// @param radius Radius of the fuzzing (pixels)</span>
<span style="color: #666666; font-style: italic;">// @param fgcolor color of the rectangle</span>
<span style="color: #000066; font-weight: bold;">void</span> drawFuzzyRectangle<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> x, <span style="color: #000066; font-weight: bold;">int</span> y, <span style="color: #000066; font-weight: bold;">int</span> widt, <span style="color: #000066; font-weight: bold;">int</span> heigh,
                        <span style="color: #000066; font-weight: bold;">int</span> rad, color fgcolor<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;">// Handle the case where the radius is too big, by clipping it to 1/2 the max height or width.</span>
  <span style="color: #000066; font-weight: bold;">int</span> max_rad <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#40;</span>min<span style="color: #009900;">&#40;</span>widt<span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span>, heigh<span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  rad <span style="color: #339933;">=</span> min<span style="color: #009900;">&#40;</span>rad, max_rad<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// Uncomment this to see how the gradients are being drawn</span>
  <span style="color: #666666; font-style: italic;">//stroke(0);</span>
&nbsp;
  color bgcolor <span style="color: #339933;">=</span> color<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">255</span>,<span style="color: #cc66cc;">255</span>,<span style="color: #cc66cc;">255</span>,<span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  makeRectangle<span style="color: #009900;">&#40;</span>x<span style="color: #339933;">+</span>rad, y<span style="color: #339933;">+</span>rad,        widt<span style="color: #339933;">-</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">*</span>rad, heigh<span style="color: #339933;">-</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">*</span>rad, fgcolor, fgcolor, fgcolor, fgcolor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  makeRectangle<span style="color: #009900;">&#40;</span>x<span style="color: #339933;">+</span>rad, y,            widt<span style="color: #339933;">-</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">*</span>rad, rad,   bgcolor, bgcolor, fgcolor, fgcolor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  makeRectangle<span style="color: #009900;">&#40;</span>x, y<span style="color: #339933;">+</span>rad,            rad, heigh<span style="color: #339933;">-</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">*</span>rad,  bgcolor, fgcolor, fgcolor, bgcolor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  makeRectangle<span style="color: #009900;">&#40;</span>x<span style="color: #339933;">+</span>rad, y<span style="color: #339933;">+</span>rad<span style="color: #339933;">+</span>heigh<span style="color: #339933;">-</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">*</span>rad,  widt<span style="color: #339933;">-</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">*</span>rad, rad,   fgcolor, fgcolor, bgcolor, bgcolor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  makeRectangle<span style="color: #009900;">&#40;</span>x<span style="color: #339933;">+</span>widt<span style="color: #339933;">-</span>rad, y<span style="color: #339933;">+</span>rad,   rad, heigh<span style="color: #339933;">-</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">*</span>rad,  fgcolor, bgcolor, bgcolor, fgcolor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  makeGradientCorner<span style="color: #009900;">&#40;</span>x<span style="color: #339933;">+</span>widt<span style="color: #339933;">-</span>rad, y<span style="color: #339933;">+</span>rad,       rad, <span style="color: #cc66cc;">8</span>,  <span style="color: #cc66cc;">0</span>,   fgcolor, bgcolor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  makeGradientCorner<span style="color: #009900;">&#40;</span>x<span style="color: #339933;">+</span>rad, y<span style="color: #339933;">+</span>rad,            rad, <span style="color: #cc66cc;">8</span>,  <span style="color: #cc66cc;">1</span>,   fgcolor, bgcolor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  makeGradientCorner<span style="color: #009900;">&#40;</span>x<span style="color: #339933;">+</span>rad, y<span style="color: #339933;">+</span>heigh<span style="color: #339933;">-</span>rad,      rad, <span style="color: #cc66cc;">8</span>,  <span style="color: #cc66cc;">2</span>,   fgcolor, bgcolor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  makeGradientCorner<span style="color: #009900;">&#40;</span>x<span style="color: #339933;">+</span>widt<span style="color: #339933;">-</span>rad, y<span style="color: #339933;">+</span>heigh<span style="color: #339933;">-</span>rad, rad, <span style="color: #cc66cc;">8</span>,  <span style="color: #cc66cc;">3</span>,   fgcolor, bgcolor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> draw<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>  
  <span style="color: #666666; font-style: italic;">// Fill the background with a gradient</span>
  color edgeColor <span style="color: #339933;">=</span> color<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">220</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  color centerColor <span style="color: #339933;">=</span> color<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  background<span style="color: #009900;">&#40;</span>centerColor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  makeRectangle<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span>, width<span style="color: #339933;">/</span><span style="color: #cc66cc;">4</span>, height,  edgeColor, centerColor, centerColor, edgeColor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  makeRectangle<span style="color: #009900;">&#40;</span>width<span style="color: #339933;">*</span><span style="color: #cc66cc;">3</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">4</span>, <span style="color: #cc66cc;">0</span>, width<span style="color: #339933;">/</span><span style="color: #cc66cc;">4</span>, height,  centerColor, edgeColor, edgeColor, centerColor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// Draw a fuzzy rectangle</span>
  color rectColor <span style="color: #339933;">=</span> color<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">80</span>,<span style="color: #cc66cc;">80</span>,<span style="color: #cc66cc;">140</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">int</span> widt <span style="color: #339933;">=</span> <span style="color: #cc66cc;">100</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#40;</span>map<span style="color: #009900;">&#40;</span>mouseY,<span style="color: #cc66cc;">0</span>,width,<span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">200</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">int</span> heigh <span style="color: #339933;">=</span> <span style="color: #cc66cc;">80</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#40;</span>map<span style="color: #009900;">&#40;</span>mouseY,<span style="color: #cc66cc;">0</span>,width,<span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">200</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">int</span> rad <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#40;</span>map<span style="color: #009900;">&#40;</span>mouseX,<span style="color: #cc66cc;">0</span>,width,<span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">50</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  drawFuzzyRectangle<span style="color: #009900;">&#40;</span>mouseX, mouseY, widt, heigh, rad, rectColor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.cibomahto.com/2012/08/making-gradients-in-processing-using-opengl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Turn a Chumby into a tiny internet kiosk</title>
		<link>http://www.cibomahto.com/2011/08/turn-a-chumby-into-a-tiny-internet-kiosk/</link>
		<comments>http://www.cibomahto.com/2011/08/turn-a-chumby-into-a-tiny-internet-kiosk/#comments</comments>
		<pubDate>Thu, 25 Aug 2011 02:55:53 +0000</pubDate>
		<dc:creator>mahto</dc:creator>
				<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.cibomahto.com/?p=1650</guid>
		<description><![CDATA[In a quest to earn a fine bottle of scotch (and help my friend Marty out with a project), I modified the Chumby web browser to be a full-screen kiosk. To make it work, just grab this file, unzip the &#8230; <a href="http://www.cibomahto.com/2011/08/turn-a-chumby-into-a-tiny-internet-kiosk/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.cibomahto.com/?attachment_id=1651" rel="attachment wp-att-1651"><img src="http://www.cibomahto.com/wp-content/uploads/2011/08/2011-08-24-22.27.04-600x450.jpg" alt="" title="SAMSUNG" width="600" height="450" class="alignnone size-medium wp-image-1651" /></a></p>
<p>In a quest to earn a fine bottle of scotch (and help my friend <a href="http://creatingwithcode.com/">Marty</a> out with a project), I modified the <a href="http://wiki.chumby.com/index.php/Web_Browser">Chumby web browser</a> to be a full-screen kiosk. To make it work, just <a href="http://cibomahto.com/files/insignia_infocast_fullscreen_browser.zip">grab this file</a>, unzip the contents into a usb stick or SD card, place the card in your Insignia, and reboot. You can change the URL that it loads by modifying the file debugchumby (use your desktop computer, the Chumby doesn&#8217;t seem to like writing to USB).</p>
<p>This can be used to make nice interfaces for the Chumby without having to learn flash or compile anything. Simply make a nice whiz-bang HTML page, and you should be good to go!</p>
<p>Source code for this super simple browser <a href='http://www.cibomahto.com/wp-content/uploads/2011/08/tinybrowser.zip'>is here</a>. Note that this is for the 8&#8243; Insignia Infocast branded machine. You can probably get it to work with the other Chumbys, but will need to recompile. Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cibomahto.com/2011/08/turn-a-chumby-into-a-tiny-internet-kiosk/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The One-Hour Coasterbot</title>
		<link>http://www.cibomahto.com/2011/07/the-one-hour-coasterbot/</link>
		<comments>http://www.cibomahto.com/2011/07/the-one-hour-coasterbot/#comments</comments>
		<pubDate>Tue, 26 Jul 2011 04:05:26 +0000</pubDate>
		<dc:creator>mahto</dc:creator>
				<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.cibomahto.com/?p=1631</guid>
		<description><![CDATA[Gareth just finished a Make: Projects version of the one-hour coasterbot build that I created for a contest last year. Thanks, Gareth!]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.cibomahto.com/?attachment_id=1639" rel="attachment wp-att-1639"><img src="http://www.cibomahto.com/wp-content/uploads/2011/07/DSC_3039-Modified.jpg" alt="" title="DSC_3039 (Modified)" width="600" height="450" class="alignnone size-full wp-image-1639" /></a></p>
<p>Gareth just finished a Make: Projects version of the <a href="http://makeprojects.com/Project/One-Hour-CoasterBot/1126/1">one-hour coasterbot build</a> that I created for a contest last year. Thanks, Gareth!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cibomahto.com/2011/07/the-one-hour-coasterbot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interview at Robots Dreams</title>
		<link>http://www.cibomahto.com/2011/05/interview-at-robots-dreams/</link>
		<comments>http://www.cibomahto.com/2011/05/interview-at-robots-dreams/#comments</comments>
		<pubDate>Tue, 10 May 2011 15:38:01 +0000</pubDate>
		<dc:creator>mahto</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.cibomahto.com/?p=1628</guid>
		<description><![CDATA[Lem Fugitt from Robots Dreams stopped by the Botcave and interviewed me. We also talked about MakerBot: Thanks, Lem!]]></description>
			<content:encoded><![CDATA[<p><iframe width="600" height="371" src="http://www.youtube.com/embed/AA0zwTSY84I?rel=0" frameborder="0" allowfullscreen></iframe></p>
<p>Lem Fugitt from Robots Dreams stopped by the Botcave and <a href="http://www.robots-dreams.com/2011/05/artistmakercreator-matt-mets-video.html">interviewed me</a>. We also <a href="http://www.robots-dreams.com/2011/05/makerbot-industries-evolution-matt-mets-video.html">talked about MakerBot</a>:</p>
<p><iframe width="599" height="341" src="http://www.youtube.com/embed/dODKP0aiCKs?rel=0" frameborder="0" allowfullscreen></iframe></p>
<p>Thanks, Lem!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cibomahto.com/2011/05/interview-at-robots-dreams/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Salt &amp; Pepper Creature (Work in Progress)</title>
		<link>http://www.cibomahto.com/2011/04/1622/</link>
		<comments>http://www.cibomahto.com/2011/04/1622/#comments</comments>
		<pubDate>Wed, 20 Apr 2011 02:14:51 +0000</pubDate>
		<dc:creator>mahto</dc:creator>
				<category><![CDATA[Blogroll]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.cibomahto.com/?p=1622</guid>
		<description><![CDATA[I&#8217;m working on a three part, printable model (top, bottom, actuator arm) that can be made into a little electronic puppet by adding a cheap servo and snapping it together. It&#8217;s an adaptation of DesignGlut&#8217;s Salt and Pepper Shakers. Model &#8230; <a href="http://www.cibomahto.com/2011/04/1622/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><object type="application/x-shockwave-flash" width="601" height="401" data="http://www.flickr.com/apps/video/stewart.swf?v=71377" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="flashvars" value="intl_lang=en-us&#038;photo_secret=462ac509b2&#038;photo_id=5636040233"></param><param name="movie" value="http://www.flickr.com/apps/video/stewart.swf?v=71377"></param><param name="bgcolor" value="#000000"></param><param name="allowFullScreen" value="true"></param><embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/video/stewart.swf?v=71377" bgcolor="#000000" allowfullscreen="true" flashvars="intl_lang=en-us&#038;photo_secret=462ac509b2&#038;photo_id=5636040233" height="401" width="601"></embed></object></p>
<p>I&#8217;m working on a three part, printable model (top, bottom, actuator arm) that can be made into a little electronic puppet by adding a cheap servo and snapping it together. It&#8217;s an adaptation of DesignGlut&#8217;s <a href="http://www.thingiverse.com/thing:859">Salt and Pepper Shakers</a>. Model files coming when I get back to my other computer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cibomahto.com/2011/04/1622/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keepon head hat</title>
		<link>http://www.cibomahto.com/2011/02/keepon-head-hat/</link>
		<comments>http://www.cibomahto.com/2011/02/keepon-head-hat/#comments</comments>
		<pubDate>Thu, 24 Feb 2011 05:33:19 +0000</pubDate>
		<dc:creator>mahto</dc:creator>
				<category><![CDATA[Ridiculous]]></category>

		<guid isPermaLink="false">http://www.cibomahto.com/?p=1617</guid>
		<description><![CDATA[Keepon came to visit the Botcave last week, so I made him a hat that looks like his own head.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.cibomahto.com/?attachment_id=1618" rel="attachment wp-att-1618"><img src="http://www.cibomahto.com/wp-content/uploads/2011/02/keepon_headhat-600x450.jpg" alt="" title="keepon_headhat" width="600" height="450" class="alignnone size-medium wp-image-1618" /></a></p>
<p><a href="http://beatbots.net">Keepon</a> came to visit the Botcave last week, so I <a href="http://www.thingiverse.com/image:44768">made him a hat</a> that looks like his own head.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cibomahto.com/2011/02/keepon-head-hat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Physical build progress meter for 3d printer</title>
		<link>http://www.cibomahto.com/2011/02/physical-build-progress-meter-for-3d-printer/</link>
		<comments>http://www.cibomahto.com/2011/02/physical-build-progress-meter-for-3d-printer/#comments</comments>
		<pubDate>Sat, 05 Feb 2011 09:30:18 +0000</pubDate>
		<dc:creator>mahto</dc:creator>
				<category><![CDATA[Ridiculous]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.cibomahto.com/?p=1585</guid>
		<description><![CDATA[Yesterday I made this progress meter attachment for the 3d printer that I have at work, that rotates to show me how far along my print is: Love 3d printing with your Thing-o-Matic, but wish there were a better way &#8230; <a href="http://www.cibomahto.com/2011/02/physical-build-progress-meter-for-3d-printer/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.cibomahto.com/?attachment_id=1586" rel="attachment wp-att-1586"><img src="http://www.cibomahto.com/wp-content/uploads/2011/02/unicorn_build_progress_meter_display_medium-600x490.jpg" alt="" title="unicorn_build_progress_meter_display_medium" width="600" height="490" class="alignnone size-medium wp-image-1586" /></a></p>
<p>Yesterday I made this <a href="http://www.thingiverse.com/thing:6093">progress meter</a> attachment for the 3d printer that I have at work, that rotates to show me how far along my print is:</p>
<blockquote><p>Love 3d printing with your Thing-o-Matic, but wish there were a better way to see how your print is progressing? Well, today is your lucky day- if you&#8217;ve got a spare hobby servo (the one in the Unicorn works great), then you can make your very own progress gauge! </p></blockquote>
<p>Source code and directions on Thingiverse.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cibomahto.com/2011/02/physical-build-progress-meter-for-3d-printer/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Toilet paper roll holder</title>
		<link>http://www.cibomahto.com/2011/01/toilet-paper-roll-holder/</link>
		<comments>http://www.cibomahto.com/2011/01/toilet-paper-roll-holder/#comments</comments>
		<pubDate>Mon, 31 Jan 2011 03:39:28 +0000</pubDate>
		<dc:creator>mahto</dc:creator>
				<category><![CDATA[Journal]]></category>
		<category><![CDATA[Ridiculous]]></category>

		<guid isPermaLink="false">http://www.cibomahto.com/?p=1579</guid>
		<description><![CDATA[Today I designed a toilet paper roll holder: Tired of having to hunt for that roll of soft tissue every time you do your business? If only there were a fashionable hook upon which you could place this precious velvet! &#8230; <a href="http://www.cibomahto.com/2011/01/toilet-paper-roll-holder/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.cibomahto.com/2011/01/toilet-paper-roll-holder/toilet_roll_holder/" rel="attachment wp-att-1580"><img src="http://www.cibomahto.com/wp-content/uploads/2011/01/toilet_roll_holder-600x492.jpg" alt="" title="toilet_roll_holder" width="600" height="492" class="alignnone size-medium wp-image-1580" /></a></p>
<p>Today I designed a <a href="http://www.thingiverse.com/thing:5938">toilet paper roll holder</a>:</p>
<blockquote><p>Tired of having to hunt for that roll of soft tissue every time you do your business? If only there were a fashionable hook upon which you could place this precious velvet!</p>
<p>Fortunately for you, oh bachelor or bachelorette, Science has heard your cries and has an answer! What you are seeking is called a toilet paper roll holder, and they are none to difficult to acquire! Sensible people would go to the store and buy a nice wooden or metal one to match their decor, but who are we kidding? You&#8217;re either desperate or have no sense of taste, so join the club and print yourself one now!</p>
<p>This design is inspired by Charles Pax&#8217;s filament spool holder. You&#8217;ll need a Thingomatic with a slightly taller than average (116mm+) build height in order to construct it. </p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.cibomahto.com/2011/01/toilet-paper-roll-holder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
