Plotting points on a halfcircle, given diameter and facing direction.

229 Views Asked by At

I know the coordinates of point $1$ and $2$ and some radius $r$ at a halfcircle with centerpoint point $1$, with the gap of the halfcircle pointing towards point $2$. How do I compute the (lets say $10$) points that the halfcircle contains of? Also how do I compute the intersecting point between a line segment following the halfcircle and a line segment lying horizontally towards point $1$, at point $2$.

(radius $r$, ($x1,y1$), ($x2,y2$) are known)

See below for an example

radius r, (x1,y1), (x2,y2) are known

2

There are 2 best solutions below

0
On BEST ANSWER

A polar coordinate system could be combined with the slope formula and the distance formula. Or use a land surveying system:

Point 2 to Point 1 is InvTan((x1 - x2) / (y1 - y2)) .

Then for a direction in a four-quadrant system, if (x1 - x2) is positive that is East else West. And if (y1 - y2) is positive then that is North else South.

Then determine the forward direction 90 degrees off the calculated direction at Point 1 and forward a point at distance r.

Forward y = (Cos(ForwardDirection) * r) + y1 . Forward x = (Sin(ForwardDirection) * r) + x1 .

If the ForwardDirection is North then the value added to y1 is positive else negative if South. If the ForwardDirection is East then the value added to x1 is positive else negative if West.

0
On

Find the equation of the line $(L_1)$ joining the two given points, and find the point of intersection of the line with the circle.

To calculate the intersection point, find the line $L_d$ perpendicular to $(L_1)$ and passing through the point $(P_1)$. Find the two end points $P_3,P_4$ of the diameter of the semicircle. Make lines $L_3,L_4$ through them parallel to $L_1$.

Find the line through $P_2$ parallel to $L_d$. intersection of $L_d$ with $L_3$ and $L_4$ are the required points.