SV: [metapost] Questions sur 3d

Peter Vanroose <[email protected]> Thu, 23 Jun 2005 18:46:04 +0200 (CEST)
Newsgroups gmane.comp.tex.metafont
Message-ID <[email protected]>
> 3) Dans le fichier joint, j'ai une erreur que je n'arrive pas =E0 lever
> malgr=E9 des heures de recherche :  je souhaite d=E9terminer sur la
droite =20
> (1,16)  l'intersection visuelle avec  la droite (14,6).  L'abscisse =20
> calcul=E9e (xval) de cette  intersection me donne un nombre n=E9gatif, =
ce

> qui est pratiquement impossible.
> ...
> set_point(1)(1,1,0);
> set_point(6)(1,0,-1);
> set_point(14)(1,0,0);
> set_point(16)(0,1,0);

The line (1,16) is thus the horizontal line Y=3D1,Z=3D0, parallel to the =
X
axis, and the line (14,6) is the vertical line X=3D1,Y=3D0.

These two lines do not intersect, so it is not very unexpected to see
negative values.

The points of closest approach are: (1,1,0) on line (1,16),
and (1,0,0) on line (14,6), so the minimal distance between the two
lines is 1.

If you want to have a "best matching" point that could function as a
sort of intersection point, use the point (1,0.5,0).


--	Peter.