【发布时间】:2012-08-09 22:41:54
【问题描述】:
我有 3 个随机点,需要相对于它们形成的平面的法线(其中一个)逆时针排列它们。
所以问题是:我有积分,我有正常 - 我如何逆时针排列它们?
我已经看到this post 使用极坐标形式,但不确定这是否是我想要的以及我应该使用什么点。
【问题讨论】:
标签: math graphics computational-geometry
我有 3 个随机点,需要相对于它们形成的平面的法线(其中一个)逆时针排列它们。
所以问题是:我有积分,我有正常 - 我如何逆时针排列它们?
我已经看到this post 使用极坐标形式,但不确定这是否是我想要的以及我应该使用什么点。
【问题讨论】:
标签: math graphics computational-geometry
If you haven't picked a normal yet, then no matter what order you write three points in, they are ordered counter-clockwise (relative to a suitably chosen normal).
如果你已经有一个普通的(我们称它为 n,并使用 a、b、c 表示点),请查看n*((b-a)x(c-a)) 的符号。如果为正,则 (a,b,c) 为逆时针方向;如果为负,则为 (a,c,b)。
【讨论】: