Geometry – How to Determine if Two Cables Have Crossed

3dgeometryvectors

I have the following problem.

A body in space is connected to by cables to two fixed points.

In the initial position, a high fixed point is connected to a low point on the body and a low fixed point is connected to a high point on the body. This means that the cables are already quite close to crossing.
The body can be rotated within certain constraints, but not more than say +/- 30 degrees. (It will not turn upside down.)

The movement of the body must be constrained, so that the cables do not cross.

The cable positions are defined by the end points of each cable, so there are four points in all.
The initial position is known.

Given two new positions on the body, I want to determine whether the cables would have crossed to reach this position (i.e. is it a legal position).

My idea is, that I can define a plane based on three of the four points. The fourth point must then be constrained to always lie on the one side of that plane.

Is there a mathematically elegant way to determine this?

Edit

The application is something like the system shown in the following image from this page

this image

Best Answer

Let $p_1,p_2$ be the points of the first cable and $q_1,q_2$, the points for the second cable. Let us consider vectors $\vec{u}=p_2-p_1$ and $\vec{v}=q_1-p_1$. Then, $\vec{n}=\vec{u}\times\vec{v}$ defines the direction of the normal vector of the plane defined by $p_1$, $p_2$ and $q_1$. Now, it is enough to check that, given $\vec{w}=q_2-p_1$, the value $\lambda = \vec{w}\cdot\vec{n}$ does not change its sign.

Related Question