您如何确定3D空间中的点列表是否按顺时针方向排列? [英] How do you determine if a list of of points in 3D space are in clock-wise order?

查看:82
本文介绍了您如何确定3D空间中的点列表是否按顺时针方向排列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

point[0] = (0,1,1)
point[1] = (1,1,1)
point[2] = (0,0,1)
point[3] = (1,0,1)

对于下面的示例,上方的每个点都映射到下面的可视化图中的索引.

For examples below, each point above maps to an index in the visualization below.

0----------1
|          |
|          |
|          |
3----------2

推荐答案

您不能.

如果这些点不是共面的,则甚至不可能定义方向.

If the points are not coplanar, it is even impossible to define an orientation.

如果这些点是共面的,则可以从两侧看它们的平面.

If the points are coplanar, you can look at their plane from both sides.

如果要相对于观察者此信息,请将顶点投影到查看平面(以缩小为2D),并通过鞋带公式计算代数面积.标志告诉您方向.

If you want this information with respect to an observer, project the vertices to the viewing plane (to reduce to 2D) and compute the algebraic area by the shoelace formula. The sign tells you the orientation.

这篇关于您如何确定3D空间中的点列表是否按顺时针方向排列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