How can I apply Newton's method with boundaries?

313 Views Asked by At

I am trying to use Newton's method to minimize the distance between a line segment and a bezier curve. The distance function $f(x, t)$ that I'm minimizing is only defined for $x_1 \le x \le x_2$ and $0 \le t \le 1$ (where $x1$ and $x2$ are the x-coordinates of the line segment's endpoints).

What is the best way to go about this? Is Newton's method the wrong approach for this scenario?

Thanks!

1

There are 1 best solutions below

0
On

Newton's method is part of the solution. But, to use Newton's method, you typically solve an equation that tells you where the line joining the two curves is is normal to both of them. If the minimum happens to occur at an end-point, this "normal" condition will not be satisfied. So, you have to explicitly check distances at the end-points of the two curves, also.