Library To Determine Surface Sense in a Half-Space

Started by
0 comments, last by alvaro 6 years, 11 months ago

Hello,

I have a collection of planes and cylinders.

I also have a collection of points.

I'd like a library that tells me which side of a plane/cylinder (surface) a point is on (its surface sense)

Does anything like this exist? Preferably something for Python or C#.

Regards,

-TP

Advertisement
The math for this is not difficult. Why would you need a library?

If a plane is specified by a point P and a normal vector N, the sign of dot_product(X-P,N) tells you what side of the plane the point X is on. For the cylinder, compute the distance from X to the axis of the cylinder and compare to the radius of the cylinder (or compare their squares, so you don't have to call sqrt).

This topic is closed to new replies.

Advertisement