Re: [help-3dldf] Fwd: Re: button-hole problem

"Laurence Finston" <[email protected]> Sun, 24 Apr 2005 22:08:20 +0200
Newsgroups gmane.comp.tex.metafont
Message-ID <[email protected]>
> Take, for example, two parallel triangles.
>=20
>                   A    B
>                   /\  /\
>                  /  \/  \
>                 /   /\   \
>                /  C/__\___\D
>               /________\
>              E          F
>=20
> If AEF is in front of BCD, then
>=20
>                   A    B
>                   /\  /\
>                  /  \/g \
>                 /    \   \
>                /      \h__\D
>               /________\
>              E          F
>=20
> the plan containing A, F and Focus::position has cut BCD in two parts.
> Cgh is occluded and BghD is not.

Thanks for the explanation.  The case I'm having difficulty with is where=
 the
triangles lie in a plane parallel to the x-z plane, the line Focus::posit=
ion
-- Focus::direction also lies in a plane parallel to the x-z plane, and t=
he
triangles as seen from above look something like this, but rotated about =
 plus
or minus 75=B0:

______
|           /|
|          / |=20
|         /  |
|  A   /   |
|      / B |
|     /      |
|    /       |
I   /        |     =20
|  /         |
|/_____|

I've implemented routines for "self-decomposition" of polygons, but I'm a=
fraid
that no matter how many pieces I break them into, simply sorting by their
max-z, min-z, or mean-z values will fail for some of them.  I may try
projecting a ray from Focus::position through each of the vertices and te=
sting
the distance from Focus::position to the first intersection point of each=
 of
the polygons.  I think this will work for convex polygons.
I don't know what to do about conic sections yet.

Thanks.

Laurence