[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnuplot-info-beta
Subject:    Re: Bug in pm3d (samples)?
From:       Hans-Bernhard Broeker <broeker () physik ! rwth-aachen ! de>
Date:       2002-08-22 16:35:42
[Download RAW message or body]

On Thu, 22 Aug 2002, Petr Mikulik wrote:

> >  Only the truly invisible fragments of it should be clipped away --- which
> > is exactly what that proposed-to-be-added function draw_polygon_hidden
> > would be doing.
> 
> What is invisible fragment? Intersections of quadrangles and triangles?

Yes.  Whenever two plotted surfaces intersect each other, their
intersections will typically run through the middle of each surface's
quadrangles or whatever patches it's made of.  If you throw away whole
quadrangles in those cases, the result is unbearably ugly -- the
intersection line will look as if some bit into both intersecting surfaces
with a very rough tool.  You end up with a wide, nasty gap in each surface
where it intersects another, unless you have very high-resolution
datasets, so the polygons are too small too see clearly.

Only by correctly determining the precise line of intersection, and
drawing the visible parts of both surfaces you get a nice looking display.

Working only with the existing vertices, you would throw away a whole
polygon even if only 1 percent or less of its area was actually hidden,
but that hidden area happening to include two of its vertices.

> Actually, these intersections don't have to be calculated, just draw all
> at-least-partially-visible polygons in z-order. 

That won't help --- z sorting alone never does, in the general case.
That's what the very old hidden3d implementation in gnuplot did (as of 3.5
original, before the pre-3.6 era), and it failed miserably.  You always
have to split polygons into visible and invisible fragments to get a
useful hidden surface removal algorithm.  A polygon is a non-pointlike
object in 3D.  Trying to determine its visibility by a single parameter
'z', however you define that, must fail.

-- 
Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.


[[[[ unsubscribe from info-gnuplot-beta via majordomo@dartmouth.edu ]]]]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic