I have used the below code with only inputs start_point
and end_point
:
import matplotlib.pyplot as plt
from matplotlib.path import Path
import matplotlib.patches as patches
start_point = (25, 50)
end_point = (50, 25)
center = (25, 25)
radius = (25
# We need to some how automatically calculate this midpoint
mid_point = (45, 45)
verts = [start_point, mid_point, end_point]
codes = [Path.MOVETO, Path.CURVE3, Path.CURVE3]#, Path.CLOSEPOLY]
path = Path(verts, codes)
shape = patches.PathPatch(path, facecolor='none', lw=0.75)
plt.gca().add_patch(shape)
plt.axis('scaled')
I get the following output
I need the following output (I created the below output using MS Paint
)
[Explanation: Converted the arc into set of points joined as straight lines. I need those set of points as list]