<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" gd:etag="W/&quot;AkABQn0zfSp7ImA9WhVXFUk.&quot;"><id>tag:blogger.com,1999:blog-1731449971700063597</id><updated>2012-04-16T06:59:13.385+03:00</updated><category term="simulations" /><category term="publicity" /><category term="theory" /><category term="plans" /><category term="visualization" /><category term="collision detection" /><category term="documentation" /><category term="dph" /><category term="grapefruit" /><category term="log" /><category term="narrow phase" /><category term="status report" /><category term="benchmark" /><category term="physics" /><category term="project" /><category term="quickcheck" /><category term="demo" /><category term="broad phase" /><category term="ghc" /><title>Hpysics blog</title><subtitle type="html">Physics engine written in Haskell</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://physics-dph.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://physics-dph.blogspot.com/" /><author><name>Roman Cheplyaka</name><uri>http://www.blogger.com/profile/07189392968519496723</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp3.blogger.com/_W18npoo34JQ/R9AlpicfH-I/AAAAAAAAAAM/il6y8fk_BBw/S220/me-donetsk.jpeg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>25</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/physics-dph" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="physics-dph" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;Ak8DRH49eCp7ImA9WxJREUk.&quot;"><id>tag:blogger.com,1999:blog-1731449971700063597.post-6999062572981270999</id><published>2009-05-12T20:08:00.002+03:00</published><updated>2009-05-12T20:21:15.060+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-12T20:21:15.060+03:00</app:edited><title>LambdaCube accepted to JSSP</title><content type="html">&lt;p&gt;&lt;a href="http://www.haskell.org/haskellwiki/LambdaCubeEngine"&gt;LambdaCube&lt;/a&gt; render engine by Csaba Hruska &lt;a href="http://ocaml.janestreet.com/?q=node/63"&gt; is accepted as Jane Street Summer Project&lt;/a&gt; this year. Congratulations, Csaba!&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://physics-dph.blogspot.com/feeds/6999062572981270999/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1731449971700063597&amp;postID=6999062572981270999" title="10 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/6999062572981270999?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/6999062572981270999?v=2" /><link rel="alternate" type="text/html" href="http://physics-dph.blogspot.com/2009/05/lambdacube-accepted-to-jssp.html" title="LambdaCube accepted to JSSP" /><author><name>Roman Cheplyaka</name><uri>http://www.blogger.com/profile/07189392968519496723</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp3.blogger.com/_W18npoo34JQ/R9AlpicfH-I/AAAAAAAAAAM/il6y8fk_BBw/S220/me-donetsk.jpeg" /></author><thr:total>10</thr:total></entry><entry gd:etag="W/&quot;C0YAQX09cSp7ImA9WxVbF0w.&quot;"><id>tag:blogger.com,1999:blog-1731449971700063597.post-183908008193346664</id><published>2009-04-03T00:37:00.003+03:00</published><updated>2009-04-03T01:25:40.369+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-03T01:25:40.369+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="visualization" /><category scheme="http://www.blogger.com/atom/ns#" term="plans" /><category scheme="http://www.blogger.com/atom/ns#" term="project" /><category scheme="http://www.blogger.com/atom/ns#" term="grapefruit" /><title>Hpysics + GrapeFruit (and hackathon)</title><content type="html">&lt;p&gt;&lt;a href="http://www.haskell.org/haskellwiki/Hac5"&gt;The 5&lt;sup&gt;th&lt;/sup&gt; Haskell
    Hackathon&lt;/a&gt; will be the place where Hpysics will meet &lt;a
    href="http://www.haskell.org/haskellwiki/Grapefruit"&gt;Grapefruit&lt;/a&gt;&amp;nbsp;&amp;mdash;
a library for Functional Reactive Programming with a focus on user
interfaces. It means that one of &lt;a
    href="http://www.haskell.org/haskellwiki/Hac5/Projects#Hackers_2"&gt;our&lt;/a&gt;
goal on Hac5 is integrating Grapefruit with Hpysics.&lt;/p&gt;
&lt;p&gt;Tonight we held an IRC meeting where this and other goals of Grapefruit were
discussed. The main points (regarding Hpysics) are:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;There are people interested in Hpysics (and particularly in
    Hpysics+Grapefruit)&lt;/li&gt;
    &lt;li&gt;There should be no problems to integrate Hpysics with Grapefruit.
    However, in the new version of Grapefruit there are no means of
    visualization yet. We'll need to tackle this at Hackathon, too.&lt;/li&gt;
