POV-Ray : Newsgroups : povray.general : possible difference bug : Re: possible difference bug Server Time
4 Aug 2024 16:15:28 EDT (-0400)
  Re: possible difference bug  
From: Patrick Elliott
Date: 2 Jun 2003 18:33:34
Message: <MPG.19457e63d633cca09897ff@news.povray.org>
In article <3edb5968$1@news.povray.org>, ant### [at] spamcopnet says...
> I'd like to add I'm using povray 3.5 on a Win2000 machine.
> 
> 
> "Mario" <ant### [at] spamcopnet> wrote in message
> news:3edb5796$1@news.povray.org...
> >
> > I am doing the difference of two cubes. I expect the first cube to have a
> > hole where the second cube is. When I render the scene, the second cube is
> > visible. From what I have seen with differences, this seems like a bug.
> >
> > //scene used to create this bug:
> >
> > #include "textures.inc"
> > #include "colors.inc"
> >
> > // ----------------------------------------
> > // ############ BEGIN #####################
> > // ----------------------------------------
> >
> > camera {
> > //  location  <-6, 12, -50.05>
> > //  look_at   <-6, 12, -25.05>
> >
> > //location <5,3,-11.05>
> > //look_at <5,3,-8.05>
> > location <5,3,-0.05>
> > look_at <5,3,-11.05>
> >
> > light_source {
> >     <-6, 30, -60.05>
> >     color rgb <1, 1, 1>  // light's color
> > }
> >
> >
> > // house cube
> > difference {
> >     box {
> >         <-10, -1, -10>,  // Near lower left corner
> >         <10,15,10>       // Far upper right corner
> >
> >         texture {
> >             //MJHouse
> >             Red_Marble
> >             scale  .25
> >             rotate y*90
> >         }
> >
> >     }
> >
> >     box { <4,-1,-9.875>, <7, 4, -10.125> texture { White_Marble } }
> >
> >
> > } //end of difference
> >
> >
> >
> 
> 
> 

Umm.. It is working.. Try:

 #include "textures.inc"
 #include "colors.inc"

 // ----------------------------------------
 // ############ BEGIN #####################
 // ----------------------------------------

camera {
  location <5,3,-16.05> // **Moved camera out a little for better view.
  look_at <5,3,-8.05>
}

light_source {
    <8, 3, -20.05> // **Moved closer to get more light and place it where
                   // **it will illuminates the inside edge.
    color rgb <1, 1, 1>  // light's color
}

// house cube
difference {
    box {
        <-10, -1, -10>,  // Near lower left corner
        <10,15,10>       // Far upper right corner
        texture {
            //MJHouse
            Red_Marble
            scale  .25
            rotate y*90
        }
    }
    box { <4,-1,-9.875>, <7, 4, -10.125> texture { White_Marble } }
    rotate <0,10,0>  // **Rotated the whole thing slightly to let you see
                     // **the actual interior edge.
} //end of difference

The lines with ** I changed. The problem you are having is two fold. 
First off, you where zoomed in so close that all you could see that the 
middle of the part you cut out. Obviously this makes seeing the edges a 
bit hard. Second, the depth of the cut you are making is very shallow, so 
since you where looking straight at it, then even moving the camera 
farther back didn't show you the indention, it looked like it stuck out 
instead. And third, since you are cutting it out of a solid box, where a 
normal house would be hollow in the inside, and it was hard to see if the 
result was cut from the inside or sticking out of the cube.

Sometimes it helps a lot to change your perspective. ;) Though why ABX 
and Manual both missed this obvious way to check what it was actually 
doing.... ;) lol

-- 
void main () {

    call functional_code()
  else
    call crash_windows();
}


Post a reply to this message

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