Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualunadepipas

Posted 28 August 2013 - 08:17 AM

Hi there,

i am having so much troubles finding C++ code that tell me what is the point of intersection of a circle and a line that grows from its center.

 

I have a circle with center C and a point A  (is given by the touch of a person on the screen)

 

 

The line between C-A intersect with the circle in some place in the circle Z, i want to know how to calculate this Z(x,y) and if it possible a c++ solution will be awesome.

Has someone some useful code i can try?

SO many thanks mates

 

I have reades this web but when i translate the code i got some strange values , dunno why-

 

http://mathworld.wolfram.com/Circle-LineIntersection.html

 

As i said the only important point is the one which is isnide the circle AND is between the center C and the touch point A.


#1unadepipas

Posted 28 August 2013 - 08:14 AM

Hi there,

i am having so much troubles finding C++ code that tell me what is the point of intersection of a circle and a line that grows from its center.

 

I have a circle with center C and a point A  (is given by the touch of a person on the screen)

 

 

The line between C-A intersect with the circle in some place in the circle Z, i want to know how to calculate this Z(x,y) and if it possible a c++ solution will be awesome.

Has someone some useful code i can try?

SO many thanks mates

 

 


PARTNERS