Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Line circle intersection

807605Oct 3 2007 — edited Oct 3 2007
Could you please help me with the following?

I want to write a method that can return the two points of intersection between a circle and a line.
The equation of a circle is: (x - a)^2 + (y -b)^2 = r^2 (a,b) are the coordinates of the center of the circle, r the radius
The equation of a line (made by the two points) is: y = m*x + c;

The methode:

public Point[] getIntersection(Circle circle, Point p1, Point p2)
{


}

thank you in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 31 2007
Added on Oct 3 2007
2 comments
185 views