My situation involves having coordinates for points X
and A
, A'
,... as follows:
X [x,y]
(starting point)
A [a,b]
, A'[a',b']
, etc. (ending points)
I also have information about angles XCA
, XCA'
, etc.
However, I am struggling to find a formula that calculates arcs connecting point X with the other A-points, similar to the ones shown in the picture.
My attempts at calculating radius X and radius Y using abs(x - a)
and abs(y - b)
only seemed accurate when the angles were 90, 180, or 270 degrees.
I then tried determining the radius of an inscribed circle cutting through points X
and A
, but the resulting arc did not flow "naturally" from X to A.
Any help is greatly appreciated.
PS: The image above illustrates the desired outcome (hand-drawn). Gray lines are purely for reference.
EDIT ==========================
After some experimentation, I found that using the inscribed circle option yields decent results. However, I am unsure about when to set the large-arc-flag
as 1
versus 0
(similar issue with sweep-flag
)