<?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>Desk Checked &#187; OpenGL</title>
	<atom:link href="http://www.deskchecked.com/category/opengl/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.deskchecked.com</link>
	<description>Thomas Lee's programming blog</description>
	<lastBuildDate>Sun, 29 Nov 2009 13:01:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Verlet Integration: A Little Physics Demo in Python</title>
		<link>http://www.deskchecked.com/2007/09/28/verlet-integration-a-little-physics-demo-in-python/</link>
		<comments>http://www.deskchecked.com/2007/09/28/verlet-integration-a-little-physics-demo-in-python/#comments</comments>
		<pubDate>Thu, 27 Sep 2007 16:06:40 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Graphics Programming]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.vector-seven.com/2007/09/28/verlet-integration-a-little-physics-demo-in-python/</guid>
		<description><![CDATA[Just before I crawl into bed, here&#8217;s a little demo based on the first fifth of Thomas Jakobsen&#8217;s Advanced Character Physics. I don&#8217;t really have the mathematical background to talk about verlet at any length other than to say it&#8217;s very interesting.  

The screenshot doesn&#8217;t really do the neat &#8220;physics&#8221; justice &#8211; it&#8217;s a [...]]]></description>
			<content:encoded><![CDATA[<p>Just before I crawl into bed, here&#8217;s a little demo based on the first fifth of Thomas Jakobsen&#8217;s <a href="http://www.teknikus.dk/tj/gdc2001.htm">Advanced Character Physics</a>. I don&#8217;t really have the mathematical background to talk about verlet at any length other than to say it&#8217;s very interesting. <img src='http://www.deskchecked.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.deskchecked.com/wp-content/uploads/2007/09/screenshot.png" title="Verlet demo screenshot"><img src="http://www.deskchecked.com/wp-content/uploads/2007/09/screenshot.thumbnail.png" alt="Verlet demo screenshot" /></a></p>
<p>The screenshot doesn&#8217;t really do the neat &#8220;physics&#8221; justice &#8211; it&#8217;s a cheap yet interesting effect.</p>
<p>In a nutshell, velocity verlet is an alternative to Euler (i.e. <code>new_position = current_position + velocity * elapsed</code>). In verlet, velocity is implicitly calculated based on the last position of an entity such that when <em>elapsed</em> is fixed:</p>
<pre><code>new_position = 2 * current_position - last_position + acceleration * elapsed * elapsed</code></pre>
<p>This equation tends to change the way you do pretty much everything related to your game physics. Rather than simply setting your game object&#8217;s velocity, you might push it instead via a force or hack the position/last position to achieve the same effect. I&#8217;m finding the leap a little daunting myself.</p>
<p>I actually touched on verlet briefly years ago using DirectX thanks to one of my more interesting <a href="http://www.linkedin.com/in/christianschladetsch">lecturers</a> at QANTM. Hope you don&#8217;t consider the Googling of your name to be excessively creepy, Christian. It&#8217;s been a few years. <img src='http://www.deskchecked.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>The supporting code is a little heavy for such a little demo &#8211; I plan to put it to wider use, so please excuse the mess for now.</p>
<p>You&#8217;ll need a reasonably recent version of Pygame and PyOpenGL installed in order to run this demo. Once it&#8217;s up and running, click your mouse on the window to watch some OpenGL triangles drop from the sky. Click, drag and release to fling triangles &#8230; almost like you were throwing them yourself.</p>
<p>Hopefully I&#8217;ll get a chance to expand on this among the thousand other things I want to do with my free time (not the least of which is writing more Ocaml tutorials)!</p>
<p><a href="http://www.deskchecked.com/wp-content/uploads/2007/09/python_engine.zip" title="Verlet Demo">Download the Python verlet demo</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.deskchecked.com/2007/09/28/verlet-integration-a-little-physics-demo-in-python/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
