<?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>nodename &#187; geometry</title>
	<atom:link href="http://nodename.com/blog/tag/geometry/feed/" rel="self" type="application/rss+xml" />
	<link>http://nodename.com/blog</link>
	<description></description>
	<lastBuildDate>Fri, 05 Feb 2010 05:06:48 +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>Trees Grow</title>
		<link>http://nodename.com/blog/2009/12/14/trees-grow/</link>
		<comments>http://nodename.com/blog/2009/12/14/trees-grow/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 13:54:48 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[geometry]]></category>

		<guid isPermaLink="false">http://nodename.com/blog/?p=194</guid>
		<description><![CDATA[Constrained minimum spanning trees as shape fills, the moving version of my earlier post The Name of the Node. <span style="color:#777"> . . . &#8594; Read More: <a href="http://nodename.com/blog/2009/12/14/trees-grow/">Trees Grow</a></span>]]></description>
			<content:encoded><![CDATA[<style type="text/css">
#theMovie {
margin: 0 auto;
width: 640px;
border-width: 1;
border-style : solid ;
border-color : black ;
}
</style>
<p>Constrained minimum spanning trees as shape fills, the moving version of my earlier post <a href="http://nodename.com/blog/2009/05/12/the-name-of-the-node/">The Name of the Node</a>. On each frame one point is added, all the points move, and their spanning trees are drawn. Character: JIE2, &#8220;knot&#8221;.</p>
<div id="theMovie"><object width="640" height="505"><param name="movie" value="http://www.youtube.com/v/BHO6zeW9sQA&#038;hl=en&#038;fs=1&#038;rel=0&#038;ap=%2526fmt%3D18"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/BHO6zeW9sQA&#038;hl=en&#038;fs=1&#038;rel=0&#038;ap=%2526fmt%3D18" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="505"></embed></object></div>
<p>(Be sure to view the movie in 480p.)</p>
<p>Note that since the segments are filled with trees, which may branch but never loop, the KOU3 (&#8220;mouth&#8221;) in the lower right quadrant is never a closed box. In every frame there is an escape path from the inside to the outside.</p>
]]></content:encoded>
			<wfw:commentRss>http://nodename.com/blog/2009/12/14/trees-grow/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Crystals, Evil Rangers, and Voronoi without an Engine</title>
		<link>http://nodename.com/blog/2009/07/01/crystals-evil-rangers-and-voronoi-without-an-engine/</link>
		<comments>http://nodename.com/blog/2009/07/01/crystals-evil-rangers-and-voronoi-without-an-engine/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 20:41:03 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[BitmapData]]></category>
		<category><![CDATA[geometry]]></category>
		<category><![CDATA[Voronoi]]></category>

		<guid isPermaLink="false">http://nodename.com/blog/?p=205</guid>
		<description><![CDATA[<p>In Flash we can HARNESS THE POWER OF BITMAPDATA (as it might be put in a conference session blurb) to grow Voronoi regions under differing conditions, without doing any algebra.  Click on the image to launch the Voronoi Generator.</p>
<p>

 </p>
<p>Variations on Voronoi Diagrams, from Geometry in Action:</p>
<p>One way of getting Voronoi diagrams is by growing <span style="color:#777"> . . . &#8594; Read More: <a href="http://nodename.com/blog/2009/07/01/crystals-evil-rangers-and-voronoi-without-an-engine/">Crystals, Evil Rangers, and Voronoi without an Engine</a></span>]]></description>
			<content:encoded><![CDATA[<p>In Flash we can HARNESS THE POWER OF BITMAPDATA (as it might be put in a conference session blurb) to grow Voronoi regions under differing conditions, without doing any algebra.  Click on the image to launch the Voronoi Generator.</p>
<p><center><br />
<a href="/wpEmbeds/GenerateVoronoi/GenerateVoronoi.swf" rel="shadowbox;width=800;height=650"><img src="/wpEmbeds/GenerateVoronoi/Disconnected.jpg" alt="Disconnected!" /></a><br />
 </center></p>
<p><a href="http://www.ics.uci.edu/~eppstein/gina/scot.drysdale.html#var">Variations on Voronoi Diagrams</a>, from <a href="http://www.ics.uci.edu/~eppstein/geom.html">Geometry in Action</a>:</p>
<blockquote><p>One way of getting Voronoi diagrams is by growing crystals. If you start a number of crystals, all growing at the same rate, and all starting at the same time, you get a number of growing circles. As these circles meet, straight line boundaries appear between them. Eventually, the entire plane will be filled up. Each crystal will exactly fill up the Voronoi region of its point of origin.</p>
<p>This is a little too simple. In reality, crystals start growing at different times. Even if they still grow at the same rate, if they start at different times, they will no longer meet in straight lines. Instead, they will meet in hyperbolic segments. The diagram you get is called the &#8220;additively weighted Voronoi diagram&#8221;. It&#8217;s defined just like the usual Voronoi diagram, but each site has a weight, and you measure distance to a site, you add its weight to the usual Euclidean distance.</p>
<p>Now suppose instead that all the crystals start at the same time, but grow at different rates. Now you get what&#8217;s called the &#8220;multiplicatively weighted Voronoi diagram&#8221;. Once again, each site is given a weight, but when you measure the distance to a site, you multiply by its weight. Now the boundaries between different regions are segments of circles.</p>
<p>This model still has some problems. For example, in a multiplicatively weighted Voronoi diagram, it&#8217;s possible for a region to be disconnected [ see picture above -- AS ]. Obviously, this can&#8217;t happen with real crystals. So there&#8217;s yat another version which treats existing crystals as obstacles, and lets fast-growing crystals grow around the slower ones. Now the boundaries between neighboring regions are sort of tear-shaped. This variation is called the &#8220;multiplicatively weighted crystal growth Voronoi diagram.&#8221;</p>
<p>There are several other variations. You can change the metric from the normal Euclidean distance to L<sub>1</sub>, or L<sub>p</sub>, or L<sub>infinity</sub>, or even stranger distance functions. You can weight the sites additively and mulitplicatively. You can change the sites from points to line segments or circles or polygons. You can generalize to higher dimensions. You can associate points with the farthest site, instead of their nearest site. And so on.</p>
<p>Different applications of Voronoi diagrams require different variations. For example, motion planning algorithms for circular robots often use the Voronoi diagram of the obstacles. If there is a path from one location to another, then there must be a path that follows the edges of the Voronoi diagram, since those edges are by definition as far from the obstacles as possible.</p></blockquote>
<p>The &#8220;L<sub>1</sub> metric&#8221; is called the <em>Manhattan metric</em> or <em>city-block distance</em>.  &#8220;Manhattan metric&#8221; is a misnomer, though, because in Manhattan the east-west blocks are much longer than the north-south blocks.</p>
<p>The crystal-growth model is equivalent to the &#8220;evil forest ranger model,&#8221; in which instead of watching for forest fires, the rangers set fire to their lookouts, sometimes at different times, and the fires may spread at different rates.  Voronoi diagrams indeed find application in crystallography and in forest-fire modelling.</p>
<p>And <a href="http://hoosiermuse.wordpress.com/2009/06/01/gary-snyder-in-the-north-cascades/">here</a> is a post about a far-from-evil lookout.</p>
]]></content:encoded>
			<wfw:commentRss>http://nodename.com/blog/2009/07/01/crystals-evil-rangers-and-voronoi-without-an-engine/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Marching Squares: Boundary detection</title>
		<link>http://nodename.com/blog/2009/06/18/marching-squares-boundary-detection/</link>
		<comments>http://nodename.com/blog/2009/06/18/marching-squares-boundary-detection/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 23:30:59 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[geometry]]></category>
		<category><![CDATA[morph]]></category>

		<guid isPermaLink="false">http://nodename.com/blog/?p=173</guid>
		<description><![CDATA[A little code for a change. <span style="color:#777"> . . . &#8594; Read More: <a href="http://nodename.com/blog/2009/06/18/marching-squares-boundary-detection/">Marching Squares: Boundary detection</a></span>]]></description>
			<content:encoded><![CDATA[<p>A little code for a change.</p>
<p><a href="http://www.sakri.net/blog/2009/05/28/detecting-edge-pixels-with-marching-squares-algorithm/#comments">Sakri</a> was working on this, and I ported a class from Java which I believe he adapted into his final implementation.  It&#8217;s a basic tool for morphing, 3D surface reconstruction, and <a href="http://en.nicoptere.net/?p=166">vectorization</a>.</p>
<p>I&#8217;ve cleaned up my version of it and I offer it here.  The important function signature looks like this:</p>
<pre>
public static function perimeter(data:BitmapData, x:int, y:int):Vector.&lt;Point&gt;
</pre>
<p>It returns a list of pixels representing the boundary between opaque and transparent pixels, starting from a single boundary point that you provide.</p>
<p>You can get a boundary point using Sakri&#8217;s and Mario&#8217;s <a href="http://www.quasimondo.com/archives/000683.php">EdgeFinder class</a>.</p>
<p>Download the <a href="http://nodename.com/wpEmbeds/MarchingSquares/MarchingSquares.as">source</a>.</p>
<p>How it works:  <a href="http://en.wikipedia.org/wiki/Marching_squares">Marching Squares on Wikipedia</a></p>
]]></content:encoded>
			<wfw:commentRss>http://nodename.com/blog/2009/06/18/marching-squares-boundary-detection/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mona Voronita</title>
		<link>http://nodename.com/blog/2009/05/18/mona-voronita/</link>
		<comments>http://nodename.com/blog/2009/05/18/mona-voronita/#comments</comments>
		<pubDate>Tue, 19 May 2009 02:39:45 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Delaunay]]></category>
		<category><![CDATA[geometry]]></category>
		<category><![CDATA[Voronoi]]></category>

		<guid isPermaLink="false">http://nodename.com/blog/?p=139</guid>
		<description><![CDATA[<p>Click on the image to see 1000 Voronoi points in motion.  Keyboard controls as in the Voronoi Toy.</p>
<p>If the popup won&#8217;t go away when you click the X, click in the movie and hit &#8220;s&#8221; to stop the moving points.</p>
<p>

 </p>
<p>I couldn&#8217;t <span style="color:#777"> . . . &#8594; Read More: <a href="http://nodename.com/blog/2009/05/18/mona-voronita/">Mona Voronita</a></span>]]></description>
			<content:encoded><![CDATA[<p>Click on the image to see 1000 Voronoi points in motion.  Keyboard controls as in the <a href="http://nodename.com/blog/2009/05/11/a-voronoi-toy/" target="_blank">Voronoi Toy</a>.</p>
<p>If the popup won&#8217;t go away when you click the X, click in the movie and hit &#8220;s&#8221; to stop the moving points.</p>
<p><center><br />
<a href="/wpEmbeds/MonaVoronita/bin/MonaVoronita.swf" rel="shadowbox;width=298;height=425"><img src="/wpEmbeds/MonaVoronita/MonaOnCrack.jpg" alt="" /></a><br />
 </center></p>
<p>I couldn&#8217;t resist, <a href="http://www.dasprinzip.com/prinzipiell/2008/08/25/voronoi-tesselations/" target="_blank">Frank</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://nodename.com/blog/2009/05/18/mona-voronita/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Name of the Node: Image Fill with Spanning Trees</title>
		<link>http://nodename.com/blog/2009/05/12/the-name-of-the-node/</link>
		<comments>http://nodename.com/blog/2009/05/12/the-name-of-the-node/#comments</comments>
		<pubDate>Tue, 12 May 2009 18:31:19 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Delaunay]]></category>
		<category><![CDATA[geometry]]></category>
		<category><![CDATA[Voronoi]]></category>

		<guid isPermaLink="false">http://nodename.com/blog/?p=118</guid>
		<description><![CDATA[<p>I&#8217;ve rendered some images using the Voronoi Toy from my last post.</p>
<p>I&#8217;ve used my logo 結 (as in 結點 &#8220;node&#8221;) as the input image, run Sakri Rosenstrom&#8217;s image segmentation algorithm on it, dropped 10,000 random points into the segments, and drawn the minimum spanning tree of each set of points, thus creating a sort of space-filling <span style="color:#777"> . . . &#8594; Read More: <a href="http://nodename.com/blog/2009/05/12/the-name-of-the-node/">The Name of the Node: Image Fill with Spanning Trees</a></span>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve rendered some images using the <a href="http://nodename.com/blog/2009/05/11/a-voronoi-toy/">Voronoi Toy</a> from my last post.</p>
<p>I&#8217;ve used my logo <a href="http://en.wiktionary.org/wiki/結">結</a> (as in 結點 &#8220;node&#8221;) as the input image, run Sakri Rosenstrom&#8217;s <a href="http://www.sakri.net/blog/2009/03/03/extracting-positive-and-negative-shapes-from-a-bitmapdata/">image segmentation algorithm</a> on it, dropped 10,000 random points into the segments, and drawn the minimum spanning tree of each set of points, thus creating a sort of space-filling tree.</p>
<p>The idea for this kind of fill comes from <a href="http://quasimondo.com/">Mario Klingemann</a>&#8216;s presentation at FITC.</p>
<p>Click on each image for a larger version.</p>
<p><center></p>
<p>
<a href="/wpEmbeds/NameoftheNode/JieSpanningLarge.jpg" rel="shadowbox;width=800;height=800"><img src="/wpEmbeds/NameoftheNode/JieSpanningSmall.jpg" alt="" /></a>
</p>
<p>
<a href="/wpEmbeds/NameoftheNode/JieSpanningNegativeLarge.jpg" rel="shadowbox;width=1161;height=1162"><img src="/wpEmbeds/NameoftheNode/JieSpanningNegativeSmall.jpg" alt="" /></a>
</p>
<p></center></p>
]]></content:encoded>
			<wfw:commentRss>http://nodename.com/blog/2009/05/12/the-name-of-the-node/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Relaxing in the Plane: A Voronoi Toy</title>
		<link>http://nodename.com/blog/2009/05/11/a-voronoi-toy/</link>
		<comments>http://nodename.com/blog/2009/05/11/a-voronoi-toy/#comments</comments>
		<pubDate>Tue, 12 May 2009 01:43:11 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Delaunay]]></category>
		<category><![CDATA[geometry]]></category>
		<category><![CDATA[Voronoi]]></category>

		<guid isPermaLink="false">http://nodename.com/blog/?p=68</guid>
		<description><![CDATA[relax, v.
10. Chiefly Physics.  To return towards a state of equilibrium. (OED)
 <span style="color:#777"> . . . &#8594; Read More: <a href="http://nodename.com/blog/2009/05/11/a-voronoi-toy/">Relaxing in the Plane: A Voronoi Toy</a></span>]]></description>
			<content:encoded><![CDATA[<p>relax, v.<br />
10. Chiefly Physics.  To return towards a state of equilibrium. (OED)</p>
<p>Here&#8217;s the planar analog of my earlier post <a href="http://nodename.com/blog/2008/09/19/distributing-points-on-the-sphere/">Distributing Points on the Sphere</a>.  This time I&#8217;ve ported Steve Fortune&#8217;s <a href="http://netlib.org/voronoi/sweep2">C implementation</a> of his sweepline algorithm for Voronoi diagrams, and applied <a href="http://en.wikipedia.org/wiki/Lloyd's_algorithm">Lloyd&#8217;s algorithm</a> to change the input values (the point locations) iteratively so the output function (the stress or energy) approaches a minimum.  Lloyd&#8217;s algorithm works by repeatedly computing the Voronoi diagram and moving each point to the centroid of its region.  Soon the points converge to an even distribution.  You can see this in action by starting the app by clicking on the image, and then pressing the &#8220;r&#8221; key.</p>
<p>While I was at it I built out some more of the basic Voronoi-related geometric structures: the <a href="http://en.wikipedia.org/wiki/Delaunay_triangulation">Delaunay triangulation</a>, the <a href="http://en.wikipedia.org/wiki/Convex_hull">convex hull</a>, the <a href="http://cgm.cs.mcgill.ca/~orm/ontri.html">onion</a>, and the <a href="http://en.wikipedia.org/wiki/Euclidean_minimum_spanning_tree">minimum spanning tree</a>.</p>
<p>I&#8217;ve had fun playing with this app, changing the display options while moving, adding, or removing points.  I hope you enjoy it.</p>
<p><center><br />
<a href="/wpEmbeds/VoronoiToy/bin/PlanePointsApp.swf" rel="shadowbox;width=860;height=650"><img src="/wpEmbeds/VoronoiToy/Creeper.jpg" alt="" /></a></p>
<p>(The app is built for Flash Player 10.)<br />
 </center></p>
]]></content:encoded>
			<wfw:commentRss>http://nodename.com/blog/2009/05/11/a-voronoi-toy/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Distributing Points on the Sphere</title>
		<link>http://nodename.com/blog/2008/09/19/distributing-points-on-the-sphere/</link>
		<comments>http://nodename.com/blog/2008/09/19/distributing-points-on-the-sphere/#comments</comments>
		<pubDate>Fri, 19 Sep 2008 05:25:45 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[geometry]]></category>

		<guid isPermaLink="false">http://nodename.com/blog/?p=64</guid>
		<description><![CDATA[<p>Distributing points on the sphere by electrostatic repulsion, ported from Bulatov&#8217;s C++ code.</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_SpherePointsApp_346914139"
			class="flashmovie"
			width="600"
			height="600">
	<param name="movie" value="/wpEmbeds/SpherePoints/SpherePointsApp.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/wpEmbeds/SpherePoints/SpherePointsApp.swf"
			name="fm_SpherePointsApp_346914139"
			width="600"
			height="600">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
References
<p>Distributing points on the sphere</p>
<p>Symmetries of configurations of charges on <span style="color:#777"> . . . &#8594; Read More: <a href="http://nodename.com/blog/2008/09/19/distributing-points-on-the-sphere/">Distributing Points on the Sphere</a></span>]]></description>
			<content:encoded><![CDATA[<p>Distributing points on the sphere by electrostatic repulsion, ported from <a href="http://www.math.niu.edu/~rusin/known-math/96/repulsion">Bulatov&#8217;s C++ code</a>.</p>
<p><center><br />

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_SpherePointsApp_2021577733"
			class="flashmovie"
			width="600"
			height="600">
	<param name="movie" value="/wpEmbeds/SpherePoints/SpherePointsApp.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/wpEmbeds/SpherePoints/SpherePointsApp.swf"
			name="fm_SpherePointsApp_2021577733"
			width="600"
			height="600">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object><br />
</center></p>
<h3>References</h3>
<p><a href="http://www.maths.unsw.edu.au/school/articles/me100.html">Distributing points on the sphere</a></p>
<p><a href="http://article.pubs.nrc-cnrc.gc.ca/ppv/RPViewDoc?issn=1480-3291&#038;volume=66&#038;issue=9&#038;startPage=2161">Symmetries of configurations of charges on a sphere</a></p>
]]></content:encoded>
			<wfw:commentRss>http://nodename.com/blog/2008/09/19/distributing-points-on-the-sphere/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
