POV-Ray : Newsgroups : povray.newusers : Round box edge : Re: Round box edge Server Time
4 Nov 2024 19:19:24 EST (-0500)
  Re: Round box edge  
From: TinCanMan
Date: 11 Dec 2002 10:52:21
Message: <3df75f35$1@news.povray.org>
> i don't understand what coincidient surfaces are... what can be a problem
if
> you don't difference two planes?
> i guess it's about pov who don't know what surface to take while
rendering.
> the surface from box1 or box2. am i right?
>

Yes, if two surfaces ocupy the exact same plane, POV does not know which
surface to render first and often the result is a speckled unwanted result.


In the following code, the object subtracted on the right shows the
coincident surface problem, the object subtracted on the left is the
equivilant object with coincident surfaces removed. Hope this helps.

-tgq

--8<--

camera{
  up y
  right x*image_width/image_height
  angle 45
  location <0,10,-10>
  look_at  0
}

light_source{0 rgb 1 translate y*10}

background {rgb 0.5}


#declare CoincidentSurface=
union{
  box{<-2,0,-1> <2,1,1>}
  box{<-1,0,-2> <1,1,2>}
  cylinder{0 y 1 translate <1,0,1>}
  cylinder{0 y 1 translate <1,0,-1>}
  cylinder{0 y 1 translate <-1,0,1>}
  cylinder{0 y 1 translate <-1,0,-1>}
}

#declare NoCoincidentSurface=
difference{
  union{
    box{<-2,-1,-1> <2,2,1>}
    box{<-1,-1,-2> <1,2,2>}
    cylinder{<0,-1,0> <0,2,0> 1 translate <1,0,1>}
    cylinder{<0,-1,0> <0,2,0> 1 translate <1,0,-1>}
    cylinder{<0,-1,0> <0,2,0> 1 translate <-1,0,1>}
    cylinder{<0,-1,0> <0,2,0> 1 translate <-1,0,-1>}
  }
  plane{y, 0}
  plane{-y, -1}
}

difference{
  box{<-6,-1,-3><6,0.9,3>pigment{rgb <1,0,0>}}
  object{CoincidentSurface translate <3,0,0>}
  object{NoCoincidentSurface translate <-3,0,0>}
  pigment{rgb <1,0,0>}
}

--8<--


Post a reply to this message

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