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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2022-08-30T14:16:56+00:00</updated>

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

		<entry>
		<author><name><![CDATA[bpatra4]]></name></author>
		<updated>2022-08-30T14:16:56+00:00</updated>

		<published>2022-08-30T14:16:56+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44101#p44101</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44101#p44101"/>
		<title type="html"><![CDATA[Re: Isuue in computing shortest distance between the cone and sphere]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44101#p44101"><![CDATA[
Thanks a lot @drleviathan!<br><br>Yes, you are right. The input to the <strong class="text-strong">btGjkPairDetector::ClosestPointInput()</strong> should be the centre of mass of the cone, which is nothing but the located between the centre of the base circle and the vertex of a cone. This has solved my issue.<br><br>Thanks again!<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14416">bpatra4</a> — Tue Aug 30, 2022 2:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[drleviathan]]></name></author>
		<updated>2022-08-30T13:05:17+00:00</updated>

		<published>2022-08-30T13:05:17+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44100#p44100</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44100#p44100"/>
		<title type="html"><![CDATA[Re: Isuue in computing shortest distance between the cone and sphere]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44100#p44100"><![CDATA[
The comment on this line seems incorrect to me:<div class="codebox"><p>Code: </p><pre><code>tr[0].setOrigin(btVector3(0, 0, -1)); // centre of the base circle of the cone</code></pre></div>I would expect the transform supplied to the <strong class="text-strong">btGjkPairDetector::ClosestPointInput()</strong> to be that of the shape's origin (its center of mass (COM)), not to be that of a point on the shape's surface.<br><br>Which raises the question: Does the Bullet ConeShape use the correct COM of a uniform cone, which would be closer to the base than the tip?  Or does it use a simplified COM located midway between the base and its tip?  Looking at the code... it appears to use the latter, which kinda makes sense because the math is easier. Specifically, when I say it "appears to use the latter" I'm basing my statement on the implementation of:<div class="codebox"><p>Code: </p><pre><code>btVector3 btConeShape::coneLocalSupport(const btVector3&amp; v) const</code></pre></div><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11033">drleviathan</a> — Tue Aug 30, 2022 1:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[bpatra4]]></name></author>
		<updated>2022-08-30T05:12:20+00:00</updated>

		<published>2022-08-30T05:12:20+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44099#p44099</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44099#p44099"/>
		<title type="html"><![CDATA[Isuue in computing shortest distance between the cone and sphere]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44099#p44099"><![CDATA[
Hi,<br><br>I am trying to find the shortest distance between a cone and a sphere in C++. The information on the cone is as follows. The centre of the base circle of the cone is at {0, 0, -1}, and the vertex of the cone is at {0,0,0}. The radius and height of the cone are 0.58454 and 1, respectively. Similarly, the radius of the sphere is 0.1 centred at {0.9, 0.9, 0.1}. The shortest distance is computed to be 1.3016, and the foot of the perpendicular is found to be inside the cone instead of on the cone. The correct shortest distance is 1.1493.<br><br>I am attaching the code here.<br><br>Please help me to fix the code. Thanks a lot!<div class="inline-attachment"><dl class="file"><dt><span class="imageset icon_topic_attach"></span> <a class="postlink" href="https://pybullet.org/Bullet/phpBB3/download/file.php?id=1945">cone_sphere_proximity_check_Forforum.cpp</a></dt></dl></div><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14416">bpatra4</a> — Tue Aug 30, 2022 5:12 am</p><hr />
]]></content>
	</entry>
	</feed>
