Context: I am working with polytopes, I am looking for a general way of testing if a point exists within an n-polytope by a vector ray-cast (most of what I have been able to gather while hunting via google was in relation to ray-plane intersection while employing line/plane equations, I believe this approach is restrictive or that a more robust solution can be developed to solve this problem because e.g. I don’t see how the equation for say a non-convex 5-polytope is possible, I may be wrong, regardless I am looking for a solution where I am not being restricted in this manner).
I have a 2-polytope (from a 3-polytope) made up of vertices $a,b,c$ and vectors $\vec{v_1}, \vec{v_2}, \vec{v_3}$.
$e$ is the origin of the ray being cast, $\vec{u}$ is the ray-vector, $d$ is the point the ray-vector hits the 2-polytope
while $\vec{n}$ below is the normal to the 2-polytope (I am guessing this might be required for any general solution)
How do I get the point $d$ where the ray $\vec{u}$ hits $a,b,c$. I know that this is rather supposed to be a simple question using some vector algebra/rule but the only thing I am seeing is $\vec{v_1} \times \vec{ad}=0$, $\vec{v_2} \times \vec{bd}=0$ etc since they lie within the same plane.
I hope to adapt the logic of whatever general solution provided to the problem above to that being addressed by the context provided earlier
lying on
orbeing enclosed by
the surfaces of a polytope e.g. a point existing within a 3-polytope would mean that point is either being enclosed by all or it lying on any 2-polytopes(surfaces) of the 3-polytope, same logic would also be applicable say we have a 4-polytope; that would mean the point is either being enclosed by all or it lying on any of its 3-polytopes .etc $\endgroup$