POV-Ray : Newsgroups : povray.binaries.images : CSG merge/union test : Re: CSG merge/union test Server Time
2 Nov 2024 16:12:16 EDT (-0400)
  Re: CSG merge/union test  
From: clipka
Date: 12 Jun 2010 13:17:02
Message: <4c13c10e$1@news.povray.org>
Am 12.06.2010 17:33, schrieb StephenS:

> Why is there a difference between a union and merge in this scene?

Essentially, POV-Ray's "merge" works by ignoring all intersections that 
lie inside other CSG members.

Note that this applies to /all/ intersections, including the very first 
one. So in case of coincident surfaces, it all boils down to whether 
POV-Ray considers the surface of an object to be part of its inside: In 
that case, any intersection point on the coincident surface with member 
A is considered "inside" member B and vice versa, so both intersection 
points are discarded. Add the problem of precision to this, and you know 
that you're generally screwed.

For some objects - e.g. cylinders - there's good news: The algorithm to 
find an intersection point and the algorithm to test whether a point is 
inside go together pretty well, so that the surface of a cylinder seems 
to /always/ be considered "outside" the cylinder.

The bad news is that when differencing away a cylinder from some other 
object, the surface of the cut-away cylinder is /always/ considered 
"outside" the cylinder, and thus "inside" the resulting CSG object. Have 
two such CSG difference objects with coinciding surfaces, and you get 
the aforementioned problem that the surface of A is considered inside B 
and vice versa, and therefore to be discarded in a merge.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.