寻找移动起点后绘制圆弧的公式
Finding a formula for drawing an Arc after moving the starting point
我正在尝试编写一个公式来计算绘制圆弧时的新角度。如果我用图说明就更好了
上面是我在 google 地球上画的图片。
目前我有一个函数可以在给定 (x,y) 轴心点、方位角和半径距离的情况下绘制圆弧
在图上画完这条弧线(离原点最远的弧线)后,我需要移动原点,例如。如果方位角为 170 度,则左侧线将从 170-90 开始,右侧线将从 170+90
开始
我无法找出较小同心圆中的角度(或方位角)的公式。我想提前感谢任何人提供的任何帮助。
这是我计算和绘制圆弧的公式
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
要绘制三个圆弧,这里是调用函数的地方:
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)
这张图片的已知点:
原点在lat/lon
每条线的距离和方位
原点内圆半径为 10 海里,外圆为 20 海里
这是一张简化的图片,我相信角度 theta 就是我要找的东西
我正在尝试编写一个公式来计算绘制圆弧时的新角度。如果我用图说明就更好了
上面是我在 google 地球上画的图片。
目前我有一个函数可以在给定 (x,y) 轴心点、方位角和半径距离的情况下绘制圆弧
在图上画完这条弧线(离原点最远的弧线)后,我需要移动原点,例如。如果方位角为 170 度,则左侧线将从 170-90 开始,右侧线将从 170+90
开始我无法找出较小同心圆中的角度(或方位角)的公式。我想提前感谢任何人提供的任何帮助。
这是我计算和绘制圆弧的公式
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
要绘制三个圆弧,这里是调用函数的地方:
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)
这张图片的已知点:
原点在lat/lon
每条线的距离和方位
原点内圆半径为 10 海里,外圆为 20 海里
这是一张简化的图片,我相信角度 theta 就是我要找的东西