是否有仅使用极坐标来查找附近点的算法? [英] Is there an algorithm to find nearby points using only polar coordinates?

查看:86
本文介绍了是否有仅使用极坐标来查找附近点的算法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有一个点向量作为极坐标.

Suppose I have a vector of points as polar coordinates.

假设这些点之一充当探针,我想在特定距离内找到所有其他点.

Suppose one of those points acts as a probe for which I want to find all the other points within a certain distance.

是否存在一种无需将其转换为笛卡尔形式的算法?

Is there an algorithm to do this without converting them to Cartesian form?

推荐答案

您正在寻找极坐标的距离.您可以在此链接中找到该公式.

You are looking for the distance for polar coordinates. You can find the formula in this link.

(r1,a1)和(r2,a2)点之间的距离为:

The distance between points (r1, a1) and (r2, a2) is:

D = sqrt(r1*r1 + r2*r2 - 2*r1*r2*cos(a1-a2))

这篇关于是否有仅使用极坐标来查找附近点的算法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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