Artificial intelligent assistant

3D Equivalent of Clockwise and Counter-Clockwise? As an example say I have some 2D points which are formed into a polygon: ![enter image description here]( The order of sequential points may be clockwise or counter-clockwise, but is there a 3-dimensional equivalent (even if there are more than two ways of doing it, as long as there are some finite number of ways of doing it for an infinite set of points and it is intrinsic to the geometry, that is nothing like "order by a vector then loop clockwise or counterclockwise around that vector" which might change with different values for the vector.)

You can define if a line (edge connecting two points) has a counterclockwise (positive) or clockwise (negative) moment with respect to a rotation axis. For the planar equivalent the rotation axis is coming out of the plane.

You do this with the triple product. Let's say the rotation axis is $\vec{z}$ and all points are defined wrt. this axis have position $\vec{r}_i$, then two points _i_ and _j_ forming an edge have direction $\vec{e} = \vec{r}_j - \vec{r}_i$

The edge is CCW to the rotation if

$$ \vec{z} \cdot \left( \vec{r}_i \times \vec{e} \right) > 0 $$

or

$$ \vec{z} \cdot \left( \vec{r}_i \times \vec{r}_j \right) > 0 $$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 94ebdd7158da252eeb1d73f2d21f3bf0