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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2016-08-18T01:55:17+00:00</updated>

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

		<entry>
		<author><name><![CDATA[Jack2016]]></name></author>
		<updated>2016-08-18T01:55:17+00:00</updated>

		<published>2016-08-18T01:55:17+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=38035#p38035</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=38035#p38035"/>
		<title type="html"><![CDATA[Re: How to compute BoxBox contact point ?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=38035#p38035"><![CDATA[
<blockquote class="uncited"><div>They wrote dBoxBox like that because it made sense to them at the time to write it like that. They probably derive a lot of the math on paper and then translated it into code. If you want to know what c1 - k1 - k3 is then you need to go through the math and draw pictures of what everything is. You can do the math by hand and follow it along. The four points you outline look correct. If you want to read more about contact point computing try searching this forum for posts by Dirk Gregorius, also look up his GDC lecture about generating contacts.<br><br>"In order to make it clear about the code above,which paper should I read or refer to ?"<br>I suggest to stop looking into ODE and look at the link jheanley gave you if you are stuck. The code there should be easier to understand. You did <a href="https://github.com/RandyGaul/qu3e/blob/master/src/collision/q3Collide.cpp" class="postlink">read the code</a>, right?</div></blockquote>Thanks a lot.<br>I have read jHeanley's link,and understand the SAT in 3D .Also read the lecture of Drik  TheSperatingAxisTest.pdf .<br>The meaning of "c1 - k1 -k3" is the cornor of the quad which is projected to the reference face,I think I have understood.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11805">Jack2016</a> — Thu Aug 18, 2016 1:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[RandyGaul]]></name></author>
		<updated>2016-08-17T16:18:38+00:00</updated>

		<published>2016-08-17T16:18:38+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=38030#p38030</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=38030#p38030"/>
		<title type="html"><![CDATA[Re: How to compute BoxBox contact point ?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=38030#p38030"><![CDATA[
They wrote dBoxBox like that because it made sense to them at the time to write it like that. They probably derive a lot of the math on paper and then translated it into code. If you want to know what c1 - k1 - k3 is then you need to go through the math and draw pictures of what everything is. You can do the math by hand and follow it along. The four points you outline look correct. If you want to read more about contact point computing try searching this forum for posts by Dirk Gregorius, also look up his GDC lecture about generating contacts.<br><br>"In order to make it clear about the code above,which paper should I read or refer to ?"<br>I suggest to stop looking into ODE and look at the link jheanley gave you if you are stuck. The code there should be easier to understand. You did <a href="https://github.com/RandyGaul/qu3e/blob/master/src/collision/q3Collide.cpp" class="postlink">read the code</a>, right?<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=10235">RandyGaul</a> — Wed Aug 17, 2016 4:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Jack2016]]></name></author>
		<updated>2016-08-16T02:44:56+00:00</updated>

		<published>2016-08-16T02:44:56+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=38022#p38022</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=38022#p38022"/>
		<title type="html"><![CDATA[Re: How to compute BoxBox contact point ?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=38022#p38022"><![CDATA[
In the func dBoxBox2 ,after SAT it's clear to get the collision type which store in the variable "code" -&gt; 1,2,3 / 4,5,6 /9-15<br>But then I find it's still not clear about the implementation detail of contact point computing,I read the paper of Erwin GDC10_Contact.pdf<br>The paper just give us some description about Box Box Clipping,introduce the concepts of incident face ,reference face,clipping planes,<br>still not clear about the implementation detail<br><div class="codebox"><p>Code: </p><pre><code>  // find the normal and non-normal axis numbers of the reference box  int codeN,code1,code2;  if (code &lt;= 3) codeN = code-1; else codeN = code-4;  if (codeN==0) {    code1 = 1;    code2 = 2;  }  else if (codeN==1) {    code1 = 0;    code2 = 2;  }  else {    code1 = 0;    code2 = 1;  }  // find the four corners of the incident face, in reference-face coordinates  btScalar quad[8];// 2D coordinate of incident face (x,y pairs)  btScalar c1,c2,m11,m12,m21,m22;  c1 = dDOT14 (center,Ra+code1);  c2 = dDOT14 (center,Ra+code2);  // optimize this? - we have already computed this data above, but it is not  // stored in an easy-to-index format. for now it's quicker just to recompute  // the four dot products.  m11 = dDOT44 (Ra+code1,Rb+a1);  m12 = dDOT44 (Ra+code1,Rb+a2);  m21 = dDOT44 (Ra+code2,Rb+a1);  m22 = dDOT44 (Ra+code2,Rb+a2);  {    btScalar k1 = m11*Sb[a1];    btScalar k2 = m21*Sb[a1];    btScalar k3 = m12*Sb[a2];    btScalar k4 = m22*Sb[a2];    quad[0] = c1 - k1 - k3;    quad[1] = c2 - k2 - k4;    quad[2] = c1 - k1 + k3;    quad[3] = c2 - k2 + k4;    quad[4] = c1 + k1 + k3;    quad[5] = c2 + k2 + k4;    quad[6] = c1 + k1 - k3;    quad[7] = c2 + k2 - k4;  }  // find the size of the reference face  btScalar rect[2];  rect[0] = Sa[code1];  rect[1] = Sa[code2];  // intersect the incident and reference faces  btScalar ret[16];  int n = intersectRectQuad2 (rect,quad,ret);  if (n &lt; 1) return 0;// this should never happen</code></pre></div>what's the reason to compute 4 cornors, and why quat[0] = c1 - k1 -k3 compute like this<br>In order to make it clear about the code above,which paper should I read or refer to ?<br><br>after two days to read the src code above, I'm clear now.So I'll share my experience and give a brief description about the algorithm<br>1 -&gt; incident face(world coordinate) projected to reference face local coordinate, the local coordinate is 2D<br>2 -&gt; compute the contact in reference face local coordinate points which is implemented in func intersectRectQuat2<br>3 -&gt; convert the contact points from the local coordinate to world coordinate<br>4 -&gt; compute the penetration of each contact point,only the depth &lt;= 0. is contact point<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11805">Jack2016</a> — Tue Aug 16, 2016 2:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Jack2016]]></name></author>
		<updated>2016-08-15T05:33:23+00:00</updated>

		<published>2016-08-15T05:33:23+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=38014#p38014</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=38014#p38014"/>
		<title type="html"><![CDATA[Re: How to compute BoxBox contact point ?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=38014#p38014"><![CDATA[
<a href="http://gamedev.stackexchange.com/questions/44500/how-many-and-which-axes-to-use-for-3d-obb-collision-with-sat/" class="postlink">http://gamedev.stackexchange.com/questi ... -with-sat/</a><br><br>SAT in 3D / compute contact point  implementation detail<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11805">Jack2016</a> — Mon Aug 15, 2016 5:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Jack2016]]></name></author>
		<updated>2016-08-13T00:38:26+00:00</updated>

		<published>2016-08-13T00:38:26+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=37979#p37979</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=37979#p37979"/>
		<title type="html"><![CDATA[Re: How to compute BoxBox contact point ?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=37979#p37979"><![CDATA[
<blockquote class="uncited"><div>This should be a reasonable start, this is OBB vs OBB collisions. (OBB is Oriented Bounding Box, the other type is AABB or axis aligned bounding box which is somewhat cheaper to compute)<br><br><a href="http://www.randygaul.net/2014/05/22/deriving-obb-to-obb-intersection-sat/" class="postlink">http://www.randygaul.net/2014/05/22/der ... ction-sat/</a></div></blockquote>this article is very helpful , Thanks<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11805">Jack2016</a> — Sat Aug 13, 2016 12:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[jheanley]]></name></author>
		<updated>2016-08-12T14:13:59+00:00</updated>

		<published>2016-08-12T14:13:59+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=37976#p37976</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=37976#p37976"/>
		<title type="html"><![CDATA[Re: How to compute BoxBox contact point ?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=37976#p37976"><![CDATA[
This should be a reasonable start, this is OBB vs OBB collisions. (OBB is Oriented Bounding Box, the other type is AABB or axis aligned bounding box which is somewhat cheaper to compute)<br><br><a href="http://www.randygaul.net/2014/05/22/deriving-obb-to-obb-intersection-sat/" class="postlink">http://www.randygaul.net/2014/05/22/der ... ction-sat/</a><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11807">jheanley</a> — Fri Aug 12, 2016 2:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Jack2016]]></name></author>
		<updated>2016-08-12T05:55:30+00:00</updated>

		<published>2016-08-12T05:55:30+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=37972#p37972</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=37972#p37972"/>
		<title type="html"><![CDATA[How to compute BoxBox contact point ?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=37972#p37972"><![CDATA[
when I read the btBoxBoxCollisionAlgorithm source code to compute BoxBox contact points ,I find it's hard to understand.<br>so which book or paper should I refer to,I want to know the principle first<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11805">Jack2016</a> — Fri Aug 12, 2016 5:55 am</p><hr />
]]></content>
	</entry>
	</feed>
