0

Possible Duplicate:
Circle line collision detection

Can anyone suggest how to find the intersection point of line and circle.

theta=0:.01:2*pi;

x1=4*cos(theta)+4;

y1=4*sin(theta)+4;

x=[0 1 3 5 8]

y=[0 1 1 3 3]

for i=2:length(x)    

    s(i)=(y(i)-y(i-1))/(x(i)-x(i-1));

end

s

inter=y

plot([x],[y],x1,y1,'-')

axis([0 10 0 10])
Community
  • 1
  • 1
Justin Oommen
  • 13
  • 1
  • 7

0 Answers0