<?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: Dynamic Circle/Circle Collision Detection in ActionScript 3</title>
	<atom:link href="http://blog.generalrelativity.org/actionscript-30/dynamic-circlecircle-collision-detection-in-actionscript-3/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.generalrelativity.org/actionscript-30/dynamic-circlecircle-collision-detection-in-actionscript-3/</link>
	<description>Game-Oriented Development</description>
	<lastBuildDate>Fri, 06 Jan 2012 17:44:08 -0800</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.2</generator>
	<item>
		<title>By: James</title>
		<link>http://blog.generalrelativity.org/actionscript-30/dynamic-circlecircle-collision-detection-in-actionscript-3/#comment-165618</link>
		<dc:creator>James</dc:creator>
		<pubDate>Thu, 03 Mar 2011 12:28:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.generalrelativity.org/?p=7#comment-165618</guid>
		<description>For those that are interested, I have solved the problem above by adding vDiff.multiply(0.9); just after vDiff is calculated in the detect function.

I now have a new question: I have a problem when the two circles are added whilst overlapping each other. A collision is detected, but there are insufficient velocities to move them apart, so they just sit there.

I have attempted several solutions in terms of re-positioning the circles, but this causes problems when you add more than two circles to the mix.

The ideal solution would be for the circles to gradually move apart from one another, but sadly my maths abilities are not good enough to figure that one out.

