POV-Ray : Newsgroups : povray.general : Broken "difference"? Server Time
16 Nov 2024 11:17:14 EST (-0500)
  Broken "difference"? (Message 1 to 3 of 3)  
From: NerveGas
Subject: Broken "difference"?
Date: 28 Aug 1998 17:13:31
Message: <35E70F95.6AA9@see_signature.com>
I'm trying to take the difference of two objects in Povray 3.02 for
win32, and it just seems broken.

  Here's a simple example:

-------------
difference{
           box{<-5.5,2.5,Thickness>,<-3.0,-4,0>
               pigment {color Silver}
               rotate 30*-z
               }
           box{
               <-4.5,1.5,Thickness>,<0,-1.5,0>
               pigment {color Silver}
               }

         }
------------------
  Union and merge both work as documented, but when I try a difference,
I will get the entirety of one object, and nothing of the other, even
though they do intersect.  Is it borken, or is there something that I
just don't understand?

steve

-- 

----------------------------------------
Domain name for replying is "inconnect".
----------------------------------------


Post a reply to this message

From: Ron Parker
Subject: Re: Broken "difference"?
Date: 28 Aug 1998 17:48:32
Message: <35e717a0.0@news.povray.org>
On Fri, 28 Aug 1998 14:14:13 -0600, NerveGas 
        <Ner### [at] see_signaturecom> wrote:
>  Union and merge both work as documented, but when I try a difference,
>I will get the entirety of one object, and nothing of the other, even
>though they do intersect.  Is it borken, or is there something that I
>just don't understand?

A little of both. Your boxes occupy the same space at the same time (the
"coincident surfaces" problem.)  POV traditionally has a hard time figuring
out what you want to do when this happens, because it needs to know which 
faces are "inside" the other box and which aren't, but one on the surface is
technically neither inside nor outside.  Try this:

difference{
           box{<-5.5,2.5,Thickness>,<-3.0,-4,0>
               pigment {color Silver}
               rotate 30*-z
               }
           box{
               <-4.5,1.5,Thickness+.001>,<0,-1.5,-.001>
               pigment {color Silver}
               }

         }


Post a reply to this message

From: K  Tyler
Subject: Re: Broken "difference"?
Date: 28 Aug 1998 17:49:11
Message: <35E70955.C4364D9@pacbell.net>
NerveGas wrote:

> I'm trying to take the difference of two objects in Povray 3.02 for
> win32, and it just seems broken.
>
>   Here's a simple example:
>
> -------------
> difference{
>  box{<-5.5,2.5,Thickness>,<-3.0,-4,0> pigment {color Silver} rotate 30*-z }
>  box{<-4.5,1.5,Thickness>,<0,-1.5,0>  pigment {color Silver}}}
> ------------------
>   Union and merge both work as documented, but when I try a difference,
> I will get the entirety of one object, and nothing of the other, even
> though they do intersect.  Is it borken, or is there something that I
> just don't understand?
>
> steve

It took me a couple of minutes to notice it but I think
I see your problem. The first box is not built at xyz*0.
Then a rotation has been applied to it. It's no longer where
you expect it to be and the 2 boxes are not touching.

I haven't tested this theory and I may be full of ____
but it seems plausible.

K.Tyler


Post a reply to this message

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