<?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/912" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2007-01-14T12:00:44+00:00</updated>

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

		<entry>
		<author><name><![CDATA[Jan Bender]]></name></author>
		<updated>2007-01-14T12:00:44+00:00</updated>

		<published>2007-01-14T12:00:44+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3208#p3208</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3208#p3208"/>
		<title type="html"><![CDATA[Stable Joints]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3208#p3208"><![CDATA[
<blockquote class="uncited"><div>Given a gravity of -10 and one timestep of 1s the error would be indeed 5m, but this is an unrealistic assumption. The position difference scales with the size of the timestep. So for a more realistic assumption of a timestep of 1/60 the absolute position difference is 83 mm after 1s.</div></blockquote>8.3 cm error during 1/60 s is quite much in my opinion but since you already know I am a fan of accuracy. In my PhD thesis I often work with a maximal allowed tolerance of 10^-6 m. Compared to this 8.3 cm is very much  <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"> <br><br>Jan<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=818">Jan Bender</a> — Sun Jan 14, 2007 12:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dirk Gregorius]]></name></author>
		<updated>2007-01-13T08:52:30+00:00</updated>

		<published>2007-01-13T08:52:30+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3205#p3205</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3205#p3205"/>
		<title type="html"><![CDATA[Stable Joints]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3205#p3205"><![CDATA[
This is no spring. It is a particle vertically falling down. I just wanted to show that the position difference between first and second order Euler is not 0.5 * g after one second for this particular case. Basically the point was if it makes a difference in the "Position Based Dynamics" paper to use this:<br><br>IntegrateAllParticlesUsingSemiImplictEuler();<br>SatisfyAllConstraints();<br><br>versus<br><br>IntegrateAllParticlesUsingSecondOrderEuler();<br>SatisfyAllConstraints();<br><br>Jan is correct for pointing this out and I guess you can use this, but I questioned that this makes such a big difference as he stated above. Another reason for the first solution might be that they use CCD what might make their life a little easier when dealing with the collision constraints. Just out of couriosity - has anybody success in simulating skirts with this method or any other more complicated contact setup?<br><br><br>Cheers,<br>-Dirk<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14">Dirk Gregorius</a> — Sat Jan 13, 2007 8:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erin Catto]]></name></author>
		<updated>2007-01-12T22:18:20+00:00</updated>

		<published>2007-01-12T22:18:20+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3204#p3204</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3204#p3204"/>
		<title type="html"><![CDATA[Stable Joints]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3204#p3204"><![CDATA[
You cannot simulate a simple mass-spring system with 1st order or 2nd order Euler. You have to add damping. A small time step won't help.<br><br>That is quite unrealistic.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=12">Erin Catto</a> — Fri Jan 12, 2007 10:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dirk Gregorius]]></name></author>
		<updated>2007-01-12T21:14:41+00:00</updated>

		<published>2007-01-12T21:14:41+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3203#p3203</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3203#p3203"/>
		<title type="html"><![CDATA[Stable Joints]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3203#p3203"><![CDATA[
<blockquote class="uncited"><div>If a body falls down for one second (due to gravity g) this leads to a position error of 0.5*g which is quite big (in my opinion). </div></blockquote>Given a gravity of -10 and one timestep of 1s the error would be indeed 5m, but this is an unrealistic assumption. The position difference scales with the size of the timestep. So for a more realistic assumption of a timestep of 1/60 the absolute position difference is 83 mm after 1s. Also noting that all particles are subject to quite alot constraints this is really negligible. The only thing you want to make sure is that the solver sees the gravity directly and not with one frame delay like for the normal Euler. Yours and Muller's solver do this. <br><br>I have written a small sample app so you can verify this. <br><br> <br><div class="codebox"><p>Code: </p><pre><code>#include &lt;iostream&gt;const float g = -10.0f;const float dt = 1.0f / 60.0f;int main( void ){float x1 = 10.0f;float v1 =  0.0f;float x2 = 10.0f;float v2 =  0.0f;float x3 = 10.0f;float v3 =  0.0f;for ( int i = 0; i &lt; 60; ++i ){//// Euler//// x(t+dt) = x(t) + v(t) * dt// v(t+dt) = v(t) + a(t) * dt//x1 += v1 * dt;v1 +=  g * dt;// // Semi-implicit Euler//// v(t+dt) = v(t) + a(  t ) * dt// x(t+dt) = x(t) + v(t+dt) * dt// v2 +=  g * dt;x2 += v2 * dt;//// 2. Order Euler//// x(t+dt) = x(t) + v(t) * dt + 0.5 * a(t) * dt^2// v(t+dt) = v(t) + a(t) * dtx3 += v3 * dt + 0.5f * g * dt * dt;v3 +=  g * dt;printf( "E1: (%.3f, %.3f), E2: (%.3f, %.3f), E3: (%.3f, %.3f)\n", x1, v1, x2, v2, x3, v3 );}return 0;}</code></pre></div><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14">Dirk Gregorius</a> — Fri Jan 12, 2007 9:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[raigan2]]></name></author>
		<updated>2007-01-12T16:23:04+00:00</updated>

		<published>2007-01-12T16:23:04+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3200#p3200</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3200#p3200"/>
		<title type="html"><![CDATA[Stable Joints]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3200#p3200"><![CDATA[
Integration is something I could stand to learn a bit more about; I'm just using good old semi-implicit Euler/"Newton-Stormer-Verlet"/whatever it's called, which I've always used, simply because it's always worked for me and I've never bothered to look for anything better:<br><br>vel += accel<br>pos += vel<br><br>I actually thought that using the new velocity to update position was a benefit, as it reduced the error due to "extrapolating" blindly compared to regular Euler. AFAIK many integrations schemes use future velocity to update current position -- if I understand correctly, that's the basis of predictor-corrector integrators.<br><br>I'm not sure if it's accurate, but I think it looks convincing: bodies in freefall accelerate downwards, bursts of particles have arc-like trajectories. Also, the only use I've ever had for "forces" is gravity, which should be the same regardless of whether you're evaluating it at the old or new position. In the demo I posted, g = 0.1, so 0.5*g is only 0.05 pixels; an error of 1 pixel per 20 frames isn't that bad, is it?<br><br>I'm certainly quite ignorant about the mathematical vagaries of numerical integration though.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=748">raigan2</a> — Fri Jan 12, 2007 4:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Jan Bender]]></name></author>
		<updated>2007-01-12T07:59:02+00:00</updated>

		<published>2007-01-12T07:59:02+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3198#p3198</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3198#p3198"/>
		<title type="html"><![CDATA[Stable Joints]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3198#p3198"><![CDATA[
Do you use the same equations for the preview of the vertices as Mueller? Because this is physical incorrect since he first computes the new velocities using the external forces and then the positions with the new velocities (instead of using the old velocities and the forces). If a body falls down for one second (due to gravity g) this leads to a position error of 0.5*g which is quite big (in my opinion). <br><br>Or how do you implemented the preview?<br><br>Jan<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=818">Jan Bender</a> — Fri Jan 12, 2007 7:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[raigan2]]></name></author>
		<updated>2007-01-11T20:45:38+00:00</updated>

		<published>2007-01-11T20:45:38+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3197#p3197</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3197#p3197"/>
		<title type="html"><![CDATA[Stable Joints]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3197#p3197"><![CDATA[
hi,<br>In case anyone's interested in an alternate approach to joints, I've managed to get a particle-based method working which is rather rigid, and quite well-behaved. Check it out here: <a href="http://harveycartel.org/raigan/pbdTest16.swf" class="postlink">http://harveycartel.org/raigan/pbdTest16.swf</a><br><br>(click in the window to give the flashplayer focus)<br>a,s: change the joint angles<br>z: grab a particle w/ the mouse<br>1,2: change which particle you're grabbing<br>~: toggle the first "body" between pinned and free<br>spacebar: reset<br><br>This is based on the method presented in "Position Based Dynamics" by Muller, however it uses a different formulation for the angle joints (using atan instead of acos). After several failed attempts at doing it by hand, I cheated and used LiveMath to determine the formula for the Jacobian <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"> <br><br>I'm using only 4 iterations; things are much nicer/stiffer with more, but as it is I'm pushing the flashplayer.<br><br>raigan<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=748">raigan2</a> — Thu Jan 11, 2007 8:45 pm</p><hr />
]]></content>
	</entry>
	</feed>
