POV-Ray : Newsgroups : povray.general : Need help generating a cylindrical solid : Re: Need help generating a cylindrical solid Server Time
29 Jul 2024 06:16:58 EDT (-0400)
  Re: Need help generating a cylindrical solid  
From: Le Forgeron
Date: 28 Aug 2012 10:55:42
Message: <503cdbee@news.povray.org>
Le 28/08/2012 16:39, Chaanakya a écrit :

> #declare a =
>   difference {
>     cylinder { <-1,0,0>,<1,0,0>,1.00003}
>     cylinder { <-1.00003,0,0>,<1.00003,0,0>,1}
>     plane { z,0 }
>     pigment { color Red }
>     rotate <0,90,0>
>     rotate <90,0,0>
>   }
> 
> object { a }
> 
> Now, I want to build the same figure, but piece by piece - start in the middle
> and work outwards, with each part being a different color.  I thought I could
> modify the object "a" with some more difference statements and I've made quite a
> bit of progress on this.  However, there is one sticking point:  when I render
> the following code, I get one part of the center-most piece sticking out of the
> next larger one.
> 


Keep the shape of a, change the texture for a one based on gradient and
a pigment map.

"pigment { color Red }"
becomes

pigment { gradient x pigment_map{
[0.5 color Red]
[0.5 color Blue]
}
scale ????? your factor here ????
}


Post a reply to this message

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