多个点是否组成一个圆? [英] Whether multiple points make up for a circle?
本文介绍了多个点是否组成一个圆?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我有20分,我该如何查看这些点是否构成一个圆圈?它不一定是一个完美的圈子.
If I have e.g. 20 points, how can i check to see if those points make up for a circle? It doesnt have to be a perfect circle.
例如,如果我每200毫秒存储一次鼠标坐标(当用户移动鼠标时),那么我想查看用户是否做出圆圈手势.我不能指望用户做出一个完美的圈子.
For example if I store the coordinates of my mouse every 200ms (as the user moves the mouse), I want to see if the user makes a circle gesture. And I cant expect the user to make a perfect circle.
推荐答案
我将执行以下操作;
- 计算最合适的圆通过点
- 计算每个点的残差(中心到点的连接距离减去最佳拟合圆半径) 如果足够大的残差百分比低于某个值(定义为最佳拟合半径的一小部分),则接受结果.这些参数将成为用户定义的接受标准.
- Compute a best fit circle through the points
- Calculate a residual for each point (the join distance from the centre to the point minus the best fit circle radius)
- Accept the result if a large enough percentage of the residuals were below a certain value defined as a small percentage of the best fit radius. These parameters would be user definable acceptance criteria.
这篇关于多个点是否组成一个圆?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文