http://mathworld.wolfram.com/Circle-LineIntersection.html This is a very accurate equation the traditional method of solving by quadriatic equation does not work . It provides very ambiguoys values. But this one worked as I programmed it in C ++. Please help me with how this was derived.
I shall be highly grateful to whosoever is ready to guide me on this.
This is not a general mathematics help site. In the future, please send mathematics questions to places set up to handle them.
The http://mathworld.wolfram.com/ web pages have a Contact the MathWorld Team link, usually at the bottom of the page.
The reference in the web page you listed,
Rhoad, R.; Milauskas, G.; and Whipple, R., Geometry for Enjoyment and Challenge, rev. ed. Evanston, IL: McDougal, Littell & Company, 1984,
or similar geometry text, is probably available in a library.
I apologize for my response. I will refrain from attempting to answer mathematical questions on this site in the future.
A vector geometry approach may be helpful.
Let C be the circle center, r its radius.
Let P be a point on the line v, a unit vector in the direction of the line.
First, project C onto the line giving point Q
l = (C - P).v, Q = P + l v**.
Then compute the distance of C from the line
d = ||(C - Q)||
If this distance d = r, then Q is the tangent point.
If this distance d > r, then there are no real intersection points.
Else, the distance of the intersection points from Q are found using Pythagoras.
b = sqrt(r^2 - d^2)
then the two intersection points are given by:
ip1 = Q + b v, ip2 = Q - b v.
Do you have an example of whatever you are claiming "does not work" (or what you mean by ambiguous values)? What is the "this" whose derivation you are asking about?
As currently posed, there is not a viable Wolfram Technologies related question in here, at least that I can discern.