Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using dot product to determine if point lies on a plane

Given A: a point, B: A point known to exist on a plane P, C: the normal of plane P. Can I determine if A lies on P by the result of a dot product between (A - B) and C being zero? (or within a certain level of precision, I'll probably use 0.0001f)

I might just be missing some obvious mathematical flaw but this seems to be much simpler and faster than transforming the point to a triangle's coordinate space a.la the answer to Check if a point is inside a plane segment

So secondly I guess; if this is a valid check, would it be computationally faster than using matrix transformations if all I want is to see if the point is on the plane? (and not whether it lies within a polygon on said plane, I'll probably keep using matrix transforms for that)

like image 628
Stomy Avatar asked Jun 21 '13 03:06

Stomy


1 Answers

You are correct that B lies on the plane through A and with normal P if and only if dotProduct(A-B,P) = 0.

To estimate speed for this sort of thing, you can pretty much just count the multiplications. This formula just has three multiplications, so its going to be faster than pretty much anything to do with matrices.

like image 134
David Norman Avatar answered Oct 02 '22 01:10

David Norman