Check if a point is within a quadric

147 Views Asked by At

I have a quadric surface, that is defined like this: $$0 = Ax^2 + By^2 + Cz^2 + Dxy+ Exz + Fyz + Gx + Hy + Iz + J$$

How can i check if a point is inside of the quadric or on which side of the surface it is.

I figured out that for spheres or cylinders solving the following equation worked. The sign of $q$ tells me if the point is "inside" the quadric or not

$$q = Ax^2 + By^2 + Cz^2 + Dxy+ Exz + Fyz + Gx + Hy + Iz + J$$

Is this true for all quadrics?

1

There are 1 best solutions below

0
On

For brevity, let $Q(x,y,z)=Ax^2 + By^2 + Cz^2 + Dxy+ Exz + Fyz + Gx + Hy + Iz + J$. (The letter $Q$ by itself will refer to the quadric defined by $Q(x,y,z)=0$)

Then $Q(x,y,z)=0$ and $-Q(x,y,z)=0$ both define the same quadric. So simply checking the sign of $Q(x,y,z)$ won't tell you whether the point is inside or outside the conic).

What is inside/outside for a quadric anyway? For ellipsoids it sounds straightforward, but what about hyperboloids?

A reasonable definition of "outside" is "where the tangents are" or, put another way, all the points that are on a tangent to the conic.

For a point $P$ all tangents from $P$ to $Q$ contact $Q$ on a plane $p$ that is called the polar of of $P$ wrt to $Q$. If $p$ intersects $Q$, the tangents are real, otherwise they are imaginary.

So $P$ is outside $Q$ if $p$ intersects with $Q$. This is easily computed. If you need more detail, just ask,