I want to define a bounded plane, ie a rectangle in 3d space. I realize it could be defined just by declaring its 4 vertices, but I will be using a line intersection algorithm many times on this shape so I want the definition to be somewhat useful for that purpose. Is there some standard way to define something like this?
Asked
Active
Viewed 978 times
1 Answers
2
It is worth to define one corner as base point, and two perpendicular vectors for neighbor sides.
For example A, V=AB, U=AD. In this case
B = A + V
D = A + U
C = A + U + V
N = V x U (normal to the plane is cross product of vectors)
Any point belonging to the plane has equation
P = A + v * V + u * U
And both coefficients v
and u
are in range 0..1
for points inside bounds

MBo
- 77,366
- 5
- 53
- 86