<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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>Comments on: Points on a sphere</title>
	<atom:link href="http://www.xsi-blog.com/archives/115/feed" rel="self" type="application/rss+xml" />
	<link>http://www.xsi-blog.com/archives/115#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=points-on-a-sphere</link>
	<description>People and thoughts behind XSI in production...</description>
	<lastBuildDate>Fri, 12 Mar 2010 18:58:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Anton Sherwood</title>
		<link>http://www.xsi-blog.com/archives/115/comment-page-1#comment-17444</link>
		<dc:creator>Anton Sherwood</dc:creator>
		<pubDate>Mon, 01 Feb 2010 04:24:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=115#comment-17444</guid>
		<description>Will: &lt;i&gt;Do any of you think you’d be able to expand this to higher dimensions?&lt;/i&gt;

I downloaded from somewhere-or-other a doctoral thesis (2006) by a Paul Leopardi at UNSW which gives a method for dividing any N-sphere into sectors of equal area (and reasonable compactness) by lines of latitude and longitude.  I haven&#039;t finished looking through it but I suspect that its approach can be adapted to suggest a generalization of the spiral method to N dimensions.</description>
		<content:encoded><![CDATA[<p>Will: <i>Do any of you think you’d be able to expand this to higher dimensions?</i></p>
<p>I downloaded from somewhere-or-other a doctoral thesis (2006) by a Paul Leopardi at UNSW which gives a method for dividing any N-sphere into sectors of equal area (and reasonable compactness) by lines of latitude and longitude.  I haven&#8217;t finished looking through it but I suspect that its approach can be adapted to suggest a generalization of the spiral method to N dimensions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anton Sherwood</title>
		<link>http://www.xsi-blog.com/archives/115/comment-page-1#comment-17443</link>
		<dc:creator>Anton Sherwood</dc:creator>
		<pubDate>Mon, 01 Feb 2010 04:18:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=115#comment-17443</guid>
		<description>Chen, here&#039;s one way, off the top of my head.  Pick two numbers P,Q, such that gcd(N,P) = gcd(N,Q) = gcd(P,Q) = 1, that is, each pair of numbers is relatively prime (has no common factors).

for 0 &#8804; j &lt; N :
    x[j] = (width/N) * (0.5 + (j*P)%N)
    y[j] = (height/N) * (0.5 + (j*Q)%N)</description>
		<content:encoded><![CDATA[<p>Chen, here&#8217;s one way, off the top of my head.  Pick two numbers P,Q, such that gcd(N,P) = gcd(N,Q) = gcd(P,Q) = 1, that is, each pair of numbers is relatively prime (has no common factors).</p>
<p>for 0 &le; j &lt; N :<br />
    x[j] = (width/N) * (0.5 + (j*P)%N)<br />
    y[j] = (height/N) * (0.5 + (j*Q)%N)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fantasy Chen</title>
		<link>http://www.xsi-blog.com/archives/115/comment-page-1#comment-17423</link>
		<dc:creator>Fantasy Chen</dc:creator>
		<pubDate>Thu, 14 Jan 2010 01:59:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=115#comment-17423</guid>
		<description>Hi! I want N points evenly distribute within a rectangle. How can I get a fast method?</description>
		<content:encoded><![CDATA[<p>Hi! I want N points evenly distribute within a rectangle. How can I get a fast method?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DogCatFishDish &#187; Blog Archive &#187; Around the world, a-round the woorld&#8230;</title>
		<link>http://www.xsi-blog.com/archives/115/comment-page-1#comment-17419</link>
		<dc:creator>DogCatFishDish &#187; Blog Archive &#187; Around the world, a-round the woorld&#8230;</dc:creator>
		<pubDate>Mon, 07 Dec 2009 23:23:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=115#comment-17419</guid>
		<description>[...] number of points evenly. It’s therefore down to weird and wonderful geometry to sort out. This article about points on spheres saves me repeating everything here, but the summary is that there are two approximation [...]</description>
		<content:encoded><![CDATA[<p>[...] number of points evenly. It’s therefore down to weird and wonderful geometry to sort out. This article about points on spheres saves me repeating everything here, but the summary is that there are two approximation [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Henry Bland</title>
		<link>http://www.xsi-blog.com/archives/115/comment-page-1#comment-17382</link>
		<dc:creator>Henry Bland</dc:creator>
		<pubDate>Mon, 01 Jun 2009 22:11:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=115#comment-17382</guid>
		<description>Thanks for a great resource.  Here&#039;s the Matlab version of the Golden Section Spiral method.

function p = spherepointsgolden(n)
%SPHEREPOINTSGOLDEN Place points evently on a unit sphere
% Generate a set of evenly distributed points on a unit sphere
% using the method of the Golden Section Spiral method.
%
% Output is a 3xN matrix of points for X,Y,Z.
%
% Based on python code from Patric Boucher on www.xsi-blog.com

    inc = pi * (3-sqrt(5));
    off = 2/n;
    
    k  = 0:n-1;
    y = k * off - 1 + (off/2);
    r = sqrt(1 - (y.^2));
    phi = k * inc;
    
    p = [cos(phi).*r; y ;sin(phi).*r]&#039;;
end</description>
		<content:encoded><![CDATA[<p>Thanks for a great resource.  Here&#8217;s the Matlab version of the Golden Section Spiral method.</p>
<p>function p = spherepointsgolden(n)<br />
%SPHEREPOINTSGOLDEN Place points evently on a unit sphere<br />
% Generate a set of evenly distributed points on a unit sphere<br />
% using the method of the Golden Section Spiral method.<br />
%<br />
% Output is a 3xN matrix of points for X,Y,Z.<br />
%<br />
% Based on python code from Patric Boucher on <a href="http://www.xsi-blog.com" rel="nofollow">http://www.xsi-blog.com</a></p>
<p>    inc = pi * (3-sqrt(5));<br />
    off = 2/n;</p>
<p>    k  = 0:n-1;<br />
    y = k * off &#8211; 1 + (off/2);<br />
    r = sqrt(1 &#8211; (y.^2));<br />
    phi = k * inc;</p>
<p>    p = [cos(phi).*r; y ;sin(phi).*r]&#8216;;<br />
end</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.xsi-blog.com/archives/115/comment-page-1#comment-17365</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Wed, 25 Feb 2009 16:40:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=115#comment-17365</guid>
		<description>wow exactly what i was looking for... now my photons are nicely uniformly distributed!</description>
		<content:encoded><![CDATA[<p>wow exactly what i was looking for&#8230; now my photons are nicely uniformly distributed!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anton Sherwood</title>
		<link>http://www.xsi-blog.com/archives/115/comment-page-1#comment-17345</link>
		<dc:creator>Anton Sherwood</dc:creator>
		<pubDate>Mon, 13 Oct 2008 00:30:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=115#comment-17345</guid>
		<description>&lt;a href=&quot;http://www.research.att.com/~njas/&quot; rel=&quot;nofollow&quot;&gt;Neil Sloane&lt;/a&gt; has some info on spherical arrangements in higher dimensions.</description>
		<content:encoded><![CDATA[<p><a href="http://www.research.att.com/~njas/" rel="nofollow">Neil Sloane</a> has some info on spherical arrangements in higher dimensions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will</title>
		<link>http://www.xsi-blog.com/archives/115/comment-page-1#comment-17319</link>
		<dc:creator>Will</dc:creator>
		<pubDate>Wed, 13 Aug 2008 14:43:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=115#comment-17319</guid>
		<description>Do any of you think you&#039;d be able to expand this to higher dimensions?

I&#039;m looking to find a way to give me a set of the most unique vectors. This kind of thing would do it i think. the most seperated points on the 10D equivalent of a sphere should be the most unique set of vectors with 10 elements right?</description>
		<content:encoded><![CDATA[<p>Do any of you think you&#8217;d be able to expand this to higher dimensions?</p>
<p>I&#8217;m looking to find a way to give me a set of the most unique vectors. This kind of thing would do it i think. the most seperated points on the 10D equivalent of a sphere should be the most unique set of vectors with 10 elements right?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anton Sherwood</title>
		<link>http://www.xsi-blog.com/archives/115/comment-page-1#comment-17318</link>
		<dc:creator>Anton Sherwood</dc:creator>
		<pubDate>Thu, 07 Aug 2008 22:40:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=115#comment-17318</guid>
		<description>&lt;a href=&quot;http://cgafaq.info/wiki/Evenly_distributed_points_on_sphere&quot; rel=&quot;nofollow&quot;&gt;a possibly useful reference page&lt;/a&gt; (heavily rewritten by me last September)</description>
		<content:encoded><![CDATA[<p><a href="http://cgafaq.info/wiki/Evenly_distributed_points_on_sphere" rel="nofollow">a possibly useful reference page</a> (heavily rewritten by me last September)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Wheeler</title>
		<link>http://www.xsi-blog.com/archives/115/comment-page-1#comment-17316</link>
		<dc:creator>Joe Wheeler</dc:creator>
		<pubDate>Tue, 05 Aug 2008 15:50:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=115#comment-17316</guid>
		<description>Thanks Patrick, this is really useful. I&#039;ve ported your golden spiral version  to ActionScript.

		public function pointsOnSphere ( num:uint, radius:Number=1.0 ) :Array
		{
			var pts:Array, inc:Number, off:Number, i:uint, y:Number, r:Number, phi:Number;
			   
			num = uint( num );
			pts = new Array( num );
			inc = Math.PI * ( 3 - Math.sqrt( 5 ) );
			off = 2 / num;
			i	= num;
			while ( i-- ) {
					
				y = i*off - 1 + ( off / 2 );
				r = Math.sqrt( 1 - y*y );
				phi = i*inc;
				pts[ i ] = { x:Math.cos( phi )*r*radius, y:y*radius, z:Math.sin( phi )*r*radius };
			}
			
			return pts;
		}</description>
		<content:encoded><![CDATA[<p>Thanks Patrick, this is really useful. I&#8217;ve ported your golden spiral version  to ActionScript.</p>
<p>		public function pointsOnSphere ( num:uint, radius:Number=1.0 ) :Array<br />
		{<br />
			var pts:Array, inc:Number, off:Number, i:uint, y:Number, r:Number, phi:Number;</p>
<p>			num = uint( num );<br />
			pts = new Array( num );<br />
			inc = Math.PI * ( 3 &#8211; Math.sqrt( 5 ) );<br />
			off = 2 / num;<br />
			i	= num;<br />
			while ( i&#8211; ) {</p>
<p>				y = i*off &#8211; 1 + ( off / 2 );<br />
				r = Math.sqrt( 1 &#8211; y*y );<br />
				phi = i*inc;<br />
				pts[ i ] = { x:Math.cos( phi )*r*radius, y:y*radius, z:Math.sin( phi )*r*radius };<br />
			}</p>
<p>			return pts;<br />
		}</p>
]]></content:encoded>
	</item>
</channel>
</rss>
