Math 查找移动起点后绘制圆弧的公式
我试图编写一个公式来计算绘制圆弧时的新角度。如果我用图片来解释的话可能会更好 上面是我在谷歌地球上画的图片 目前,我有一个函数,可以在给定(x,y)轴点、方向角和半径距离的情况下绘制圆弧 在绘图上绘制此弧(距离原点最远的弧)后,我需要移动原点,例如,如果方向角为170度,左线将从170-90开始,右线从170+90开始 我很难找到较小同心圆的角度(或方位)公式。我想提前感谢任何人,感谢你能提供的任何帮助 这是我计算和画圆弧的公式Math 查找移动起点后绘制圆弧的公式,math,geometry,gis,computational-geometry,google-earth,Math,Geometry,Gis,Computational Geometry,Google Earth,我试图编写一个公式来计算绘制圆弧时的新角度。如果我用图片来解释的话可能会更好 上面是我在谷歌地球上画的图片 目前,我有一个函数,可以在给定(x,y)轴点、方向角和半径距离的情况下绘制圆弧 在绘图上绘制此弧(距离原点最远的弧)后,我需要移动原点,例如,如果方向角为170度,左线将从170-90开始,右线从170+90开始 我很难找到较小同心圆的角度(或方位)公式。我想提前感谢任何人,感谢你能提供的任何帮助 这是我计算和画圆弧的公式 def drawArc(lat1,lon1,lbearing,r
def drawArc(lat1,lon1,lbearing,rbearing,hr): #draw Arc given lat/lon piviot point with the right and left bearing to draw the path and distance
arcstr=""
if rbearing < lbearing: #if the left bearing is already bigger than the right bearing, switch places. Test Case not proven yet! with winds coming from the east
lbearing,rbearing = rbearing,lbearing
while lbearing < rbearing:
arc1,arc2 = getEndpoint(lat1,lon1,lbearing,hr) #arc1 and arc2 are lat and lon respectively
arcCoord = "%f,%f,0\n"%(arc2,arc1)
arcstr+=arcCoord
lbearing+=1 #count
#attach the last remaining point which is the end point at the right bearing
arc1,arc2 = getEndpoint(lat1,lon1,rbearing,hr) #arc1 and arc2 are lat and lon respectively
arcCoord = "%f,%f,0\n"%(arc2,arc1)
arcstr+=arcCoord
return arcstr
这张图片上的已知点:
假设我正确解释了您的描述和图片,这里是必要的几何图形。下图(和)显示了我们需要求解θ的变量的图片 现在,数学。这利用了/定律 余弦定律告诉我们: 所以我们必须解h,g,f,然后取结果的反余弦得到θ 根据正弦定律 我们可以用余弦定律立即求解a: 为了求线段x_1和x_2的长度,我们需要角度θu 1,2,3 利用这些角度和更多的正弦定律,我们得到x_1和x_2 把这些都放在一起,你就会
只需在替换正确的值后处理这个混乱,该值取决于您对d(或DIST)的选择。我不想费心在这里写了。我投票结束这个问题,因为它实际上不是一个编程问题
arc3=drawArc(latitude,longitude,leBearing,reBearing,arc3hr)
arc2=drawArc(latitude,longitude,leBearing-(SOME FORMULA TO GIVE ME THE EXTRA ANGLE/BEARING TO INTERSECT WITH THE OUTER LINE),reBearing+(SAME FORMULA HERE),arc2hr)
arc1=drawArc(latitude,longitude,leBearing-(SOME FORMULA TO GIVE ME THE EXTRA ANGLE/BEARING TO INTERSECT WITH THE OUTER LINE),reBearing+(SAME FORMULA HERE),arc1hr)