|
From: Hans-Bernhard B. <HBB...@t-...> - 2009-02-02 21:17:57
|
Petr Mikulik wrote: > I was wondering which point(s) of the rectangle is/are used for the depth > ordering. It may seem like this should be an important detail. But it's not. It's completely irrelevant which number you sort by. It just moves the problem into different regions, but does nothing at all to solve it. The heart of the matter is that depth sorting does not work. It's quite easy to prove by counter-example. You have to do more than just sort polygons to get a correct rendering. The sort itself can't be done by comparing a single "characteristic" number. You have to compare entire polygons, using basically all their geometric data. And sometimes the answer still is "undecidable", in which case you have to split one of them. For the gory details, look up the Newell-Newell-Sancha algorithm, or consult the literature on BSP trees and their usage to do hidden-surface removal. |