Original Post
I happened across the following paper,
http://portal.acm.org/citation.cfm?id=49155.49157
In the paper, they describe another parametrization for the circle which transitions smoothly between radius=0 and radius=infinity and gives robust results with no degeneracies.
The circle is represented by
a(p.p) + b.p + c = 0
where the parameters are scalars a,b and a 2-vector b. p is a point on the circle. Given this parameterization, I can substitute in the homogeneous line and I get a quadratic equation to find both solutions. Nice.
According to the paper, the center q is given by
q = -b/(2a)
and the radius is given by
r = +sqrt(b.b - 4ac)/(2a)
When |r|>1, they find parameters as follows ( r<1 omitted here for brevity),
a = 1/(2r)
b = -q/r
c = (q.q - r^2)/(2r)
I should note that the published equation is b = q/r, which I changed by adding a negative sign otherwise it is inconsistent. Another way to remove the inconsistency is to make q = b/(2a) -- I don't think it makes a difference.
The only problem is that the simultaneous solutions to both equations aren't the proper intersection points. After some investigation I've realized that the problem is in the circle parameterization. It doesn't evaluate to zero for points on the circle!
I'm wondering if somebody can shed some light on the "logic" behind the above circle parameterization, which will elucidate why it's not working.
Thanks
http://portal.acm.org/citation.cfm?id=49155.49157
In the paper, they describe another parametrization for the circle which transitions smoothly between radius=0 and radius=infinity and gives robust results with no degeneracies.
The circle is represented by
a(p.p) + b.p + c = 0
where the parameters are scalars a,b and a 2-vector b. p is a point on the circle. Given this parameterization, I can substitute in the homogeneous line and I get a quadratic equation to find both solutions. Nice.
According to the paper, the center q is given by
q = -b/(2a)
and the radius is given by
r = +sqrt(b.b - 4ac)/(2a)
When |r|>1, they find parameters as follows ( r<1 omitted here for brevity),
a = 1/(2r)
b = -q/r
c = (q.q - r^2)/(2r)
I should note that the published equation is b = q/r, which I changed by adding a negative sign otherwise it is inconsistent. Another way to remove the inconsistency is to make q = b/(2a) -- I don't think it makes a difference.
The only problem is that the simultaneous solutions to both equations aren't the proper intersection points. After some investigation I've realized that the problem is in the circle parameterization. It doesn't evaluate to zero for points on the circle!
I'm wondering if somebody can shed some light on the "logic" behind the above circle parameterization, which will elucidate why it's not working.
Thanks