如何在已知起点,终点和半径的情况下找到圆弧圆周上的点? [英] How to find points on the circumference of a arc knowing a start point, an end point and the radius?

查看:203
本文介绍了如何在已知起点,终点和半径的情况下找到圆弧圆周上的点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请查看下面的图片以直观了解我的问题:

Please see the image below for a visual clue to my problem:

我具有点1和2的坐标.它们是通过使用其他可用信息的公式得出的(请参阅问题:

I have the coordinates for points 1 and 2. They were derived by a formula that uses the other information available (see question: How to calculate a point on a circle knowing the radius and center point).

我现在需要做的(与轨道构造不同)是在点1和点2之间以绿色绘制点.

What I need to do now (separately from the track construction) is plot the points in green between point 1 and 2.

这样做的最佳方法是什么?我的数学技能并不是我必须承认的最好的技能,而且我敢肯定有一个非常简单的公式,我只是无法(根据我的研究得出)要使用或实现的方式.

What is the best way of doing so? My Maths skills are not the best I have to admit and I'm sure there's a really simple formula I just can't work out (from my research) which to use or how to implement.

推荐答案

在我对您所链接问题的回答的注释中(即x,y是当前位置,fx,fy是当前转发向量",而lx ,ly是当前的左向量")

In the notation of my answer to your linked question (i.e. x,y is the current location, fx,fy is the current 'forward vector', and lx,ly is the current 'left vector')

for (i=0; i<=10; i++)
{
  sub_angle=(i/10)*deg2rad(22.5);
  xi=x+285.206*(sin(sub_angle)*fx + (1-cos(sub_angle))*(-lx))
  yi=y+285.206*(sin(sub_angle)*fy + (1-cos(sub_angle))*(-ly))
  // now plot green point at (xi, yi)
}

将生成沿弧线等距分布的11个绿点.

would generate eleven green points equally spaced along the arc.

这篇关于如何在已知起点,终点和半径的情况下找到圆弧圆周上的点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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