POV-Ray : Newsgroups : povray.newusers : Newbie - inside/outside colours : Re: Newbie - inside/outside colours Server Time
28 Jul 2024 22:16:25 EDT (-0400)
  Re: Newbie - inside/outside colours  
From: Trevor G Quayle
Date: 5 Jun 2007 10:20:01
Message: <web.466570706feb66cec150d4c10@news.povray.org>
"TheMightyZog" <Chr### [at] HotPOPcom> 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

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