Mail Archives: djgpp/1999/08/10/19:30:51
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 -