&lt;/ul&gt;</content><link rel="replies" type="application/atom+xml" href="http://physics-dph.blogspot.com/feeds/183908008193346664/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1731449971700063597&amp;postID=183908008193346664" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/183908008193346664?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/183908008193346664?v=2" /><link rel="alternate" type="text/html" href="http://physics-dph.blogspot.com/2009/04/hpysics-grapefruit-and-hackathon.html" title="Hpysics + GrapeFruit (and hackathon)" /><author><name>Roman Cheplyaka</name><uri>http://www.blogger.com/profile/07189392968519496723</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp3.blogger.com/_W18npoo34JQ/R9AlpicfH-I/AAAAAAAAAAM/il6y8fk_BBw/S220/me-donetsk.jpeg" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;CEYBQHk8cSp7ImA9WxVbEU0.&quot;"><id>tag:blogger.com,1999:blog-1731449971700063597.post-8208606042074618362</id><published>2009-03-27T00:07:00.004+03:00</published><updated>2009-03-27T00:15:51.779+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-27T00:15:51.779+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="dph" /><title>Recent activity</title><content type="html">&lt;p&gt;For now, I rewrote Hpysics to use plain lists instead of parallel arrays. I
will investigate DPH applicability a bit later, when I fix some other
things.&lt;/p&gt;
&lt;p&gt;Also, there's now an &lt;a href="http://code.google.com/p/hpysics/issues/list"&gt;issue tracker for Hpysics&lt;/a&gt;.&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://physics-dph.blogspot.com/feeds/8208606042074618362/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1731449971700063597&amp;postID=8208606042074618362" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/8208606042074618362?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/8208606042074618362?v=2" /><link rel="alternate" type="text/html" href="http://physics-dph.blogspot.com/2009/03/recent-activity.html" title="Recent activity" /><author><name>Roman Cheplyaka</name><uri>http://www.blogger.com/profile/07189392968519496723</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp3.blogger.com/_W18npoo34JQ/R9AlpicfH-I/AAAAAAAAAAM/il6y8fk_BBw/S220/me-donetsk.jpeg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0YDQX86fip7ImA9WxRbEk4.&quot;"><id>tag:blogger.com,1999:blog-1731449971700063597.post-8645672075638166206</id><published>2008-12-02T19:10:00.003+03:00</published><updated>2008-12-02T19:26:10.116+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-02T19:26:10.116+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="status report" /><category scheme="http://www.blogger.com/atom/ns#" term="dph" /><title>DPH docs and project status</title><content type="html">&lt;p&gt;DPH devs finally updated the &lt;a href="http://haskell.org/haskellwiki/GHC/Data_Parallel_Haskell"&gt;documentation on using Data Parallel Haskell&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;To talk about Hpysics, as I've figured out the code was not properly vectorised, and this is probably the main reason of bad performance. Working on it.&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://physics-dph.blogspot.com/feeds/8645672075638166206/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1731449971700063597&amp;postID=8645672075638166206" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/8645672075638166206?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/8645672075638166206?v=2" /><link rel="alternate" type="text/html" href="http://physics-dph.blogspot.com/2008/12/dph-docs-and-project-status.html" title="DPH docs and project status" /><author><name>Roman Cheplyaka</name><uri>http://www.blogger.com/profile/07189392968519496723</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp3.blogger.com/_W18npoo34JQ/R9AlpicfH-I/AAAAAAAAAAM/il6y8fk_BBw/S220/me-donetsk.jpeg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DUACQnw6fip7ImA9WxRUEUs.&quot;"><id>tag:blogger.com,1999:blog-1731449971700063597.post-3151202455756987591</id><published>2008-11-20T10:41:00.002+03:00</published><updated>2008-11-20T10:56:03.216+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-20T10:56:03.216+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="publicity" /><title>The Monad Reader, SoC special</title><content type="html">&lt;p&gt;&lt;a href="http://www.haskell.org/sitewiki/images/f/f0/TMR-Issue12.pdf"&gt;The Monad.Reader Issue 12&lt;/a&gt; is now out. It contains my article on physics engine implementation as well as articles from other SoCers, Max Bolingbroke and Neil Mitchell, and wonderful poetry by Wouter Swierstra, the editor.&lt;/p&gt;
&lt;p&gt;Thanks to Thomas Schilling and Roman Leshchinskiy for help with the article.&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://physics-dph.blogspot.com/feeds/3151202455756987591/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1731449971700063597&amp;postID=3151202455756987591" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/3151202455756987591?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/3151202455756987591?v=2" /><link rel="alternate" type="text/html" href="http://physics-dph.blogspot.com/2008/11/monad-reader-soc-special.html" title="The Monad Reader, SoC special" /><author><name>Roman Cheplyaka</name><uri>http://www.blogger.com/profile/07189392968519496723</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp3.blogger.com/_W18npoo34JQ/R9AlpicfH-I/AAAAAAAAAAM/il6y8fk_BBw/S220/me-donetsk.jpeg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DUUBQH88cSp7ImA9WxdbFUk.&quot;"><id>tag:blogger.com,1999:blog-1731449971700063597.post-7962408775970190643</id><published>2008-08-12T15:35:00.004+03:00</published><updated>2008-08-12T16:20:51.179+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-08-12T16:20:51.179+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ghc" /><category scheme="http://www.blogger.com/atom/ns#" term="status report" /><category scheme="http://www.blogger.com/atom/ns#" term="dph" /><category scheme="http://www.blogger.com/atom/ns#" term="broad phase" /><category scheme="http://www.blogger.com/atom/ns#" term="benchmark" /><title>Status report: week 11-12</title><content type="html">&lt;p&gt;As I wrote before, I added complete support for polyhedra and fixed collision handler.&lt;p&gt;
&lt;p&gt;Also, I made a little optimization to collision detector: bounding spheres. The idea is that testing spheres for collision is faster than testing polyhedra. Also, if we consider sphere with center in body's center of mass, it's rotationally invariant.&lt;/p&gt;
&lt;p&gt;Then I spent some time trying to compile head GHC and DPH. My (not so pleasant) experience is described &lt;a href="http://ro-che.blogspot.com/2008/08/compiling-ghc.html"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;When I succeeded, I wrote simple benchmark to evaluate gains from using bounding volumes. Result was disappointing -- simple 2-step simulation with 10 bodies took 9 seconds and almost 1Gb of memory to complete. After consulting with my mentors we concluded that vectoriser is not ready yet (delay is due to issues with GHC build system) and that I should postpone benchmarks for a while.&lt;/p&gt;
&lt;p&gt;So, my plans for nearest future is to implement static bodies and BSP trees (I already started the latter). Until 21 of August I will be teaching at summer math. school, and then I will continue the work.&lt;/p&gt;
&lt;p&gt;Also, I'll be writing SoC report for &lt;a href="http://www.haskell.org/haskellwiki/The_Monad.Reader"&gt;the Monad Reader&lt;/a&gt; soon. If you'd like some particular issue to be explained or highlighted there, feel free to tell me!&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://physics-dph.blogspot.com/feeds/7962408775970190643/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1731449971700063597&amp;postID=7962408775970190643" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/7962408775970190643?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/7962408775970190643?v=2" /><link rel="alternate" type="text/html" href="http://physics-dph.blogspot.com/2008/08/status-report-week-11-12.html" title="Status report: week 11-12" /><author><name>Roman Cheplyaka</name><uri>http://www.blogger.com/profile/07189392968519496723</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp3.blogger.com/_W18npoo34JQ/R9AlpicfH-I/AAAAAAAAAAM/il6y8fk_BBw/S220/me-donetsk.jpeg" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;C0MGQHo8eip7ImA9WxRTFE4.&quot;"><id>tag:blogger.com,1999:blog-1731449971700063597.post-69839848322894714</id><published>2008-08-06T08:55:00.008+03:00</published><updated>2008-09-03T11:43:41.472+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-09-03T11:43:41.472+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="physics" /><category scheme="http://www.blogger.com/atom/ns#" term="narrow phase" /><title>Physics and polyhedra</title><content type="html">&lt;p&gt;Thanks to my fellow physicist, Oleg Matveychuk, I've done with the collision
handler bug I said in the last status report. That was indeed a mistake in the
paper (&lt;A
 href="http://www.cs.cornell.edu/Courses/cs667/2005sp/readings/moore88.pdf"&gt;Collision
 Detection and Response for Computer Animation&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;One of the collision equation in that paper looks like
&lt;p style="text-align: center;"&gt;&lt;img src="http://www.codecogs.com/eq.latex?(v_2+\omega_2\times\rho_2-v_1-\omega_1\times\rho_1)\cdot k=0." style="vertical-align: middle; border: none;"&gt;&lt;/p&gt;
Here, &lt;img src="http://www.codecogs.com/eq.latex?v_i" style="vertical-align: middle; border: none;"&gt; is linear and &lt;img src="http://www.codecogs.com/eq.latex?\omega_i" style="vertical-align: middle; border: none;"&gt; is angular velocity of each of two bodies,
&lt;img src="http://www.codecogs.com/eq.latex?\rho_i" style="vertical-align: middle; border: none;"&gt; is the vector pointing from center of mass to collision point, and &lt;img src="http://www.codecogs.com/eq.latex?k" style="vertical-align: middle; border: none;"&gt;
is normal to collision plane. The expression in parens, let's call it &lt;img src="http://www.codecogs.com/eq.latex?V" style="vertical-align: middle; border: none;"&gt;, is
relative velocity of collision points of two bodies. So, Moore and Wilhelms
propose to set &lt;img src="http://www.codecogs.com/eq.latex?V" style="vertical-align: middle; border: none;"&gt; to 0.&lt;/p&gt;
&lt;p&gt;It appears that this corresponds to completely unelastic collision (with
restitution coefficient equal to 0), and that's why it doesn't look too
realistic.&lt;/p&gt;
&lt;p&gt;If we have coefficient of restitution &lt;img src="http://www.codecogs.com/eq.latex?\alpha" style="vertical-align: middle; border: none;"&gt;, then proper equation is
&lt;img src="http://www.codecogs.com/eq.latex?V'=\alpha V" style="vertical-align: middle; border: none;"&gt;, where &lt;img src="http://www.codecogs.com/eq.latex?V'" style="vertical-align: middle; border: none;"&gt; is taken after collision and &lt;img src="http://www.codecogs.com/eq.latex?V" style="vertical-align: middle; border: none;"&gt; before.&lt;/p&gt;
&lt;p&gt;Another thing I've done is support of generic polyhedra. For example, now we
can experiment not just with cubes, but with parallelepipeds or tetrahedra. And
in future this will help us to handle arbitrary shapes by approximating them
with polyhedra, using point repulsion algorithm which I'm going to implement
(it's also needed for semi-adjusting BSP trees).&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://physics-dph.blogspot.com/feeds/69839848322894714/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1731449971700063597&amp;postID=69839848322894714" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/69839848322894714?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/69839848322894714?v=2" /><link rel="alternate" type="text/html" href="http://physics-dph.blogspot.com/2008/08/physics-and-polyhedra.html" title="Physics and polyhedra" /><author><name>Roman Cheplyaka</name><uri>http://www.blogger.com/profile/07189392968519496723</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp3.blogger.com/_W18npoo34JQ/R9AlpicfH-I/AAAAAAAAAAM/il6y8fk_BBw/S220/me-donetsk.jpeg" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;CUYNSHo4eSp7ImA9WxdUF00.&quot;"><id>tag:blogger.com,1999:blog-1731449971700063597.post-1005359289943152528</id><published>2008-08-02T21:46:00.003+03:00</published><updated>2008-08-02T21:53:19.431+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-08-02T21:53:19.431+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="status report" /><category scheme="http://www.blogger.com/atom/ns#" term="physics" /><category scheme="http://www.blogger.com/atom/ns#" term="broad phase" /><title>Status report: week 9-10</title><content type="html">&lt;p&gt;I'm back from &lt;a href="http://imc-math.org/"&gt;IMC&lt;/a&gt; at Bulgaria with second prize, and ready to work!&lt;/p&gt;

&lt;p&gt;While I was away I thought about generic convex polyhedra and actually
started implementing them. I hope to finish that in a few days. This
not only makes engine practically more useful but also makes some
computations more cheap and robust.&lt;/p&gt;

&lt;p&gt;Also I discovered some problem with my last collision handler. It
conforms to one paper, and now I doubt that paper is correct. I'll
consult local physicists in the nearest time.&lt;/p&gt;

&lt;p&gt;Finally, I read several papers on broad-phase collision detection. The
one I liked most is &lt;a href="http://www.inf.ufrgs.br/~comba/papers/2005/sabsp-i3d05.pdf"&gt;Broad-Phase Collision Detection Using Semi-Adjusting
BSP-trees&lt;/a&gt;. So I'll start implementing it as soon as possible.&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://physics-dph.blogspot.com/feeds/1005359289943152528/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1731449971700063597&amp;postID=1005359289943152528" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/1005359289943152528?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/1005359289943152528?v=2" /><link rel="alternate" type="text/html" href="http://physics-dph.blogspot.com/2008/08/status-report-week-9-10.html" title="Status report: week 9-10" /><author><name>Roman Cheplyaka</name><uri>http://www.blogger.com/profile/07189392968519496723</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp3.blogger.com/_W18npoo34JQ/R9AlpicfH-I/AAAAAAAAAAM/il6y8fk_BBw/S220/me-donetsk.jpeg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CkEDQnk5eip7ImA9WxdVF0g.&quot;"><id>tag:blogger.com,1999:blog-1731449971700063597.post-650696515820023847</id><published>2008-07-22T20:32:00.002+03:00</published><updated>2008-07-22T21:17:53.722+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-07-22T21:17:53.722+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="status report" /><category scheme="http://www.blogger.com/atom/ns#" term="broad phase" /><title>Status report: week 7-8</title><content type="html">&lt;p&gt;Last week I've implemented full handling of rigid bodies collision. When two
bodies collide, not just they velocities, but also their angular velocities are
modified, as it is in real world.&lt;/p&gt;
&lt;p&gt;Now, supposing engine is correct (it needs more testing, though), need to
make it fast (after all, this is what Data Parallel Haskell is about).&lt;/p&gt;
&lt;p&gt;One of the obvious optimization is to perform broad-phase collision
detection, that is, to filter out pairs of bodies which certainly cannot collide
and run collision detection algorithm (which is then called narrow-phase) on the
pair of bodies left.&lt;/p&gt;
&lt;p&gt;So, I'll need to study the subject and choose algorithm which is best
suitable for nested data parallelism. And there will be good chance for
that&amp;nbsp;&amp;mdash; I'm leaving to participate in &lt;a
href="http://imc-math.org/"&gt;IMC&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I've printed four papers describing broad-phase collision detection and will
study them while I'm away (well, maybe I'll even find time to code
something).&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://physics-dph.blogspot.com/feeds/650696515820023847/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1731449971700063597&amp;postID=650696515820023847" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/650696515820023847?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/650696515820023847?v=2" /><link rel="alternate" type="text/html" href="http://physics-dph.blogspot.com/2008/07/status-report-week-7-8.html" title="Status report: week 7-8" /><author><name>Roman Cheplyaka</name><uri>http://www.blogger.com/profile/07189392968519496723</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp3.blogger.com/_W18npoo34JQ/R9AlpicfH-I/AAAAAAAAAAM/il6y8fk_BBw/S220/me-donetsk.jpeg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DUIHSH0yfCp7ImA9WxdWFUw.&quot;"><id>tag:blogger.com,1999:blog-1731449971700063597.post-3263208921524606480</id><published>2008-07-08T14:34:00.004+03:00</published><updated>2008-07-08T14:45:39.394+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-07-08T14:45:39.394+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="visualization" /><category scheme="http://www.blogger.com/atom/ns#" term="demo" /><title>Double buffering &amp; demo</title><content type="html">&lt;p&gt;With help and patches from kpierre and excid, Hpysics' visulization code now performs double buffering, which makes it much more pleasant for eyes. Also this allowed me to record a demo.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://code.haskell.org/~feuerbach/hpysics-cubes.ogv"&gt;Ogg Theora version&lt;/a&gt; [2.1M]&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.youtube.com/watch?v=uziCn2SBbxs"&gt;YouTube version&lt;/a&gt; (but their player doesn't go well on this video for some reason)&lt;/li&gt;&lt;/ul&gt;</content><link rel="replies" type="application/atom+xml" href="http://physics-dph.blogspot.com/feeds/3263208921524606480/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1731449971700063597&amp;postID=3263208921524606480" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/3263208921524606480?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/3263208921524606480?v=2" /><link rel="alternate" type="text/html" href="http://physics-dph.blogspot.com/2008/07/double-buffering-demo.html" title="Double buffering &amp; demo" /><author><name>Roman Cheplyaka</name><uri>http://www.blogger.com/profile/07189392968519496723</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp3.blogger.com/_W18npoo34JQ/R9AlpicfH-I/AAAAAAAAAAM/il6y8fk_BBw/S220/me-donetsk.jpeg" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;CE4GSH87fCp7ImA9WxdWFUw.&quot;"><id>tag:blogger.com,1999:blog-1731449971700063597.post-8871960281688134371</id><published>2008-07-08T12:56:00.004+03:00</published><updated>2008-07-08T13:28:49.104+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-07-08T13:28:49.104+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="quickcheck" /><title>QuickCheck puzzle: the answer</title><content type="html">&lt;p&gt;Some time ago I &lt;a href="http://physics-dph.blogspot.com/2008/06/status-report-week-5.html"&gt;mentioned&lt;/a&gt; a problem I've run into with QuickCheck: the following code, intended for generation of non-zero random vectors, does not terminate:&lt;/p&gt;
&lt;pre&gt;nonzero :: Gen Vec
nonzero = do
  v &amp;lt;- arbitrary
  if norm v &gt; 0 then return v else nonzero&lt;/pre&gt;

&lt;p&gt;Now it's time to give the answer to this puzzle, which was found by Dmitry Astapov (ADEpt). Test data generators have an implicit size parameter, which is passed down in monadic computation. So if we got zero size, we will always get zero vectors -- "arbitrary" vectors with components from interval [0;0]. So, solution may look like &lt;/p&gt;
&lt;pre&gt;nonzero = do
  v &amp;lt;- arbitrary
  if norm v &gt; 0 then return v else resize 1 nonzero&lt;/pre&gt;</content><link rel="replies" type="application/atom+xml" href="http://physics-dph.blogspot.com/feeds/8871960281688134371/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1731449971700063597&amp;postID=8871960281688134371" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/8871960281688134371?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/8871960281688134371?v=2" /><link rel="alternate" type="text/html" href="http://physics-dph.blogspot.com/2008/07/quickcheck-puzzle-answer.html" title="QuickCheck puzzle: the answer" /><author><name>Roman Cheplyaka</name><uri>http://www.blogger.com/profile/07189392968519496723</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp3.blogger.com/_W18npoo34JQ/R9AlpicfH-I/AAAAAAAAAAM/il6y8fk_BBw/S220/me-donetsk.jpeg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CUUFQ3o-eip7ImA9WxdWFEo.&quot;"><id>tag:blogger.com,1999:blog-1731449971700063597.post-9155686733942495796</id><published>2008-07-08T01:40:00.004+03:00</published><updated>2008-07-08T02:26:52.452+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-07-08T02:26:52.452+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="demo" /><category scheme="http://www.blogger.com/atom/ns#" term="status report" /><category scheme="http://www.blogger.com/atom/ns#" term="narrow phase" /><title>Status report: week 6</title><content type="html">&lt;p&gt;Well, it was too optimistic to think that V-Clip is working properly. Number of bugs, errors and just stupid mistakes was sufficient to keep me busy till now. (Although they were not only related to my V-Clip implementation, but to simulation algorithm too, and also I found -- and fixed in my implementation -- an error in V-Clip paper itself -- I'll probably write about this later.) But I have good news :)&lt;/p&gt;

&lt;p style="color: gray;"&gt;{- Here a demo video supposed to be, but unfortunately I can't get it of acceptable quality, so you're encouraged to build and run &lt;code&gt;vis.hs&lt;/code&gt;. -}&lt;/p&gt;

&lt;p&gt;As you can see, V-Clip isn't only consuming CPU time, but really detects collisions. Although this demo might seem physically realistic, it isn't -- only linear, but not angular velocities are updated during collisions. This is what I'm going to do this week.&lt;/p&gt;

&lt;p&gt;Aside from fixing bugs, I also improved simulation code -- now it guarantees that during collision &lt;em&gt;opposite&lt;/em&gt; impulses are applied to bodies, and also makes twice as little collision checks.&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://physics-dph.blogspot.com/feeds/9155686733942495796/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1731449971700063597&amp;postID=9155686733942495796" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/9155686733942495796?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/9155686733942495796?v=2" /><link rel="alternate" type="text/html" href="http://physics-dph.blogspot.com/2008/07/status-report-week-6.html" title="Status report: week 6" /><author><name>Roman Cheplyaka</name><uri>http://www.blogger.com/profile/07189392968519496723</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp3.blogger.com/_W18npoo34JQ/R9AlpicfH-I/AAAAAAAAAAM/il6y8fk_BBw/S220/me-donetsk.jpeg" /></author><thr:total>3</thr:total></entry><entry gd:etag="W/&quot;C0cGSH45fCp7ImA9WxdXGUg.&quot;"><id>tag:blogger.com,1999:blog-1731449971700063597.post-5408679695798541920</id><published>2008-07-02T01:15:00.002+03:00</published><updated>2008-07-02T01:23:49.024+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-07-02T01:23:49.024+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="plans" /><category scheme="http://www.blogger.com/atom/ns#" term="quickcheck" /><category scheme="http://www.blogger.com/atom/ns#" term="narrow phase" /><category scheme="http://www.blogger.com/atom/ns#" term="collision detection" /><title>V-Clip seems to work!</title><content type="html">&lt;p&gt;Finally, I've got V-Clip working. At least now (after one bugfix) it always terminates -- quite encouraging for such algorithm!&lt;/p&gt;
&lt;pre&gt;*Properties&gt; quickCheck prop_VClipTerminates 
OK, passed 100 tests.
32% Done, ("Edge","Edge").
14% Done, ("Edge","Vertex").
11% Done, ("Vertex","Edge").
10% Done, ("Face","Vertex").
8% Penetration, ("Face","Vertex").
8% Done, ("Vertex","Face").
7% Done, ("Vertex","Vertex").
5% Penetration, ("Vertex","Face").
3% Penetration, ("Face","Edge").
2% Penetration, ("Edge","Face").
&lt;/pre&gt;
&lt;p&gt;The next step in testing will be visualizing cubes collisions -- and I'm still moving towards rotation!&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://physics-dph.blogspot.com/feeds/5408679695798541920/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1731449971700063597&amp;postID=5408679695798541920" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/5408679695798541920?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/5408679695798541920?v=2" /><link rel="alternate" type="text/html" href="http://physics-dph.blogspot.com/2008/07/v-clip-seems-to-work.html" title="V-Clip seems to work!" /><author><name>Roman Cheplyaka</name><uri>http://www.blogger.com/profile/07189392968519496723</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp3.blogger.com/_W18npoo34JQ/R9AlpicfH-I/AAAAAAAAAAM/il6y8fk_BBw/S220/me-donetsk.jpeg" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;CE8MQX86fCp7ImA9WxdWFUw.&quot;"><id>tag:blogger.com,1999:blog-1731449971700063597.post-1038955908033111351</id><published>2008-06-28T19:16:00.006+03:00</published><updated>2008-07-08T13:28:00.114+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-07-08T13:28:00.114+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="documentation" /><category scheme="http://www.blogger.com/atom/ns#" term="status report" /><category scheme="http://www.blogger.com/atom/ns#" term="quickcheck" /><title>Status report: week 5</title><content type="html">&lt;p&gt;This week I was implementing Mirtich's V-Clip algorithm for collision detection.&lt;/p&gt;
&lt;p&gt;Also I found several bugs in my functions, which took some time to fix. To check the code I used QuickCheck properties. I expect to finish V-Clip during the first half of the following week, if everthing goes fine.&lt;/p&gt;
&lt;p&gt;I also found time to cabalize and haddockize Hpysics. Note that you need haddock 2 to build docs, because earlier versions don't like parallel arrays syntax.&lt;/p&gt;
&lt;p&gt;Also, there was an interesting challenge with QuickCheck. To test some things I need to generate non-zero vectors. I tried the following:&lt;/p&gt;
&lt;pre&gt;nonzero :: Gen Vec
nonzero = do
  v &amp;lt;- arbitrary
  if norm v &gt; 0 then return v else nonzero&lt;/pre&gt;
&lt;p&gt;(i.e. if we got zero vector, just generate another one until we get what we want), but for some reason this code doesn't terminate. To understand why, I probably should learn more about how QuickCheck's rng works, but I won't complain if someone explains this effect :)&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://physics-dph.blogspot.com/feeds/1038955908033111351/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1731449971700063597&amp;postID=1038955908033111351" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/1038955908033111351?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/1038955908033111351?v=2" /><link rel="alternate" type="text/html" href="http://physics-dph.blogspot.com/2008/06/status-report-week-5.html" title="Status report: week 5" /><author><name>Roman Cheplyaka</name><uri>http://www.blogger.com/profile/07189392968519496723</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp3.blogger.com/_W18npoo34JQ/R9AlpicfH-I/AAAAAAAAAAM/il6y8fk_BBw/S220/me-donetsk.jpeg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CUcARHg9eip7ImA9WxdXE0k.&quot;"><id>tag:blogger.com,1999:blog-1731449971700063597.post-4035041520605027112</id><published>2008-06-25T00:17:00.002+03:00</published><updated>2008-06-25T00:30:45.662+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-25T00:30:45.662+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="theory" /><category scheme="http://www.blogger.com/atom/ns#" term="narrow phase" /><category scheme="http://www.blogger.com/atom/ns#" term="collision detection" /><title>V-Clip algorithm (status update)</title><content type="html">&lt;p&gt;Finally, I've found an algorithm which should be relatively easy to implement. It is Mirtich's V-Clip algorithm described in &lt;a href="http://www.merl.com/reports/docs/TR97-05.pdf"&gt;this paper&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It is similar to Lin-Canny algorithm (they both are based on Voronoi regions and even uses the same theorem), but advantage of V-Clip is that it avoids finding the closest points of two features (that was the problem I could not resolve last week).&lt;/p&gt;
&lt;p&gt;So, I'm going to dive deeply in the paper and try to implement that algorithm.&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://physics-dph.blogspot.com/feeds/4035041520605027112/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1731449971700063597&amp;postID=4035041520605027112" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/4035041520605027112?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/4035041520605027112?v=2" /><link rel="alternate" type="text/html" href="http://physics-dph.blogspot.com/2008/06/v-clip-algorithm-status-update.html" title="V-Clip algorithm (status update)" /><author><name>Roman Cheplyaka</name><uri>http://www.blogger.com/profile/07189392968519496723</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp3.blogger.com/_W18npoo34JQ/R9AlpicfH-I/AAAAAAAAAAM/il6y8fk_BBw/S220/me-donetsk.jpeg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CUcMQ3g6cCp7ImA9WxdXE0k.&quot;"><id>tag:blogger.com,1999:blog-1731449971700063597.post-7071049261581525927</id><published>2008-06-20T17:40:00.003+03:00</published><updated>2008-06-25T00:31:22.618+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-25T00:31:22.618+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="status report" /><category scheme="http://www.blogger.com/atom/ns#" term="narrow phase" /><category scheme="http://www.blogger.com/atom/ns#" term="collision detection" /><title>Status report: week 4</title><content type="html">&lt;p&gt;This week went not so good as I was planning.&lt;/p&gt;
&lt;p&gt;I wanted to implement simple ad-hoc cubic collision geometry to test collisions with rotation. So I started with calculating closest features of two polyhedra (this would also be useful for Lin-Canny algorithm), but when it came to faces it became too cumbersome (and this part isn't very extensible, because it deals specifically with squares, not generic polygons).&lt;/p&gt;
&lt;p&gt;So, I decided to spend some time reading papers on this topic and looking for acceptable solution.&lt;/p&gt;
&lt;p&gt;If I won't find anything better, I'll end up implementing Lin-Canny algorithm (I don't want to do this atm, because it's not very simple and requires some reorganizing of simulation process). As always, suggestions are welcome!&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://physics-dph.blogspot.com/feeds/7071049261581525927/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1731449971700063597&amp;postID=7071049261581525927" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/7071049261581525927?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/7071049261581525927?v=2" /><link rel="alternate" type="text/html" href="http://physics-dph.blogspot.com/2008/06/status-report-week-4.html" title="Status report: week 4" /><author><name>Roman Cheplyaka</name><uri>http://www.blogger.com/profile/07189392968519496723</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp3.blogger.com/_W18npoo34JQ/R9AlpicfH-I/AAAAAAAAAAM/il6y8fk_BBw/S220/me-donetsk.jpeg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DU4MQnk5fyp7ImA9WxdQE0s.&quot;"><id>tag:blogger.com,1999:blog-1731449971700063597.post-730620997844523936</id><published>2008-06-13T17:11:00.002+03:00</published><updated>2008-06-13T17:39:43.727+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-13T17:39:43.727+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="documentation" /><category scheme="http://www.blogger.com/atom/ns#" term="status report" /><title>Status report: week 3</title><content type="html">&lt;p&gt;This week I devoted to rotation. To test it I added cubic shape.&lt;/p&gt;
&lt;p&gt;I use quaternions to represent orientation of body in space (see &lt;a href="http://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation"&gt;Quaternions and spatial rotation&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;To integrate orientation of body over time, numerical methods of solving differential equations are used. Currently I use Euler method, but it can be easily replaced by any other, see &lt;code&gt;Hpysics.ODE&lt;/code&gt;. Differential equation itself is produced by &lt;code&gt;Hpysics.Simulation.rotationDE&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Finally, I added rotation visualization, so if you compile &lt;code&gt;vis.hs&lt;/code&gt;, you can watch falling rotating cube.&lt;/p&gt;
&lt;p&gt;Next, I need to handle collisions properly with respect to rotation. So, I'll need to implement collision detection for cubic shape, and when bodies collide, angular momentum should be added in addition to linear.&lt;/p&gt;
&lt;p&gt;I also think about documentation, which should be added at some point. On the one hand, haddock is convenient with its hyperlinks. On the other, literate haskell is interesting alternative. It can be less formal and more descriptive then haddock.&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://physics-dph.blogspot.com/feeds/730620997844523936/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1731449971700063597&amp;postID=730620997844523936" title="7 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/730620997844523936?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/730620997844523936?v=2" /><link rel="alternate" type="text/html" href="http://physics-dph.blogspot.com/2008/06/status-report-week-3.html" title="Status report: week 3" /><author><name>Roman Cheplyaka</name><uri>http://www.blogger.com/profile/07189392968519496723</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp3.blogger.com/_W18npoo34JQ/R9AlpicfH-I/AAAAAAAAAAM/il6y8fk_BBw/S220/me-donetsk.jpeg" /></author><thr:total>7</thr:total></entry><entry gd:etag="W/&quot;DkQCQ3c8fip7ImA9WxdRGEs.&quot;"><id>tag:blogger.com,1999:blog-1731449971700063597.post-979959052385014914</id><published>2008-06-07T21:12:00.001+03:00</published><updated>2008-06-07T21:46:02.976+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-07T21:46:02.976+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="visualization" /><category scheme="http://www.blogger.com/atom/ns#" term="status report" /><title>Status report: week 2</title><content type="html">&lt;p&gt;During this week I dived into OpenGL and finished with a simple
visualization. It isn't very fancy, but at least now I can say engine produces
some physically plausible results.&lt;/p&gt;
&lt;p&gt;Another achievements include rewriting vectors as data types and writing few
unit tests.&lt;/p&gt;
&lt;p&gt;The next thing I'm going to do is to add some 3d physics, namely, friction,
restitution and rotation.&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://physics-dph.blogspot.com/feeds/979959052385014914/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1731449971700063597&amp;postID=979959052385014914" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/979959052385014914?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/979959052385014914?v=2" /><link rel="alternate" type="text/html" href="http://physics-dph.blogspot.com/2008/06/status-report-week-2.html" title="Status report: week 2" /><author><name>Roman Cheplyaka</name><uri>http://www.blogger.com/profile/07189392968519496723</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp3.blogger.com/_W18npoo34JQ/R9AlpicfH-I/AAAAAAAAAAM/il6y8fk_BBw/S220/me-donetsk.jpeg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CU8FRHszfip7ImA9WxdREEg.&quot;"><id>tag:blogger.com,1999:blog-1731449971700063597.post-3922839285197607135</id><published>2008-05-29T12:07:00.000+03:00</published><updated>2008-05-29T12:36:55.586+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-05-29T12:36:55.586+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="log" /><category scheme="http://www.blogger.com/atom/ns#" term="status report" /><title>Status report: week 1</title><content type="html">So far, I have physics engine which:
&lt;ol&gt;
 &lt;li&gt;Handles static and dynamic bodies&lt;/li&gt;
 &lt;li&gt;Deals with spheres and planes&lt;/li&gt;
 &lt;li&gt;Detects collisions and treats them as completely elastic and
 frictionless&lt;/li&gt;
&lt;/ol&gt;

These are global TODOs:
&lt;ol&gt;
 &lt;li&gt;Rotation. I deliberately chose such shapes that aren't sensitive to
 rotation, but this need to be done anyway. As I see, only two things are
 needed: to respect angular velocity during integration and to apply torque
 during collision.&lt;/li&gt;
 &lt;li&gt;More shapes are needed to test rotation. It will be good to implement
 generic polyhedra.&lt;/li&gt;
 &lt;li&gt;Friction and restitution. There are problems with these, because
 coefficients of friction and restitution depends on two bodies (i.e. you
 cannot directly derive them from the properties of separate bodies). I'll
 need to investigate how this is implemented in other PEs.&lt;/li&gt;
 &lt;li&gt;Some code is currently suboptimal (e.g. some calculations are
 duplicated)&lt;/li&gt;
&lt;/ol&gt;

Plans for the next week:
&lt;ol&gt;
 &lt;li&gt;Visualization. It's the best method of testing that I see.&lt;/li&gt;
 &lt;li&gt;Restitution and friction&lt;/li&gt;
 &lt;li&gt;Types. Currently I use lists for vectors, but as Manuel Chakravarty
 pointed out, this prevents compiler optimizations, so it's better to use
 explicit datatypes. Shouldn't be much of work.&lt;/li&gt;
&lt;/ol&gt;</content><link rel="replies" type="application/atom+xml" href="http://physics-dph.blogspot.com/feeds/3922839285197607135/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1731449971700063597&amp;postID=3922839285197607135" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/3922839285197607135?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/3922839285197607135?v=2" /><link rel="alternate" type="text/html" href="http://physics-dph.blogspot.com/2008/05/status-report-week-1.html" title="Status report: week 1" /><author><name>Roman Cheplyaka</name><uri>http://www.blogger.com/profile/07189392968519496723</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp3.blogger.com/_W18npoo34JQ/R9AlpicfH-I/AAAAAAAAAAM/il6y8fk_BBw/S220/me-donetsk.jpeg" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;CU4NRHo4fSp7ImA9WxdREEg.&quot;"><id>tag:blogger.com,1999:blog-1731449971700063597.post-6325856179257445263</id><published>2008-05-26T20:15:00.000+03:00</published><updated>2008-05-29T12:39:55.435+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-05-29T12:39:55.435+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="log" /><category scheme="http://www.blogger.com/atom/ns#" term="plans" /><title>The first day</title><content type="html">&lt;p&gt;Today my coding period has started.&lt;/p&gt;

&lt;p&gt;Some initial code is darcs-pushed to &lt;code&gt;http://code.haskell.org/hpysics&lt;/code&gt;. Now I want my mentors to look at the data structures I've defined and tell me if some of they won't play nicely with NDP.&lt;/p&gt;

&lt;p&gt;Then, my nearest plans are to get basic collision handling working. Also, though I planned visualization for the late June, I probably will do it earlier -- it's very tempting to see your physics engine produces plausible results.&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://physics-dph.blogspot.com/feeds/6325856179257445263/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1731449971700063597&amp;postID=6325856179257445263" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/6325856179257445263?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/6325856179257445263?v=2" /><link rel="alternate" type="text/html" href="http://physics-dph.blogspot.com/2008/05/first-day.html" title="The first day" /><author><name>Roman Cheplyaka</name><uri>http://www.blogger.com/profile/07189392968519496723</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp3.blogger.com/_W18npoo34JQ/R9AlpicfH-I/AAAAAAAAAAM/il6y8fk_BBw/S220/me-donetsk.jpeg" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;DUINRHk6cCp7ImA9WxdSFUk.&quot;"><id>tag:blogger.com,1999:blog-1731449971700063597.post-6549427988078841317</id><published>2008-05-23T15:50:00.000+03:00</published><updated>2008-05-23T15:59:55.718+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-05-23T15:59:55.718+03:00</app:edited><title>Literature</title><content type="html">This book will be my bible during this summer:
&lt;img src="http://lh3.ggpht.com/pendilum/SDa-WJEYHLI/AAAAAAAAABc/VEHjpYUX028/s400/IMG_0010.JPG"&gt;

This is printed &lt;a href="http://www.kuffner.org/james/software/dynamics/mirtich/index.html"&gt;Brian Mirtich's thesis about rigid body simulations&lt;/a&gt;.</content><link rel="replies" type="application/atom+xml" href="http://physics-dph.blogspot.com/feeds/6549427988078841317/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1731449971700063597&amp;postID=6549427988078841317" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/6549427988078841317?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/6549427988078841317?v=2" /><link rel="alternate" type="text/html" href="http://physics-dph.blogspot.com/2008/05/literature.html" title="Literature" /><author><name>Roman Cheplyaka</name><uri>http://www.blogger.com/profile/07189392968519496723</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp3.blogger.com/_W18npoo34JQ/R9AlpicfH-I/AAAAAAAAAAM/il6y8fk_BBw/S220/me-donetsk.jpeg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/pendilum/SDa-WJEYHLI/AAAAAAAAABc/VEHjpYUX028/s72-c/IMG_0010.JPG" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CEUHQXsyeSp7ImA9WxdTF00.&quot;"><id>tag:blogger.com,1999:blog-1731449971700063597.post-8637516901523214082</id><published>2008-05-13T20:34:00.000+03:00</published><updated>2008-05-13T21:10:30.591+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-05-13T21:10:30.591+03:00</app:edited><title>Wiki page</title><content type="html">I've started a &lt;a href="http://haskell.org/haskellwiki/Hpysics"&gt;wiki page for hpysics&lt;/a&gt;.
It summarizes what I've learnt about existing physics engines.</content><link rel="replies" type="application/atom+xml" href="http://physics-dph.blogspot.com/feeds/8637516901523214082/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1731449971700063597&amp;postID=8637516901523214082" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/8637516901523214082?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/8637516901523214082?v=2" /><link rel="alternate" type="text/html" href="http://physics-dph.blogspot.com/2008/05/wiki-page.html" title="Wiki page" /><author><name>Roman Cheplyaka</name><uri>http://www.blogger.com/profile/07189392968519496723</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp3.blogger.com/_W18npoo34JQ/R9AlpicfH-I/AAAAAAAAAAM/il6y8fk_BBw/S220/me-donetsk.jpeg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DkcGQ3g_fyp7ImA9WxdREEg.&quot;"><id>tag:blogger.com,1999:blog-1731449971700063597.post-7472579561791060419</id><published>2008-04-26T16:08:00.000+03:00</published><updated>2008-05-29T12:40:22.647+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-05-29T12:40:22.647+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="project" /><title>The Name</title><content type="html">&lt;p&gt;Most of the SoC projects deal with existing projects. However, I'm going to create the new one. And every project needs some name.&lt;/p&gt;

&lt;p&gt;So for now I'll pick up the codename &lt;b&gt;hpysics&lt;/b&gt;&amp;nbsp;&amp;mdash; it's "physics" with two first letters swapped. The first "h" indicates that engine is written in Haskell (this is a convention which lots of Haskell projects use).&lt;/p&gt;

&lt;p&gt;Maybe I'll change the name at some point, so if you have some suggestions, please share them!&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://physics-dph.blogspot.com/feeds/7472579561791060419/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1731449971700063597&amp;postID=7472579561791060419" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/7472579561791060419?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/7472579561791060419?v=2" /><link rel="alternate" type="text/html" href="http://physics-dph.blogspot.com/2008/04/name.html" title="The Name" /><author><name>Roman Cheplyaka</name><uri>http://www.blogger.com/profile/07189392968519496723</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp3.blogger.com/_W18npoo34JQ/R9AlpicfH-I/AAAAAAAAAAM/il6y8fk_BBw/S220/me-donetsk.jpeg" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;D0cMSH06eSp7ImA9WxZaEEo.&quot;"><id>tag:blogger.com,1999:blog-1731449971700063597.post-7846857469261973950</id><published>2008-04-25T00:57:00.000+03:00</published><updated>2008-04-25T01:11:29.311+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-25T01:11:29.311+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="simulations" /><category scheme="http://www.blogger.com/atom/ns#" term="theory" /><category scheme="http://www.blogger.com/atom/ns#" term="physics" /><title>Learning</title><content type="html">There are lots to learn about physical simulations before the coding itself starts.

There is a &lt;a href="http://reddit.com/info/6c6r6/comments/"&gt;great collection of links on reddit on the topic&lt;/a&gt;. Currently I'm attracted with &lt;a href="http://ocw.mit.edu/OcwWeb/Physics/8-01Physics-IFall1999/VideoLectures/"&gt;MIT video lectures on Classical Mechanics&lt;/a&gt; (to refresh the knowledge got in school) and with these &lt;a href="http://www.cs.cornell.edu/courses/cs567/2007sp/"&gt;lecture notes&lt;/a&gt; which contains quite good list of links to apropriate papers.</content><link rel="replies" type="application/atom+xml" href="http://physics-dph.blogspot.com/feeds/7846857469261973950/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1731449971700063597&amp;postID=7846857469261973950" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/7846857469261973950?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/7846857469261973950?v=2" /><link rel="alternate" type="text/html" href="http://physics-dph.blogspot.com/2008/04/learning.html" title="Learning" /><author><name>Roman Cheplyaka</name><uri>http://www.blogger.com/profile/07189392968519496723</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp3.blogger.com/_W18npoo34JQ/R9AlpicfH-I/AAAAAAAAAAM/il6y8fk_BBw/S220/me-donetsk.jpeg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DkcCSHc6eip7ImA9WxdREEg.&quot;"><id>tag:blogger.com,1999:blog-1731449971700063597.post-9044767357972180285</id><published>2008-04-22T08:17:00.000+03:00</published><updated>2008-05-29T12:41:09.912+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-05-29T12:41:09.912+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="project" /><title>Intro</title><content type="html">&lt;p&gt;Hi all!&lt;/p&gt;

&lt;p&gt;My name is &lt;a href="http://ro-che.info/"&gt;Roman Cheplyaka&lt;/a&gt; and my proposal &lt;A href="http://ro-che.info/docs/physics.txt"&gt;Data parallel physics engine&lt;/a&gt; was accepted for Google Summer of Code 2008. My mentors are Manuel M T Chakravarty and Roman Leshchinskiy.&lt;/p&gt;

&lt;p&gt;In this blog I'll write about everything interesting I'll learn during this project, and also about my achievements and problems.&lt;/p&gt;

&lt;p&gt;Please feel free to annoy me with your suggestions, advices or comments of any kind :)&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://physics-dph.blogspot.com/feeds/9044767357972180285/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1731449971700063597&amp;postID=9044767357972180285" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/9044767357972180285?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1731449971700063597/posts/default/9044767357972180285?v=2" /><link rel="alternate" type="text/html" href="http://physics-dph.blogspot.com/2008/04/intro.html" title="Intro" /><author><name>Roman Cheplyaka</name><uri>http://www.blogger.com/profile/07189392968519496723</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://bp3.blogger.com/_W18npoo34JQ/R9AlpicfH-I/AAAAAAAAAAM/il6y8fk_BBw/S220/me-donetsk.jpeg" /></author><thr:total>4</thr:total></entry></feed>
