[metapost] The strangest issues?

Daniel H. Luecking luecking at uark.edu
Thu Mar 17 23:18:18 CET 2005

On Thu, 17 Mar 2005, Giuseppe Bilotta wrote:

> and what do I get?
> (\gamma(t) - \omega(\tau)).(P1 - P0) = 0
> (\gamma(t) - \omega(\tau)).(P2 - P3) = 0
> (again) to be used in combination with (1) and (2).
> Which of these steps is wrong?

Assuming that t and \tau are differentiable functions of the lambdas,
for one. But you are also forgetting that \gamma(t) = \omega(\tau) is
another solution.

Even if differentiability is satisfied, since you've not done anything
to restrict t or \tau, \gamma(t) = \omega(\tau) is very likely for the
generic case.  Consider a fixed pair of lambdas, it is likely there will
be no pair (t,\tau) which maximizes the distance (unless the two cubics
head off to infinity in parallel) and so any pair (t,\tau) that satifies
the equations

(\gamma(t) -\omega(\tau)).\gamma'(t) = 0
(\gamma(t) -\omega(\tau)).\omega'(\tau) = 0

will be a minimum (or a saddle point). And minimums happen when the
curves cross. Minimizing over the lambdas will now likely give you the
crossing points. Of course, if \gamma is a straight line, the
alternative is that \omega is a parallel line and (P1-P0) x (P3-P2) = 0.

Dan Luecking
Dept. of Mathematical Sciences
University of Arkansas
Fayetteville, AR 72101

More information about the metapost mailing list