POV-Ray : Newsgroups : povray.advanced-users : Mesh transparancy : Mesh transparancy Server Time
29 Jul 2024 08:24:53 EDT (-0400)
  Mesh transparancy  
From: shahrokh
Date: 18 Sep 2002 00:45:04
Message: <web.3d8803c3dd85c78cfe5a7c470@news.povray.org>
Hi,

Look at this example bellow. It is a solid made of several cubes, each built
of triangles using mesh. As you see the object is colored in transparent so
one can see inside. However, the faces of every single element is there,
and visible.
Can somebody tell how to get rid of those faces inside, the same way you
could do using merge when you combine two objects like a box and a cylinder
?
Somebody told me to use mesh2 .... but I don't see how. Are there a simple
example to do so ?

Thaks.
Shahrokh



background {rgb <1,1,1>}

light_source { <10,20,5> color rgb <1,1,1>}

camera{angle 60 location <0.5,0.5,0.5>look_at <0,0,0> sky   <0,0,1>}

global_settings { ambient_light rgb <1,1,1> }

#declare Texture01 = texture {pigment { color rgbt<1, 0.38, 0.12, 0.7> } }

#declare S1     = <-0.1000E+01 , -0.1000E+01 , -0.1000E+01>;
#declare S2     = <-0.1000E+01 , -0.7500E+00 , -0.1000E+01>;
#declare S3     = <-0.1000E+01 , -0.5000E+00 , -0.1000E+01>;
#declare S4     = <-0.1000E+01 , -0.2500E+00 , -0.1000E+01>;
#declare S5     = <-0.1000E+01 , -0.5551E-16 , -0.1000E+01>;
#declare S6     = <-0.1000E+01 ,  0.2500E+00 , -0.1000E+01>;
#declare S25    = <-0.8333E+00 , -0.1000E+01 , -0.1000E+01>;
#declare S26    = <-0.8333E+00 , -0.7500E+00 , -0.1000E+01>;
#declare S27    = <-0.8333E+00 , -0.5000E+00 , -0.1000E+01>;
#declare S28    = <-0.8333E+00 , -0.2500E+00 , -0.1000E+01>;
#declare S29    = <-0.8333E+00 ,  0.1247E-16 , -0.1000E+01>;
#declare S30    = <-0.8333E+00 ,  0.2500E+00 , -0.1000E+01>;
#declare S1825  = < 0.1100E+02 , -0.1000E+01 , -0.1000E+01>;
#declare S1826  = <-0.1000E+01 , -0.1000E+01 ,  0.0000E+00>;
#declare S1827  = <-0.1000E+01 , -0.7500E+00 ,  0.0000E+00>;
#declare S1828  = <-0.1000E+01 , -0.5000E+00 ,  0.0000E+00>;
#declare S1829  = <-0.1000E+01 , -0.2500E+00 ,  0.0000E+00>;
#declare S1830  = <-0.1000E+01 , -0.5551E-16 ,  0.0000E+00>;
#declare S1831  = <-0.1000E+01 ,  0.2500E+00 ,  0.0000E+00>;
#declare S1850  = <-0.8333E+00 , -0.1000E+01 ,  0.0000E+00>;
#declare S1851  = <-0.8333E+00 , -0.7500E+00 ,  0.0000E+00>;
#declare S1852  = <-0.8333E+00 , -0.5000E+00 ,  0.0000E+00>;
#declare S1853  = <-0.8333E+00 , -0.2500E+00 ,  0.0000E+00>;
#declare S1854  = <-0.8333E+00 ,  0.1247E-16 ,  0.0000E+00>;
#declare S1855  = <-0.8333E+00 ,  0.2500E+00 ,  0.0000E+00>;

#macro Irreg_Cube(P1, P2, P3, P4, P5, P6, P7, P8)
triangle { P2, P4, P3 }  triangle { P1, P4, P2 }
triangle { P1, P5, P4 }  triangle { P5, P8, P4 }
triangle { P5, P7, P8 }  triangle { P5, P6, P7 }
triangle { P7, P6, P2 }  triangle { P2, P3, P7 }
triangle { P3, P8, P7 }  triangle { P3, P4, P8 }
triangle { P1, P6, P5 }  triangle { P1, P2, P6 }
#end


mesh {
  Irreg_Cube(S1    ,S2    ,S26   ,S25   ,S1826 ,S1827 ,S1851 ,S1850 )
  Irreg_Cube(S2    ,S3    ,S27   ,S26   ,S1827 ,S1828 ,S1852 ,S1851 )
  Irreg_Cube(S3    ,S4    ,S28   ,S27   ,S1828 ,S1829 ,S1853 ,S1852 )
  Irreg_Cube(S4    ,S5    ,S29   ,S28   ,S1829 ,S1830 ,S1854 ,S1853 )
  Irreg_Cube(S5    ,S6    ,S30   ,S29   ,S1830 ,S1831 ,S1855 ,S1854 )
   texture { Texture01 }  }


Post a reply to this message

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