

Am 18.08.2016 um 18:13 schrieb clipka:
> As for the union of individual triangles, I'm still working on that one;
> I must confess that so far I don't really have a clue where things go wrong.
Yikes!
I've found the culprit.
You see, after parsing the triangle vertices, POVRay invokes a piece of
code that precomputes certain values for the triangle that will be
required in each and every intersection test.
That code first computes the surface normal from the vertices, as well
as the distance between the coordinate origin and the plane in which the
triangle lies.
The code then goes on to enforce a certain ordering of vertices that
allows for certain shortcuts in intersection testing. You may note that
this shouldn't be a problem for the interior/exterior texture test,
since the surface normal has already been computed at this point.
It /does/ become a problem, however, as soon as you invoke any
transformation on the triangle  because such an operation changes the
position of the vertices, and therefore requires a recomputation of the
precomputed stuff.
And this time the precomputation will operate on potentially rearranged
vertices.
As I said: Yikes!
Post a reply to this message

