|
|
I have a number of questions. I want to find the closest distance and point on
the curve to the point (x0, y0)
1. Does a second order polynomial that always passes through the origin have
its' constant c = 0 ?
2. The distance is given by r(x)=(x - x0)^2 + (ax^2+bx+c-y0)^2
Differentiating it gives Dr(x) = 2(x - x0)+2(2ax + b)(ax^2+bx+c-y0)
Finding its' roots means that I have to solve a cubic equation. I've solved it
using Maxima and posted the results as PDFs below. Problem is that I can't test
its' validity for all points outside the curve. It looks like it's working for
some samples, but others cause 'A' (see solution) to become a complex number.
Why is that ? Is it suppose to be like that?
http://home.student.uu.se/maol9883/files/equation.pdf
home.student.uu.se/maol9883/files/solution.pdf">http://home.student.uu.se/maol9883/files/solution.pdf
I'm trying arbitrary functions y = ax^2 + bx + c with arbitary points to find
the closest point between.
|
|