What is an equation to determine if a 3d point (x,y,z) is within a rectangular prism on a cartesian coordinate system? I want to check if a point is inside a rectangular prism.
e.g. the equation for a 2d rectangle is |x+y|+|x-y|<=2. This equation is based on Cobold's question here and the work is shown there. An equation like this is much more efficient and simple than a big set of inequalities comparing each coordinate of the point to the minimum and maximum coordinates of the rectangular prism in that dimension