POV-Ray : Newsgroups : povray.advanced-users : Re: What is the frontside of a triangle? : Re: What is the frontside of a triangle? Server Time
29 Jul 2024 00:34:23 EDT (-0400)
  Re: What is the frontside of a triangle?  
From: Shay
Date: 8 Jul 2003 15:19:10
Message: <3f0b192e@news.povray.org>
"Jaap Frank" <jjf### [at] xs4allnl> wrote in message
news:3f0b1343$1@news.povray.org...
|
| I'm afraid this isn't correct for meshes too.

I'm not making this up.
Cut and paste this code:

camera {location <0,0,-5>  look_at <0,0,0>}

#local P1a = <-2,0,0>;
#local P2a = <0,0,0>;
#local P3a = <-1,1,0>;

#local P1b = P1a+<2,0,0>;
#local P2b = P2a+<2,0,0>;
#local P3b = P3a+<2,0,0>;

#local OuTex = texture{pigment{rgb <1,0,0>}finish{ambient 1}}
#local InTex = texture{pigment{rgb <0,1,0>}finish{ambient 1}}

union { // ignores point order
  triangle {P1a, P2a, P3a}
  triangle {P1b, P3b, P2b}
  texture{OuTex} interior_texture{InTex}
  translate <0,1,0>
}

mesh { // uses point order
  triangle {P1a, P2a, P3a}
  triangle {P1b, P3b, P2b}
  texture{OuTex} interior_texture{InTex}
  translate <0,-1,0>
}

 -Shay


Post a reply to this message

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