POV-Ray : Newsgroups : povray.advanced-users : triangle with smooth trasparency : triangle with smooth trasparency Server Time
28 Jul 2024 18:24:01 EDT (-0400)
  triangle with smooth trasparency  
From: Gianluca Massaccesi
Date: 7 Jun 2004 14:05:46
Message: <40c4ae7a@news.povray.org>
Here below there is a sample. It model a square subdivided in 8 triangles.
By assigning a texture in each vertex the trasparency should be smooth. On
the contrary you can see that each trangle has its own value, there is
discontinuity between triangles.

Could you tell me why? In my opinion it is due to the very little dimension
of the triangles. Could it be correct as I cannot increase the dimension of
triangles?

Thank you very much for your help.

**************************

camera {
    location <0,-2,1.5>
     look_at <0,98,1.5>
     up    <0,0,1>
     right -x *1.3333
     angle 20
  }

#declare texture_screen = texture {
   pigment { color rgb<1,1,1> }
   finish { ambient 0 diffuse 2 }
 }
//EndTextures

//screen

#declare dist=25 ;

#declare nAng=6;
#declare Ang=radians(5);
#declare AngMax=nAng*Ang;
#declare lScreen=dist*tan(AngMax) ;

polygon {
        4,
        <lScreen, lScreen>, <-lScreen, lScreen>, <-lScreen, -lScreen>,
<lScreen, -lScreen>
        texture { texture_screen }
        rotate <90,0,0>
        translate <0, dist, 0>
        }

light_source {<0,0,0>,rgb 0.2
spotlight
point_at <0, 100, 0>
radius 80
falloff 80
fade_distance 25
fade_power 2
}

// angH(i)=91,25// angV(j)=88,75
#declare texture_1 = texture { pigment {color rgb 0 transmit 1.5625 }}
#declare texture_2 = texture { pigment {color rgb 0 transmit 1.7656 }}
#declare texture_3 = texture { pigment {color rgb 0 transmit 1.5469 }}
#declare texture_4 = texture { pigment {color rgb 0 transmit 1.3906 }}
#declare texture_5 = texture { pigment {color rgb 0 transmit 1.5469 }}
#declare texture_6 = texture { pigment {color rgb 0 transmit 1.6562 }}
#declare texture_7 = texture { pigment {color rgb 0 transmit 1.4688 }}
#declare texture_8 = texture { pigment {color rgb 0 transmit 1.4688 }}
#declare texture_9 = texture { pigment {color rgb 0 transmit 1.6562 }}
mesh {
   triangle
{<0.0065,0.2999,-0.0065>,<0.0033,0.3,-0.0033>,<0.0065,0.2999,-0.0033>
texture_list { texture_1  texture_2  texture_6 } }
   triangle
{<0.0065,0.2999,-0.0065>,<0.0033,0.2999,-0.0065>,<0.0033,0.3,-0.0033>
texture_list { texture_1  texture_9  texture_2 } }
   triangle
{<0.0065,0.2999,-0.0065>,<0.0065,0.2999,-0.0033>,<0.0098,0.2998,-0.0033>
texture_list { texture_1  texture_6  texture_3 } }
   triangle
{<0.0065,0.2999,-0.0065>,<0.0098,0.2998,-0.0033>,<0.0098,0.2998,-0.0065>
texture_list { texture_1  texture_3  texture_7 } }
   triangle
{<0.0065,0.2999,-0.0065>,<0.0098,0.2998,-0.0065>,<0.0098,0.2997,-0.0098>
texture_list { texture_1  texture_7  texture_4 } }
   triangle
{<0.0065,0.2999,-0.0065>,<0.0098,0.2997,-0.0098>,<0.0065,0.2998,-0.0098>
texture_list { texture_1  texture_4  texture_8 } }
   triangle
{<0.0065,0.2999,-0.0065>,<0.0065,0.2998,-0.0098>,<0.0033,0.2998,-0.0098>
texture_list { texture_1  texture_8  texture_5 } }
   triangle
{<0.0065,0.2999,-0.0065>,<0.0033,0.2998,-0.0098>,<0.0033,0.2999,-0.0065>
texture_list { texture_1  texture_5  texture_9 } }
   }

*********************************************************************


Post a reply to this message

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