How do I find if a point exists in a3D solid? I am attempting to write a program in which I must determine if a point with known x, y, z coordinates exists within a solid with 8 vertices. All the dimensions of the vertices are known. In terms of the programming, we must determine formulas such that it produces a true or false statement, so I assume that the point must pass (6) statements that show it is contained by each plane. How would I most simply set up a check for the point in terms of each plane?
Also, from the link Given 4 corner points of a rectangle in 3d space, how to find its "plane" equation? I see a definite formula, but I would like to see how it would look when expanded into a simple equation.
 A: You may wish to read up on the point in polygon/polyhedron problem.
What you do is construct a ray coming out of the point in question, in one direction (e.g. $(x_0, y_0, z_0)^{T}+\lambda \mathbf{i}\ \ \ \forall \lambda\in \mathbb{R}_{\geq 0}$). If this ray crosses the solid an odd number of times, it's inside the solid; otherwise it's outside.
To implement this you'll probably want to to find the intersection of your ray with each face of your solid, and then check that $\lambda\geq 0$ and that the intersection point is actually inside the face in question (to check if the intersection point is inside the face, you can a similar method to the above, except that you're checking for intersection with the edges of the face).
To answer the second part of your question:
Pick any 3 points on the rectangle (probably easiest to choose 3 corners), call them $\mathbf{a}, \mathbf{b}, \mathbf{c}$.
If you want the vector equation (which is probably easier to work with here), then it's just $\mathbf{a}+\lambda(\mathbf{a}-\mathbf{b})+\mu(\mathbf{a}-\mathbf{c})\ \ \ (\forall \lambda, \mu \in \mathbb{R})$.
If you want the Cartesian equation, the normal $\mathbf{n}$ to the plane can be found by $(\mathbf{a}-\mathbf{b})\times(\mathbf{a}-\mathbf{c})$ (where $\times$ denotes the cross product). If we then write $\mathbf{n}=(p, q, r)^{T}$, then the equation of the plane has the form $px+qy+rz=d$, for some constant $d$.
If the polygon in question is convex with $8$ vertices (and you want to test a large number of points), then you may be able to use an inequality method (I think this'll work, but I've got no proof). First get a point $K$ that you know is inside the polygon (to get such a point, I think you could find the centres of the each of the faces, and then calculate the centroid of these $6$ points). Once you've got $K$, write out the cartesian equation for each face $ F $, i.e. $px+qy+rz=d$. Now, plug $ x, y, z $ into $px+qy+rz$ for this given point and note whether it's $ > $ or $ < $ than $d$. Then any given point is inside the polygon iff it meets the same direction inequality as $K$ for all $6$ faces.