Hopefully someone can help...?</description>
		<content:encoded><![CDATA[<p>For those that are interested, I have solved the problem above by adding vDiff.multiply(0.9); just after vDiff is calculated in the detect function.</p>
<p>I now have a new question: I have a problem when the two circles are added whilst overlapping each other. A collision is detected, but there are insufficient velocities to move them apart, so they just sit there.</p>
<p>I have attempted several solutions in terms of re-positioning the circles, but this causes problems when you add more than two circles to the mix.</p>
<p>The ideal solution would be for the circles to gradually move apart from one another, but sadly my maths abilities are not good enough to figure that one out.</p>
<p>Hopefully someone can help&#8230;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://blog.generalrelativity.org/actionscript-30/dynamic-circlecircle-collision-detection-in-actionscript-3/#comment-165613</link>
		<dc:creator>James</dc:creator>
		<pubDate>Thu, 03 Mar 2011 10:07:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.generalrelativity.org/?p=7#comment-165613</guid>
		<description>Would you mind explaining how you would change the code to allow for decremental velocities?

For example, imagine friction comes into play, and the velocity of each circle will reduce by 0.1 each frame.

How would you account for that?</description>
		<content:encoded><![CDATA[<p>Would you mind explaining how you would change the code to allow for decremental velocities?</p>
<p>For example, imagine friction comes into play, and the velocity of each circle will reduce by 0.1 each frame.</p>
<p>How would you account for that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: drew</title>
		<link>http://blog.generalrelativity.org/actionscript-30/dynamic-circlecircle-collision-detection-in-actionscript-3/#comment-151996</link>
		<dc:creator>drew</dc:creator>
		<pubDate>Tue, 16 Mar 2010 14:25:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.generalrelativity.org/?p=7#comment-151996</guid>
		<description>&lt;a href=&quot;#comment-151991&quot; rel=&quot;nofollow&quot;&gt;@Patrick Corander&lt;/a&gt; 
if you look at the derivation above, you&#039;ll see that the equation equals at^2 + 2bt + c = 0. the generic form of this equation is at^2 + bt + c = 0, so in this case we know that the second term happens to be a multiple of 2. here&#039;s how i solved for t:
at^2 + 2bt + c = 0
at^2 + 2bt = -c
t^2 + t(2b/a) = -c/a
t^2 + t(2b/a) + b^2/a^2 = -c/a + b^2/a^2
(t + b/a)^2 =  -c/a + b^2/a^2
t + b/a = sqrt( (b^2 - ac)/a^2 )
t + b/a = sqrt( b^2 - ac )/a
t = (-b +/- sqrt( b^2 - ac ))/a</description>
		<content:encoded><![CDATA[<p><a href="#comment-151991" rel="nofollow">@Patrick Corander</a><br />
if you look at the derivation above, you&#8217;ll see that the equation equals at^2 + 2bt + c = 0. the generic form of this equation is at^2 + bt + c = 0, so in this case we know that the second term happens to be a multiple of 2. here&#8217;s how i solved for t:<br />
at^2 + 2bt + c = 0<br />
at^2 + 2bt = -c<br />
t^2 + t(2b/a) = -c/a<br />
t^2 + t(2b/a) + b^2/a^2 = -c/a + b^2/a^2<br />
(t + b/a)^2 =  -c/a + b^2/a^2<br />
t + b/a = sqrt( (b^2 &#8211; ac)/a^2 )<br />
t + b/a = sqrt( b^2 &#8211; ac )/a<br />
t = (-b +/- sqrt( b^2 &#8211; ac ))/a</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Corander</title>
		<link>http://blog.generalrelativity.org/actionscript-30/dynamic-circlecircle-collision-detection-in-actionscript-3/#comment-151991</link>
		<dc:creator>Patrick Corander</dc:creator>
		<pubDate>Tue, 16 Mar 2010 07:37:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.generalrelativity.org/?p=7#comment-151991</guid>
		<description>This has been bugging me for a few days so I need to ask :p. How do you actually know that b is multiple of 2 here? And if you know that b is multiple of 2, how do you actually reduce the equation at this state (-b +/- sqrt(b^2 - ac))/a?  

cheers</description>
		<content:encoded><![CDATA[<p>This has been bugging me for a few days so I need to ask :p. How do you actually know that b is multiple of 2 here? And if you know that b is multiple of 2, how do you actually reduce the equation at this state (-b +/- sqrt(b^2 &#8211; ac))/a?  </p>
<p>cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: drew</title>
		<link>http://blog.generalrelativity.org/actionscript-30/dynamic-circlecircle-collision-detection-in-actionscript-3/#comment-150488</link>
		<dc:creator>drew</dc:creator>
		<pubDate>Sat, 02 Jan 2010 14:26:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.generalrelativity.org/?p=7#comment-150488</guid>
		<description>It is the exact same equation, where it is known that b is a multiple of 2. Because of this, the solution reduces to (-b +/- sqrt(b^2 - ac))/a.

EDIT: I&#039;ve added a derivation of this equation- hopefully that will add some clarity!</description>
		<content:encoded><![CDATA[<p>It is the exact same equation, where it is known that b is a multiple of 2. Because of this, the solution reduces to (-b +/- sqrt(b^2 &#8211; ac))/a.</p>
<p>EDIT: I&#8217;ve added a derivation of this equation- hopefully that will add some clarity!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael B Paulson</title>
		<link>http://blog.generalrelativity.org/actionscript-30/dynamic-circlecircle-collision-detection-in-actionscript-3/#comment-150483</link>
		<dc:creator>Michael B Paulson</dc:creator>
		<pubDate>Sat, 02 Jan 2010 07:18:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.generalrelativity.org/?p=7#comment-150483</guid>
		<description>The quadratic formula is
//since your only doing the lesser of the two

X = (-b - sqrt(b^2 - 4ac)) / 2a  

On the example you are missing the &quot;4ac&quot; but have &quot;ac&quot;

So that is what MultiHunter is saying.</description>
		<content:encoded><![CDATA[<p>The quadratic formula is<br />
//since your only doing the lesser of the two</p>
<p>X = (-b &#8211; sqrt(b^2 &#8211; 4ac)) / 2a  </p>
<p>On the example you are missing the &#8220;4ac&#8221; but have &#8220;ac&#8221;</p>
<p>So that is what MultiHunter is saying.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: drew</title>
		<link>http://blog.generalrelativity.org/actionscript-30/dynamic-circlecircle-collision-detection-in-actionscript-3/#comment-150411</link>
		<dc:creator>drew</dc:creator>
		<pubDate>Tue, 29 Dec 2009 15:29:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.generalrelativity.org/?p=7#comment-150411</guid>
		<description>i don&#039;t know what you&#039;re saying, Multihunter. ax^2 + 2bx + c = 0 is a quadratic equation... its roots are (-b +/- sqrt(b^2 - ac))/a</description>
		<content:encoded><![CDATA[<p>i don&#8217;t know what you&#8217;re saying, Multihunter. ax^2 + 2bx + c = 0 is a quadratic equation&#8230; its roots are (-b +/- sqrt(b^2 &#8211; ac))/a</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Multihunter</title>
		<link>http://blog.generalrelativity.org/actionscript-30/dynamic-circlecircle-collision-detection-in-actionscript-3/#comment-150407</link>
		<dc:creator>Multihunter</dc:creator>
		<pubDate>Tue, 29 Dec 2009 06:31:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.generalrelativity.org/?p=7#comment-150407</guid>
		<description>But that&#039;s not the quadratic formula!
This is the quadratic formula:
http://en.wikipedia.org/wiki/Quadratic_equation#Quadratic_formula</description>
		<content:encoded><![CDATA[<p>But that&#8217;s not the quadratic formula!<br />
This is the quadratic formula:<br />
<a href="http://en.wikipedia.org/wiki/Quadratic_equation#Quadratic_formula" rel="nofollow">http://en.wikipedia.org/wiki/Quadratic_equation#Quadratic_formula</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: drew</title>
		<link>http://blog.generalrelativity.org/actionscript-30/dynamic-circlecircle-collision-detection-in-actionscript-3/#comment-14353</link>
		<dc:creator>drew</dc:creator>
		<pubDate>Fri, 12 Oct 2007 19:56:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.generalrelativity.org/?p=7#comment-14353</guid>
		<description>Hi Elliot,

It&#039;s just an arbitrarily defined constant meant to leave room for numerical rounding errors. If the dotted relative velocity (in this case defined as the difference between 2 and 1) is less than 0, the circles are moving apart from each other. Because this is just a computationally inexpensive early-out for the algorithm, it&#039;s a bit safer to leave a margin for error.

This sort of constant is most often named EPSILON.

&lt;a href=&quot;http://lab.generalrelativity.org/circle_collision/source/src.zip&quot; rel=&quot;nofollow&quot;&gt;Here&#039;s&lt;/a&gt; the whole source in case you missed the link above.&lt;a href=&quot;http://lab.generalrelativity.org/circle_collision/source/src.zip&quot; / rel=&quot;nofollow&quot;&gt;</description>
		<content:encoded><![CDATA[<p>Hi Elliot,</p>
<p>It&#8217;s just an arbitrarily defined constant meant to leave room for numerical rounding errors. If the dotted relative velocity (in this case defined as the difference between 2 and 1) is less than 0, the circles are moving apart from each other. Because this is just a computationally inexpensive early-out for the algorithm, it&#8217;s a bit safer to leave a margin for error.</p>
<p>This sort of constant is most often named EPSILON.</p>
<p><a href="http://lab.generalrelativity.org/circle_collision/source/src.zip" rel="nofollow">Here&#8217;s</a> the whole source in case you missed the link above.<a href="http://lab.generalrelativity.org/circle_collision/source/src.zip" / rel="nofollow"></a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Elliott Partridge</title>
		<link>http://blog.generalrelativity.org/actionscript-30/dynamic-circlecircle-collision-detection-in-actionscript-3/#comment-14310</link>
		<dc:creator>Elliott Partridge</dc:creator>
		<pubDate>Fri, 12 Oct 2007 18:03:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.generalrelativity.org/?p=7#comment-14310</guid>
		<description>I&#039;m trying to port this code to C++, and I&#039;m wondering what Collision.OMEGA is. Is that some constant? Thanks for the guide!!</description>
		<content:encoded><![CDATA[<p>I&#8217;m trying to port this code to C++, and I&#8217;m wondering what Collision.OMEGA is. Is that some constant? Thanks for the guide!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

