Clear Filters
Clear Filters

how can i plot a circle intersect with a line

2 views (last 30 days)
i want to write a program that can help to plot a circle intersect with a line
  3 Comments
amro faira
amro faira on 25 Apr 2015
xc=6
xc =
6
yc=5
yc =
5
r=2
r =
2
theta=90
theta =
90
and for the line
xo=6
xo =
6
yo=7
yo =
7
xf=4
xf =
4
yf=8
yf =
8
amro faira
amro faira on 25 Apr 2015
i already have the parametric of circle and line i just need a formula to insert the input to plot the intersect or what should i do
for t=0:0.001:1 x(i,1)=xo+(xf-xo)*t; y(i,1)=yo+(yf-xo)*t; i=i+1; ---------------------------------------- for theta = 0:pi/100:2*pi i = i+1; x(i) =xc+r*cos(theta);
y(i) = yc+r*sin(theta);

Sign in to comment.

Accepted Answer

Stalin Samuel
Stalin Samuel on 25 Apr 2015
  1 Comment
Roger Stafford
Roger Stafford on 25 Apr 2015
Edited: Roger Stafford on 25 Apr 2015
@Stalin - This function, 'circcirc', which you give as an answer, is for finding the intersections between two circles, not between a circle and a straight line! I think you meant to reference this function:
http://www.mathworks.com/help/map/ref/linecirc.html

Sign in to comment.

More Answers (0)

Categories

Find more on Vector Fields in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!