The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Elegent 2D arc plotting given 2 points and arc angle
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Richard Crozier

Posts: 117
Registered: 3/19/09
Elegent 2D arc plotting given 2 points and arc angle
Posted: Feb 27, 2013 8:33 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


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?


p0 = [0,0];
p1 = [0,1];
theta= 2*pi;

line( [p0(1), p1(1)] , [p0(2), p1(2)] );
hold on;
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
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!

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.