Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

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: 111
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

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!



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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.