|
![](/i/fill.gif) |
"TheMightyZog" <Chr### [at] HotPOP com> wrote:
> Hi,
>
> This is a fantastic program and I'm really enjoying getting to grips with
> ray tracing.
>
> I've searched and can't find out how to colour the inside surface
> differently from the outside surface of an object.
>
> The following is a U shaped pipe and I would like the inside to be White and
> the outside Yellow. How can I do it?
>
> Thanks
> Zog
> ------------
> #include "colors.inc"
> background { color White }
>
> light_source { < -100, 100, -100 > color White}
> light_source { < 0, 0, -100 > color Red}
> light_source { < 100, 0, 0 > color Blue}
>
> cylinder{
> < -2, 0, 0 >, < 1, 0, 0 >,1
> clipped_by { // open length ways
> box { <-1, 0 ,-1>, <1.1 ,1, 1> inverse }
> }
> clipped_by { // cut off the end
> box { <0.99, -1.1, -1>, <1.1 ,1, 1> inverse }
> }
> pigment { color Yellow
> }
> rotate <-45, 0, 0>
> }
> sphere{ // this is the colour the inside should be
> <0, -0.1, 0>, 0.2
> pigment { color White
> }
> }
>
> camera {
> location <3, 3, -3>
> look_at <0, 0, 0>
> }
Have a look at "3.5.9 Interior Texture" for what you are asking for
specifically.
-tgq
Post a reply to this message
|
![](/i/fill.gif) |