
Elegent 2D arc plotting given 2 points and arc angle
Posted:
Feb 27, 2013 8:33 AM


Hello,
Does anyone have an elegent method of plotting a 2D arc given two points at either end, and the angle swept out by the arc?
e.g.
p0 = [0,0]; p1 = [0,1]; theta= 2*pi;
line( [p0(1), p1(1)] , [p0(2), p1(2)] ); hold on; plotarc(p0,p1,theta) hold off;
would draw a semicricle, and
p0 = [0,0]; p1 = [0,1]; theta = pi;
line( [p0(1), p1(1)] , [p0(2), p1(2)] ) hold on plotarc(p0,p1,angle) hold off
would draw a segment of a circle the boundaries of which are a circular arc of a circle with central angle pi radians and the chord created by the line.
Hope this will pique someone's interest!

