0

I need to check if cycle given by $(x_1, y_1, z_1), (x_2, y_2, z_2), (x_3, y_3, z_3)$ is clockwise or counterclockwise. I have found this answer: Detecting whether directed cycle is clockwise or counterclockwise but I don't have a clue how to make it work for 3 dimensional space.

flag
9 
Clockwise and anticlockwise don't mean anything in three dimensions. – Robin Chapman Dec 6 2010 at 10:22
To extend Robin's remark, you need a specified direction $u$ (perhaps the $z$-direction). Then you can determine if the cycle is cw or ccw with respect to $u$. – Joseph O'Rourke Dec 6 2010 at 11:18

closed as off topic by Denis Serre, Douglas Zare, Tim Perutz, Qiaochu Yuan, Pete L. Clark Dec 6 2010 at 18:18

2 Answers

2

If your three points are not collinear, they determine a plane. If you look at them from one side, you see the cycle being clockwise, and if you look from the other side, it is counterclockwise. You need extra information to help you choose one side of the plane. It is customary to have an orientation of the plane, given by a normal to that plane. Of course, any direction helps you choosing a side, but you have to make sure that it is not parallel to the plane or included in it.

link|flag
0

Hm, maybe you could add another point, P, and compute the three vectors to that point. The sign of the signed volume that these 4 points span (computed with determinant of the three vectors) could give you some sort of thing that might be interpreted as orientation. (Choose P = (0,0,0) seems to be a canonical choice of P)

link|flag

Not the answer you're looking for? Browse other questions tagged or ask your own question.