<?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: JavaScript physics</title>
	<atom:link href="http://doswa.com/blog/2009/01/16/javascript-physics/feed/" rel="self" type="application/rss+xml" />
	<link>http://doswa.com/blog/2009/01/16/javascript-physics/</link>
	<description>Programming, physics, mathematics</description>
	<lastBuildDate>Thu, 19 Aug 2010 18:20:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: David</title>
		<link>http://doswa.com/blog/2009/01/16/javascript-physics/comment-page-1/#comment-1579</link>
		<dc:creator>David</dc:creator>
		<pubDate>Fri, 11 Jun 2010 03:14:37 +0000</pubDate>
		<guid isPermaLink="false">http://doswa.com/?p=68#comment-1579</guid>
		<description>Collisions would actually be quite easy to implement for this, since it uses Verlet integration. Apply a basic circle-circle collision test, then just modify the particles&#039; positions so they&#039;re no longer overlapping.

Keep in mind conservation of momentum when modifying the positions. Verlet integration works by implicitly keeping track of the velocity by holding on to the previous position (i.e. $$v = x - x*$$, where $$x*$$ is the previous position), so momentum would be conserved like $$\Delta (m_1 (x_1 - x_1*)) + \Delta (m_2 (x_2 - x_2*)) = 0$$.</description>
		<content:encoded><![CDATA[<p>Collisions would actually be quite easy to implement for this, since it uses Verlet integration. Apply a basic circle-circle collision test, then just modify the particles&#8217; positions so they&#8217;re no longer overlapping.</p>
<p>Keep in mind conservation of momentum when modifying the positions. Verlet integration works by implicitly keeping track of the velocity by holding on to the previous position (i.e. <img src="http://doswa.com/blog/wp-content/cache/tex_3c5198906c5f6ebf7a4f5642b24284ae.png" align="absmiddle" class="tex" alt="v = x - x*" />, where <img src="http://doswa.com/blog/wp-content/cache/tex_00a6d384f5362987e87b4ce8b1320bfa.png" align="absmiddle" class="tex" alt="x*" /> is the previous position), so momentum would be conserved like <img src="http://doswa.com/blog/wp-content/cache/tex_aae84db8fd6f2603d5783b564861dd67.png" align="absmiddle" class="tex" alt="\Delta (m_1 (x_1 - x_1*)) + \Delta (m_2 (x_2 - x_2*)) = 0" />.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://doswa.com/blog/2009/01/16/javascript-physics/comment-page-1/#comment-1578</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Fri, 11 Jun 2010 01:39:26 +0000</pubDate>
		<guid isPermaLink="false">http://doswa.com/?p=68#comment-1578</guid>
		<description>Great work. Its missing self-collision though. I&#039;m just mentioning this because it looks a bit weird without it.</description>
		<content:encoded><![CDATA[<p>Great work. Its missing self-collision though. I&#8217;m just mentioning this because it looks a bit weird without it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://doswa.com/blog/2009/01/16/javascript-physics/comment-page-1/#comment-280</link>
		<dc:creator>David</dc:creator>
		<pubDate>Sat, 29 Aug 2009 20:46:44 +0000</pubDate>
		<guid isPermaLink="false">http://doswa.com/?p=68#comment-280</guid>
		<description>No, but check out Box2DJS - http://box2d-js.sourceforge.net/. It&#039;s a full physics engine rather than just a demo.</description>
		<content:encoded><![CDATA[<p>No, but check out Box2DJS &#8211; <a href="http://box2d-js.sourceforge.net/" rel="nofollow">http://box2d-js.sourceforge.net/</a>. It&#8217;s a full physics engine rather than just a demo.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nniico</title>
		<link>http://doswa.com/blog/2009/01/16/javascript-physics/comment-page-1/#comment-279</link>
		<dc:creator>nniico</dc:creator>
		<pubDate>Sat, 29 Aug 2009 19:02:58 +0000</pubDate>
		<guid isPermaLink="false">http://doswa.com/?p=68#comment-279</guid>
		<description>Great demo, but what about collisions, frictions, etc. ? Do you have a more complete engine?</description>
		<content:encoded><![CDATA[<p>Great demo, but what about collisions, frictions, etc. ? Do you have a more complete engine?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chain &#124; Doswa</title>
		<link>http://doswa.com/blog/2009/01/16/javascript-physics/comment-page-1/#comment-215</link>
		<dc:creator>Chain &#124; Doswa</dc:creator>
		<pubDate>Tue, 04 Aug 2009 01:47:06 +0000</pubDate>
		<guid isPermaLink="false">http://doswa.com/?p=68#comment-215</guid>
		<description>[...] I made a little Processing sketch based on the same physics as JavaScript physics. [...]</description>
		<content:encoded><![CDATA[<p>[...] I made a little Processing sketch based on the same physics as JavaScript physics. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chain &#124; Doswa</title>
		<link>http://doswa.com/blog/2009/01/16/javascript-physics/comment-page-1/#comment-10</link>
		<dc:creator>Chain &#124; Doswa</dc:creator>
		<pubDate>Sat, 24 Jan 2009 08:22:32 +0000</pubDate>
		<guid isPermaLink="false">http://doswa.com/?p=68#comment-10</guid>
		<description>[...] A little Processing sketch based on the same physics as JavaScript physics. [...]</description>
		<content:encoded><![CDATA[<p>[...] A little Processing sketch based on the same physics as JavaScript physics. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
