I am attempting to determine a plane for slicing 3D objects in OpenGL. For this I have traced two parallel rays into the 3D world (from a 2D window). It is possible to determine a plane by two parallel lines, but I am having difficulties getting to a representation of the given plane.
1) How do I represent a plane given by two vectors (when I can only use vectors and matrices)? 2) How do I then determine if a point is above or below the plane? (I assume that I can do that by plugging in the point's coordinates in the equation and seeing if it's below or above an absolute threshold)
I'd be very much obliged by anyone who can help.
Plane can be represented easiest by:
$$ A x + By + Cz = D $$
Now vector $(A,B,C)$ is perpendicular to the plane. Given two vectors that lie in the plane it's easiest to find such vector by computing cross product.
To find value of $D$ you need to plug in some point into your equation (knowing it's in the plane and knowing $A,B,C$ already) and this will give you $D$.
For checking if something is above or below plane you need some clear definition of above. Most likely you'd like vertical lines to have large $z$ values to be above. This picks one of the half volumes of your world with inequality:
$$ Ax+By+Cz > D $$
This is equation for the upper side provided $C>0$ (otherwise just change sign of everything).