<?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: Laboratory output n°66 Connections</title>
	<atom:link href="http://www.simppa.fi/blog/laboratory-output-n%c2%b066-connections/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.simppa.fi/blog/laboratory-output-n%c2%b066-connections/</link>
	<description>minä kaikkeudessa.</description>
	<lastBuildDate>Mon, 06 Feb 2012 21:49:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: simo</title>
		<link>http://www.simppa.fi/blog/laboratory-output-n%c2%b066-connections/comment-page-1/#comment-23262</link>
		<dc:creator>simo</dc:creator>
		<pubDate>Sun, 29 Nov 2009 16:57:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=529#comment-23262</guid>
		<description>nicoptere: Yes it&#039;s efla running there. I&#039;m thinking what would be an efficient way to split the 3D space since it could be infinite large. I think it&#039;s mandatory to set limits where objects can move if I want to benefit the power of gridding.</description>
		<content:encoded><![CDATA[<p>nicoptere: Yes it&#8217;s efla running there. I&#8217;m thinking what would be an efficient way to split the 3D space since it could be infinite large. I think it&#8217;s mandatory to set limits where objects can move if I want to benefit the power of gridding.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tweets that mention simppa.fi/blog » Laboratory output n°66 Connections -- Topsy.com</title>
		<link>http://www.simppa.fi/blog/laboratory-output-n%c2%b066-connections/comment-page-1/#comment-23261</link>
		<dc:creator>Tweets that mention simppa.fi/blog » Laboratory output n°66 Connections -- Topsy.com</dc:creator>
		<pubDate>Sun, 29 Nov 2009 16:39:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=529#comment-23261</guid>
		<description>[...] This post was mentioned on Twitter by nicoptere and Simo Santavirta, なんとかリーダーB. なんとかリーダーB said: すごく奇麗だな http://bit.ly/8kfZXM [...]</description>
		<content:encoded><![CDATA[<p>[...] This post was mentioned on Twitter by nicoptere and Simo Santavirta, なんとかリーダーB. なんとかリーダーB said: すごく奇麗だな <a href="http://bit.ly/8kfZXM" rel="nofollow">http://bit.ly/8kfZXM</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nicoptere</title>
		<link>http://www.simppa.fi/blog/laboratory-output-n%c2%b066-connections/comment-page-1/#comment-23260</link>
		<dc:creator>nicoptere</dc:creator>
		<pubDate>Sun, 29 Nov 2009 16:35:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=529#comment-23260</guid>
		<description>the &quot;abstract connections&quot; thing is just beautiful.
do you use your efla algo to draw ?
object pooling &amp; space splitting are both very dense fields, can&#039;t wait to see what you&#039;ll come up with :)</description>
		<content:encoded><![CDATA[<p>the &#8220;abstract connections&#8221; thing is just beautiful.<br />
do you use your efla algo to draw ?<br />
object pooling &amp; space splitting are both very dense fields, can&#8217;t wait to see what you&#8217;ll come up with :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: simo</title>
		<link>http://www.simppa.fi/blog/laboratory-output-n%c2%b066-connections/comment-page-1/#comment-23259</link>
		<dc:creator>simo</dc:creator>
		<pubDate>Sat, 28 Nov 2009 16:40:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=529#comment-23259</guid>
		<description>mrdoob: Very interesting area this gridding. There are much to achieve with the concept. I&#039;m definitely going to read about octree too.

sq2: this is how it goes in 2D:
First you create the grid:
&lt;code lang=&quot;actionscript&quot;&gt;
loopsize = 0;
for(var _x:int = 0; _x &lt; gridSize; _x++)
{
 for(var _y:int = 0; _y &lt; gridSize; _y++)
 {
  posGrid[loopsize] = new Vector.&lt;Particle&gt;();
  loopsize++;
 }
&lt;/code&gt;

Then on loop after you have moved the particles you push them into the right Vector:

&lt;code lang=&quot;actionscript&quot;&gt;
dx = int(particle.x / width * gridSize);
dy = int(particle.y / height * gridSize);
pos = int(dx + dy * gridSize);
posGrid[pos].push(particle);
&lt;/code&gt;

You may also want to push them to the neighbor Vectors to have seamless effect when dealing with connect lines.

And after this make a new loop where you go trough all grid (posGrid) Vectors and check distances of particles found in individual Vector.</description>
		<content:encoded><![CDATA[<p>mrdoob: Very interesting area this gridding. There are much to achieve with the concept. I&#8217;m definitely going to read about octree too.</p>
<p>sq2: this is how it goes in 2D:<br />
First you create the grid:</p>
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">loopsize = <span class="nu0">0</span>;<br />
<span class="kw1">for</span><span class="br0">&#40;</span><span class="kw2">var</span> <span class="kw3">_x</span>:<span class="kw3">int</span> = <span class="nu0">0</span>; <span class="kw3">_x</span> <span class="sy0">&lt;</span> gridSize; <span class="kw3">_x</span>++<span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp;<span class="kw1">for</span><span class="br0">&#40;</span><span class="kw2">var</span> <span class="kw3">_y</span>:<span class="kw3">int</span> = <span class="nu0">0</span>; <span class="kw3">_y</span> <span class="sy0">&lt;</span> gridSize; <span class="kw3">_y</span>++<span class="br0">&#41;</span><br />
&nbsp;<span class="br0">&#123;</span><br />
&nbsp; posGrid<span class="br0">&#91;</span>loopsize<span class="br0">&#93;</span> = <span class="kw2">new</span> Vector.<span class="sy0">&lt;</span>Particle<span class="sy0">&gt;</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; loopsize++;<br />
&nbsp;<span class="br0">&#125;</span></div>
</div>
<p>Then on loop after you have moved the particles you push them into the right Vector:</p>
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">dx = <span class="kw3">int</span><span class="br0">&#40;</span>particle.<span class="me1">x</span> <span class="sy0">/</span> <span class="kw3">width</span> <span class="sy0">*</span> gridSize<span class="br0">&#41;</span>;<br />
dy = <span class="kw3">int</span><span class="br0">&#40;</span>particle.<span class="me1">y</span> <span class="sy0">/</span> <span class="kw3">height</span> <span class="sy0">*</span> gridSize<span class="br0">&#41;</span>;<br />
pos = <span class="kw3">int</span><span class="br0">&#40;</span>dx + dy <span class="sy0">*</span> gridSize<span class="br0">&#41;</span>;<br />
posGrid<span class="br0">&#91;</span>pos<span class="br0">&#93;</span>.<span class="kw3">push</span><span class="br0">&#40;</span>particle<span class="br0">&#41;</span>;</div>
</div>
<p>You may also want to push them to the neighbor Vectors to have seamless effect when dealing with connect lines.</p>
<p>And after this make a new loop where you go trough all grid (posGrid) Vectors and check distances of particles found in individual Vector.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mr.doob</title>
		<link>http://www.simppa.fi/blog/laboratory-output-n%c2%b066-connections/comment-page-1/#comment-23258</link>
		<dc:creator>Mr.doob</dc:creator>
		<pubDate>Sat, 28 Nov 2009 15:14:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=529#comment-23258</guid>
		<description>Next level is called octree.</description>
		<content:encoded><![CDATA[<p>Next level is called octree.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sq2</title>
		<link>http://www.simppa.fi/blog/laboratory-output-n%c2%b066-connections/comment-page-1/#comment-23257</link>
		<dc:creator>sq2</dc:creator>
		<pubDate>Sat, 28 Nov 2009 15:07:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=529#comment-23257</guid>
		<description>can you ellaborate on &quot;split the scene into grid and push objects into those blocks according their coordinates&quot; ...?</description>
		<content:encoded><![CDATA[<p>can you ellaborate on &#8220;split the scene into grid and push objects into those blocks according their coordinates&#8221; &#8230;?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

