www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/10/19:30:51

From: broeker AT acp3bf DOT knirsch DOT de (Hans-Bernhard Broeker)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: 3d
Date: 9 Aug 1999 16:20:53 +0200
Organization: RWTH Aachen, III. physikalisches Institut B
Lines: 41
Message-ID: <7omo45$e1a@acp3bf.knirsch.de>
References: <Oulr3.110$wC DOT 3709 AT stones> <37ADE9A0 DOT 4060 AT surfsouth DOT com>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 934208457 24601 137.226.32.75 (9 Aug 1999 14:20:57 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 9 Aug 1999 14:20:57 GMT
X-Newsreader: TIN [version 1.2 PL2]
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

First of all, let me state that all of this doesn't belong in this
newsgroup. There's a special newsgroup for graphics algorithms, where
this type of questions should be asked:

	comp.graphics.algorithms

Further discussion should be taken there, please.

Chris Holmes (cholmes AT surfsouth DOT com) wrote:
> Anthony Graham wrote:
> > I've got a 3d world thing working but i don't know to draw the faces in
> > order, I've geen getting the vector that is the average (and so the center

Anthony: your 'distance from the viewpoint' is a waste of CPU cycles.
Comparing the 'z' coordinate (i.e. the one orthogonal to the viewing
plane, or 'screen') is cheaper, and does the same.

>   The Z coordinate (or depth into the screen) you should use is not the
> average or center point, but by the extreme points.  

And don't forget that for general scenes, sorting alone is *not*
enough.  Sorting by z coordinate is only a preprocessing step in the
real algorithm, where you have to care for overlaps of polygons among
each other, not just their depths. You sometimes have to split some of
the polygons (even if none of the scene polygons intersect each
other!) to resolve so-called 'cyclic overlap' of polygons.

>   So you know, "un-needed shape removal" is called HSR or Hidden Surface
> Removal.  

Not really, at least not in the sense Antony used it. What he
described is called 'culling', which happens *before* HSR, in order to
reduce the HSR workload.

> > given the 3d coords of the flat polygons is there a quick way to see if a
> > line (anywhere between 2 3d coords) goes through a 3d polygon?

See the comp.graphics.algorithms FAQ for this.
-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019