POV-Ray : Newsgroups : povray.general : Question for the Gurus : Re: Question for the Gurus Server Time
12 Aug 2024 17:20:24 EDT (-0400)
  Re: Question for the Gurus  
From: Spider
Date: 30 Jan 1999 21:06:19
Message: <36B3B97F.CAC1547A@bahnhof.se>
Another one in the same style
Here I'll declare some objects(This is untested, but I've had bad experiences with
this)

try :
#declare Sphere1 =
union {
  #local N = 50;
  #while(N>0)
    #local N = N -1;
    sphere { <0,0,N>,.4 }
  #end 
}
#declare Sphere2 =
union {
  #local N = 50;
  #while(N>0)
    #local N = N -1;
    object { Sphere1 translate <N,0,0> }
  #end 
}

#declare Sphere3 =
union {
  #local N = 50;
  #while(N>0)
    #local N = N -1;
    object { Sphere2 translate <0,N,0> }
  #end 
  pigment { colour rgb <1,0,0> }
}

This results in several Black spheres, why ?

As I said, I'm not very sure of this case, but others I've met are like that, that
several
unions withing eachother doesn't get a texture added.. 

//Spider


Ken wrote:
> 
> If I have an object constructed using a CSG operation I get
> two different results in the rendered object if I apply the
> pigment and interior properties to the different pieces
> versus the CSG as a single object ( see example ).
> The difference is quite visible.
> 
> Why ?
> 
>  intersection{
>    cylinder{x*-3,x*3,1
>     pigment{rgbf<1,.7,.7,1>}
>      interior{ior 1.95}
>   }
> 
>   plane{-z,-0
>    pigment{rgbf<1,.7,.7,1>}
>     interior{ior 1.95}
>   }
>  }
> 
> vs.
> 
>  intersection{
> 
>  cylinder{x*-3,x*3,1}
> 
>  plane{-z,-0}
> 
>   pigment{rgbf<1,.7,.7,1>}
>    interior{ior 1.95}
>  }
> 
> --
> Ken Tyler
> 
> tyl### [at] pacbellnet


Post a reply to this message

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