Click here to Skip to main content
15,896,526 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have following formulas to find intersect points of Line and Circle

x = {-B + sqrt[((B^2) - 4AC)]} / 2A

where B = 2mc
A = 1 + m^2
C = c^2 - r^2

m means slop
c means Constant of line formula

after finding x I find value of y by putting x in (y = mx + c)
but what we have to do when slop is infinite (means vertical line)
?
Posted
Updated 4-Oct-10 0:34am
v2

1 solution

A vertical line as equation
x = K

where K is a const.
Hence, you've to solve the original equation for y, namely:
(K-a)^2 + (y-b)^2 = r^2


That is, again, just a quadratic equation.
:)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900