POV-Ray : Newsgroups : povray.newusers : Applying a Border to a "triangle" : Re: Applying a Border to a "triangle" Server Time
28 Jul 2024 16:16:15 EDT (-0400)
  Re: Applying a Border to a "triangle"  
From: Catseye
Date: 7 Jun 2008 16:31:18
Message: <484af016$1@news.povray.org>
Perfect! - that's cool!

Thanks for sharing the example.

Jim

"Chris B" <nom### [at] nomailcom> wrote in message 
news:484aa734@news.povray.org...
>
> "Catseye" <jpf### [at] comcastnet> wrote in message 
> news:484a89cb$1@news.povray.org...
>> If I comprehend what you are saying about the method to color the edge 
>> (90 degrees from the face) of a solid triangle; however that's not what I 
>> need. If possible I need to be able to generate a border around the 
>> triangle face (visible looking at the face the face).
>>
>
> No that's not it. Using an object as a pigment colours everything outside 
> the conceptual 'object' one colour and everything inside the conceptual 
> 'object' another colour. When such a pigment is applied to a surface you 
> see the outline of the section of the shape as the real object 'cuts 
> through' the pattern. In this case, if we slice the pattern at right 
> angles we get a yellow triangle with a red border. Here's a complete 
> example using the triangle object.
>
> camera {location <0,2,-0.01> look_at 0}
> light_source {   <-4,75 ,-10   >, rgb 1}
>
> #declare PlaneIntersectionObject =  intersection {
>  plane {z,0.2}
>  plane {z,0.2 rotate 120*y}
>  plane {z,0.2 rotate 240*y}
> }
>
> triangle {
>  <0,0,-2*0.3>, vrotate(<0,0,-2*0.3>,y*120), vrotate(<0,0,-2*0.3>,y*240)
>  pigment {
>    object {
>      PlaneIntersectionObject
>      color rgb <1,0,0>  // Red Border
>      color rgb <1,1,0>  // Yellow Triangle
>    }
>  }
> }
>


Post a reply to this message

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