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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2016-03-01T00:57:21+00:00</updated>

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

		<entry>
		<author><name><![CDATA[vanger]]></name></author>
		<updated>2016-03-01T00:57:21+00:00</updated>

		<published>2016-03-01T00:57:21+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=37094#p37094</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=37094#p37094"/>
		<title type="html"><![CDATA[Re: distance joint]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=37094#p37094"><![CDATA[
He computed effective mass matrix (inverse of it) in the usual way. If you have a constraint C on your (generalized) coordinates you can deduce a velocity constraint by differentiation so Cdot = JV, where V is a colums of (generalized) velocities (velocities components and angular velocities in this case) and J is some matrix. We'll call it a Jacobian matrix. The main idea is to change velocities by such forces which do no work. Such forces have the form of JT \lambda, where JT is J transposed. <br>Lets V1 and V2 are velocities on the current iteration and a next one (sought of).<br>According to the equations of motion<br>M(V2 - V1) = F h = JT p,<br>where h is a time step, p = h \lambda.<br>So V2 = V1 + Minv JT p.<br>We still don't know what p is. But we do know that the correct V2 satisfies J V2 = 0. So<br>J V1 + J Minv JT p = 0.<br>But J V1 is just a Cdot on a current step. That matrix J Minv JT usually denoted as K. It's inverse can be sought as an effective mass matrix.<br>And finally p = -Kinv J V1.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11632">vanger</a> — Tue Mar 01, 2016 12:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Isawyou]]></name></author>
		<updated>2015-11-22T20:38:34+00:00</updated>

		<published>2015-11-22T20:38:34+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=36635#p36635</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=36635#p36635"/>
		<title type="html"><![CDATA[distance joint]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=36635#p36635"><![CDATA[
hi!<br>I didn't understand joints, also the code from erin catto GDC 2009<br>Mat22 Rot1(body1-&gt;rotation);<br>Mat22 Rot2(body2-&gt;rotation);<br><br>r1 = Rot1 * localAnchor1;<br>r2 = Rot2 * localAnchor2;<br><br>// deltaV = deltaV0 + K * impulse<br>// invM = [(1/m1 + 1/m2) * eye(2) - skew(r1) * invI1 * skew(r1) - skew(r2) * invI2 * skew(r2)]<br>//      = [1/m1+1/m2     0    ] + invI1 * [r1.y*r1.y -r1.x*r1.y] + invI2 * [r1.y*r1.y -r1.x*r1.y]<br>//        [    0     1/m1+1/m2]           [-r1.x*r1.y r1.x*r1.x]           [-r1.x*r1.y r1.x*r1.x]<br>Mat22 K1;<br>K1.col1.x = body1-&gt;invMass + body2-&gt;invMass;K1.col2.x = 0.0f;<br>K1.col1.y = 0.0f;K1.col2.y = body1-&gt;invMass + body2-&gt;invMass;<br><br>Mat22 K2;<br>K2.col1.x =  body1-&gt;invI * r1.y * r1.y;K2.col2.x = -body1-&gt;invI * r1.x * r1.y;<br>K2.col1.y = -body1-&gt;invI * r1.x * r1.y;K2.col2.y =  body1-&gt;invI * r1.x * r1.x;<br><br>Mat22 K3;<br>K3.col1.x =  body2-&gt;invI * r2.y * r2.y;K3.col2.x = -body2-&gt;invI * r2.x * r2.y;<br>K3.col1.y = -body2-&gt;invI * r2.x * r2.y;K3.col2.y =  body2-&gt;invI * r2.x * r2.x;<br><br>Mat22 K = K1 + K2 + K3;<br>what he mean by this part <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11463">Isawyou</a> — Sun Nov 22, 2015 8:38 pm</p><hr />
]]></content>
	</entry>
	</feed>
