<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/474" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2006-08-20T01:01:50+00:00</updated>

	<author><name><![CDATA[Real-Time Physics Simulation Forum]]></name></author>
	<id>https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/474</id>

		<entry>
		<author><name><![CDATA[raigan2]]></name></author>
		<updated>2006-08-20T01:01:50+00:00</updated>

		<published>2006-08-20T01:01:50+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=1554#p1554</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=1554#p1554"/>
		<title type="html"><![CDATA[Improved the Box2D engine, have a few problems]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=1554#p1554"><![CDATA[
after some poking around trying to figure out why things were so bouncy, i discovered that you've unfortunately used an older version of Erin's code that lacks seperate position and velocity impulses. alas..<br><br>in case anyone else is trying to compile in code:blocks w/ the MSVC2003 compiler, deleting the "ShapeType::" from in front of all the ShapeType::BoxShape seems to get rid of all those errors <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=748">raigan2</a> — Sun Aug 20, 2006 1:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[raigan2]]></name></author>
		<updated>2006-08-20T00:02:58+00:00</updated>

		<published>2006-08-20T00:02:58+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=1553#p1553</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=1553#p1553"/>
		<title type="html"><![CDATA[Improved the Box2D engine, have a few problems]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=1553#p1553"><![CDATA[
<blockquote class="uncited"><div>Nice demo!<br>- The point on the perimeter also defines the normal (the edge normal).<br>- The separation is this: dot(normal, center - point) - radius</div></blockquote>i might be misunderstanding, but i think you need to use the unit vector parallel to [point - center] as the normal (or, [center - point] if your convention is for the normal to point out of the box).<br><br>the seperation is just: ||point - center|| - radius<br><br><br>i'm tinkering with box2D myself and would be happy to contribute once i clean up my code a bit.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=748">raigan2</a> — Sun Aug 20, 2006 12:02 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[coderchris]]></name></author>
		<updated>2006-08-19T12:47:41+00:00</updated>

		<published>2006-08-19T12:47:41+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=1552#p1552</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=1552#p1552"/>
		<title type="html"><![CDATA[Improved the Box2D engine, have a few problems]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=1552#p1552"><![CDATA[
@Erin Catto: Thanks, ill try multithreading that way and see if I can get the box-circle working right<br><br>@DevO: sure thing if you posted your improvemetns I could integrate them into mine to make it even better. I have no experience with using SourceForge but I would gladly do this if I can make the library good enough...There needs to be a nice 2d physics library out there.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=743">coderchris</a> — Sat Aug 19, 2006 12:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CaptainNemo]]></name></author>
		<updated>2006-08-19T11:48:36+00:00</updated>

		<published>2006-08-19T11:48:36+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=1551#p1551</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=1551#p1551"/>
		<title type="html"><![CDATA[Improved the Box2D engine, have a few problems]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=1551#p1551"><![CDATA[
@DevO: Ah, that worked!. Thanks!<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=742">CaptainNemo</a> — Sat Aug 19, 2006 11:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DevO]]></name></author>
		<updated>2006-08-19T10:44:11+00:00</updated>

		<published>2006-08-19T10:44:11+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=1550#p1550</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=1550#p1550"/>
		<title type="html"><![CDATA[Improved the Box2D engine, have a few problems]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=1550#p1550"><![CDATA[
Nice improvements coderchris!!!<br>For some time I have payed too with Box2D and done some improvements, not as many as you but I can post it here so you may use some of my ideas to improve Box2D more.<br><br>May be it would be nice to creare SourceForge project and make simple 2D physic library? <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>Of course if Erin Catto agre, do you agre?<br><br>@CaptainNemo: Copy the link and past it into the new browse windows!<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=453">DevO</a> — Sat Aug 19, 2006 10:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CaptainNemo]]></name></author>
		<updated>2006-08-19T10:23:07+00:00</updated>

		<published>2006-08-19T10:23:07+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=1549#p1549</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=1549#p1549"/>
		<title type="html"><![CDATA[Improved the Box2D engine, have a few problems]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=1549#p1549"><![CDATA[
The download doesn't work here, I get only an angelfire site.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=742">CaptainNemo</a> — Sat Aug 19, 2006 10:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erin Catto]]></name></author>
		<updated>2006-08-19T04:43:07+00:00</updated>

		<published>2006-08-19T04:43:07+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=1548#p1548</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=1548#p1548"/>
		<title type="html"><![CDATA[Improved the Box2D engine, have a few problems]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=1548#p1548"><![CDATA[
Nice demo!<br><br>The collision and constraint processing need to be sequential with each other. I would concentrate on multi-threading collision pairs and constraint islands.<br><br>For sphere vs box:<br>- Use clamping to find the closest point on the box perimeter to the sphere center. Use this point as the contact point.<br>- The point on the perimeter also defines the normal (the edge normal).<br>- The separation is this: dot(normal, center - point) - radius<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=12">Erin Catto</a> — Sat Aug 19, 2006 4:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[coderchris]]></name></author>
		<updated>2006-08-19T00:46:46+00:00</updated>

		<published>2006-08-19T00:46:46+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=1546#p1546</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=1546#p1546"/>
		<title type="html"><![CDATA[Improved the Box2D engine, have a few problems]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=1546#p1546"><![CDATA[
Hi everyone, I started working to add some new features to the Box2D engine and Iv succeeded with:<br><br>-a hash table based broadphase collision detection method that is about O(1) (plus a little overhead for clearing / updating the table)<br>-sleeping for bodies that dont move over a period of time<br>-basic shape system (have added a circle shape, working on capsule)<br>-few optimizations here and there<br>-restitution<br>-multi-threaded (collision detection / dynamics on different threads)<br><br>Most of these work pretty well, but I have a few problems and need some suggestions for solutions<br><br>Before I forget, heres the code for what I currently have: <a href="http://www.angelfire.com/droid/coderchris/Box2D.zip" class="postlink">Source Code</a> (Right click, save target as)<br><br>First off, the main problem is that when I enable multi-threading and the number of bodies gets over about 600 or so, it becomes unstable and eventually crashes. I believe this is because teh dynamics thread is trying to access an arbiter, but the collision detection thread is deleting it at the same time, though I am not completely sure.<br>In the demos, multi-threading is not enabled by default, to enable it go into Flags.h and uncomment the MULTI_THREAD line and recompile<br><br>Secondly, unless the bodies are moving at high speeds, restitution only seems to work in between similar shapes (for example, boxes only bounce off of boxes and circle off of circles)<br>I am baffled as to why this would happen...<br><br>The last thing is that the circles can be "inside" the boxes as if they were hollow. This is because I am using lines as the boxes boundry and the spheres only check for collisions on those lines. Im not too knolegable in the collision detection field yet so I havent been able to figure out how to do correct box-circle collisions<br><br>Any hints/suggestions/solutions to these problems would be greatly appreciated.<br><br>The statistics for the various processes are cout'd<br>As you will see, the collision detection and dynamics phases take about the same amount of time, so if the multithreading worked properly all the time it would cut the amount of time normaly needed in half<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=743">coderchris</a> — Sat Aug 19, 2006 12:46 am</p><hr />
]]></content>
	</entry>
	</feed>
