转变为摆脱共线点 [英] Transformation to get rid of collinear points
本文介绍了转变为摆脱共线点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的算法不会很好地处理共线点。
是否有任何转换可以应用到点以摆脱共线性? 然后我认为噪音实际上可能是解决方案。正如我在上面的评论中所写的那样
消除共线性的一种方法是
只是为每个
添加一些噪音(随机()-0.5),z + 0.01(随机() - 0.5),即(x,y,z) )如果random()在[0,1 [。
中返回一个随机实数
I'm writing a program to solve a geometry problem.
My algorithm doesn't treat collinear point very well.
Is there any transformation I can apply to the points to get rid of the collinearity?
解决方案
Then I think that noise might actually be the solution. As I wrote in the comment above
One way to remove colinearity is simply to add some noise to each point, i.e. (x, y, z) ↦ (x + 0.01*(random() - 0.5), y + 0.01*(random() - 0.5), z + 0.01(random() - 0.5)) if random() returns a random real number in [0, 1[.
这篇关于转变为摆脱共线点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文