[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[help-3dldf] straight line hiding by convex planar polygons

From: L. Nobre G.
Subject: [help-3dldf] straight line hiding by convex planar polygons
Date: Wed, 23 Feb 2005 18:57:08 +0000 (WET)

On Mon, 31 Jan 2005, Laurence Finston wrote:

> Incidentally, I'd be quite interested to know how you do surface hiding
> in FEATPOST, if you'd care to explain.

Suppose you have a set of possibly intersecting convex planar polygons in
3D-space. You want to draw them as you see them from a given point in
space, say point F. You need to calculate the locations of the
intersections. Let's assume that it is sufficient to know the points where
the sides of polygons intersect with their surfaces (it is not needed to
know the lines where each pair of polygons may intersect). This is the
same as solving simultaneously an equation of a straight line and an
equation of a plan which is "easy" to do with MetaPost (if there is a
"finite" solution). Now, complications arise because:
(i) the intersection point may be outside the polygon;
(ii) the intersection point may be outside the limits of the given side;
(iii) each side may intersect several polygons;
(iv) one has to consider not only the polygon's plan but also each plan
defined by each side of the polygon and point F;

So, coarsely, you have to calculate intersections, ignore the invalid
ones (the outsiders), sort the remaining intersections on the length of
each side and, for each side, check each piece's visibility.


Lu\'{\i}s Nobre Gon\c{c}alves -

reply via email to

[Prev in Thread] Current Thread [Next in Thread]