Linear geometric objects inside sphere test

Started by
3 comments, last by Ravana 10 years, 8 months ago

Hi All,

Say I want to check if some linear geom object (segment, tetrahedron,.. ) is fully inscribed by the sphere.

I am thinking of testing if all the vertices of the linear object lies inside sphere and if so the object itself

is inside the sphere.

Is there a possibility that this test fails for linear objects?

Also, is there a fast algorithm to do this.

Thank you.

Ravana

Advertisement

All vertices inside will work for containment within any convex shape, which a sphere is so you are good to go.

The fastest method would be to test only vertices on the convex hull of the shape you are testing.

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

even for concave objects this works, isnt it? basically if all the vertices are inside, you can not have a segment which goes from one vertice to the other making the object concave be outside sphere as the segments are linear.

Yes, it works for objects which are concave being contained in a convex shape. (EDIT: just test the convex hull of the concave shape)

It DOESN'T work if you are testing a shape inside a concave shape though (e.g. a box in an L-shaped room, can cut the corner although all vertices are inside the L). It is the containing primitive which needs to be convex for the test to work, the contained shape can be anything.

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

Yes. If the containing primitive is concave, the things are not the same. Thanks for the reply.

This topic is closed to new replies.

Advertisement