POV-Ray : Newsgroups : povray.newusers : normals and pigments in a csg : Re: normals and pigments in a csg Server Time
5 Sep 2024 22:21:03 EDT (-0400)
  Re: normals and pigments in a csg  
From: Daniel Pirch
Date: 19 Jul 1999 03:30:21
Message: <3792d40d@news.povray.org>
But if the objects are part of other transplated CSGs?

#declare spheres = union{
  sphere{ -2*x, 1 pigment{ rgb<1,0,0>}}
  sphere{0, 1 pigment{rgb <0,1,0>}}
  sphere{ 2*x,1 pigment{ rgb<0,0,1>}}
}
union{
  object{spheres translate 2*z}
  object{spheres}
  object{spheres translate -2*z}
  normal{Norm}
}

Ken <tyl### [at] pacbellnet> wrote in message
news:379291CD.8C1026CE@pacbell.net...
>
>
> Remco de Korte wrote:
>
> > I'm sorry but this won't work (or I am getting real perception
problems).
> > I've had this problem more then once. If you stick a pigment on a part
of a csg
> > (or blob) the normal or finish you use for the whole object doesn't
apply there.
>
> If at first you don't succeed... you use the other workable solution. This
> following example clearly shows that you can maintain even distribution of
> a normal pattern for each object in the csg operation and it looks kool
too !
>
>   camera {location<0,0,-5>look_at 0}
>   light_source {<0,0,-20> rgb 1}
>
>   #declare Norm = normal { gradient x+y 1 rotate 45*x+y scale .5 frequency
2}
>
>   union {
>  sphere { 0, 1 pigment { rgb<1,0,0> } translate<-1, 0,0>normal {Norm} }
>  sphere { 0, 1 pigment { rgb<1,1,0> } translate< 1, 0,0>normal {Norm} }
>  sphere { 0, 1 pigment { rgb<0,1,0> } translate< 0,-1,0>normal {Norm} }
>  sphere { 0, 1 pigment { rgb<0,0,1> } translate< 0, 1,0>normal {Norm} }
>         }
>
> --
> Ken Tyler
>
> mailto://tylereng@pacbell.net
> http://home.pacbell.net/tylereng/links.htm

--
Daniel Pirch
nap### [at] linuxzrztu-berlinde


Post a reply to this message

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