<?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>the chance idea</title>
	<atom:link href="http://www.thechanceidea.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.thechanceidea.com</link>
	<description>algorithms by jason scherer</description>
	<lastBuildDate>Mon, 26 Mar 2012 15:29:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Greebler</title>
		<link>http://www.thechanceidea.com/?p=25</link>
		<comments>http://www.thechanceidea.com/?p=25#comments</comments>
		<pubDate>Sat, 05 Nov 2011 13:35:45 +0000</pubDate>
		<dc:creator>wpitadmin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.instanttheories.com/?p=25</guid>
		<description><![CDATA[&#8220;Greebles&#8221; are those thousands and thousands of little tiny details you&#8217;ve seen on the surface of spaceships in science fiction movies.  Think of the star destroyers from Star Wars &#8212; all those tiny grey dohickeys all over the ship are &#8230; <a href="http://www.thechanceidea.com/?p=25">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>&#8220;Greebles&#8221; are those thousands and thousands of little tiny details you&#8217;ve seen on the surface of spaceships in science fiction movies.  Think of the <a href=" http://en.wikipedia.org/wiki/Star_Destroyer">star destroyers</a> from Star Wars &#8212; all those tiny grey dohickeys all over the ship are called &#8220;greebles.&#8221;</p>
<p>I&#8217;m interested in generating greeble-like textures not because I want to model spaceships (though I suppose that could be fun) but because the idea of variegated and detailed 3-D surfaces appeals to me as the procedural equivalent of a bas-relief.  My first attempt at executing this used Cinder and OpenGL, but I found that the images I was able to render didn&#8217;t include a very essential property of greebling or bas-relief: self-shadowing.  Without pieces of the structure casting shadows on other pieces of the structure, the surface looks dull and lifeless.  It&#8217;s possible to create shadow maps in OpenGL, but the way a basic shadow map works is that you have a distinct shadow-casting object and a surface being shadowed.  With the kind of complex surfaces I was planning to model, almost every object would be both shadowed and shadowing another object.  So, rather than diving even deeper into advanced types of shadow maps and/or shadow volumes, I just ditched OpenGL and turned to <a href="http://www.povray.org/">POV-Ray</a>.</p>
<p>POV-Ray turned out to be perfect for this.  The syntax is simple and the usage is easy: in your text file, you just describe the objects in your scene, cameras, lights, etc., and compile it.  Here is the result of my first attempt at an autogreebling algorithm:</p>
<p><a href="http://www.instanttheories.com/wp-content/uploads/2011/11/wim.png"><img class="alignnone size-medium wp-image-24" title="Piles of grey boxes" src="http://www.instanttheories.com/wp-content/uploads/2011/11/wim-300x225.png" alt="" width="300" height="225" /></a></p>
<p>The algorithm is recursive: basically there&#8217;s a function that takes as input a rectangular area on the <em>x</em>-<em>y</em> plane specified in terms of left, right, top, and bottom edges.  This function extrudes a box of that area in the <em>z</em> direction and then subdivides randomly into 4 smaller areas, and then recursively calls itself.  When the area of a box gets small enough, the base case is reached and the recursion stops.</p>
<p>I&#8217;m hoping to do more with this technique.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thechanceidea.com/?feed=rss2&#038;p=25</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fan</title>
		<link>http://www.thechanceidea.com/?p=1</link>
		<comments>http://www.thechanceidea.com/?p=1#comments</comments>
		<pubDate>Wed, 02 Nov 2011 13:38:55 +0000</pubDate>
		<dc:creator>wpitadmin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.instanttheories.com/?p=1</guid>
		<description><![CDATA[I&#8217;ve been experimenting with a &#8220;low-alpha buildup&#8221; technique.  The idea is to draw simple visual elements (e.g. lines, points) over and over at a very low alpha value (below 0.05, i.e. almost invisible) according to some parametric function of t &#8230; <a href="http://www.thechanceidea.com/?p=1">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been experimenting with a &#8220;low-alpha buildup&#8221; technique.  The idea is to draw simple visual elements (e.g. lines, points) over and over at a very low alpha value (below 0.05, i.e. almost invisible) according to some parametric function of <em>t</em> (time), and don&#8217;t &#8220;erase&#8221; anything by repainting the background color.  The idea is that over time, there will be a slow buildup of color at various points determined by the function.  In effect, this technique seems similar to what an illustrator does with a pencil where they gradually build up color or texture by drawing lightly over the same areas again and again.</p>
<p>Here&#8217;s an example I&#8217;m calling &#8220;fan.&#8221;  The algorithm works like this: it draws white bezier curves over and over at low alpha, oscillating the locations of the control points and anchor points along four equally-spaced lines that fan out from the top of the image to the bottom.  From left to right, the lines are:</p>
<ol>
<li>Anchor point, varies by c<sub>1</sub> * sin(t)</li>
<li>Control point, varies by c<sub>2</sub> * cos(t)</li>
<li>Control point, varies by c<sub>3</sub> * sin(t)</li>
<li>Anchor poiint, varies by c<sub>4</sub> * cos(t)</li>
</ol>
<p>The image below was produced when c<sub>1</sub> = c<sub>4</sub> = 1.2 and c<sub>2</sub> = c<sub>3</sub> = 0.1, with a timestep of π/128</p>
<div id="attachment_6" class="wp-caption alignnone" style="width: 310px"><a href="http://www.instanttheories.com/wp-content/uploads/2011/11/fan.png"><img class="size-medium wp-image-6" title="fan" src="http://www.instanttheories.com/wp-content/uploads/2011/11/fan-300x300.png" alt="Fan" width="300" height="300" /></a><p class="wp-caption-text">Fan</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.thechanceidea.com/?feed=rss2&#038;p=1</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

