Closed Thread Icon

Topic awaiting preservation: Z-indexing (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8554" title="Pages that link to Topic awaiting preservation: Z-indexing (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Z-indexing <span class="small">(Page 1 of 1)</span>\

 
amikael
Bipolar (III) Inmate

From: övik
Insane since: Dec 2002

posted posted 02-26-2003 14:10

If you have the x,y and z-coordinates of a polygone-shape, what's the best way to organize the z-indexing of them?

If two shapes exists at the same z-coordinate, one might still reside 'above' according to the y-coordinate, and so, seen from above, that one should take presidence over the one existing 'below'.

Is there an existing formula that one can use for these kind of operations??


(^-^)b

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 02-26-2003 17:28

This thread, might sound off-topic, but AFAIK, Mikael is talking about his 3D engine using Javascript and VML.

Mikael: have you had a look at http://www.faqs.org/faqs/graphics/algorithms-faq/ ?
As Scott Porter told you, you have to sort your polygons according to their distance to the observer.

Then, you have to calculate the distance of each polygon to the obserer ( the origin of the camera ). One point which can be discussed, is from which point of the polygon do you check that distance ? From the middle ? the nearest point ? the average of all the points ... ?

Unless you can have a REAL Z-BUFFER, you'll have some little problems with the PAINTER algorithm ( if you don't implement the polygon cut ).

Hope that helps...

Mathieu "POÏ" HENRI

[This message has been edited by poi (edited 02-26-2003).]

« BackwardsOnwards »

Show Forum Drop Down Menu