Modifié le 20 Juillet 2010 à 08 h 03

icosaedre.pov
//options: +W800 +H600 +A +P +FN
//Patrick Fradin le 19/07/2010
#include "colors.inc"
#include "stones.inc"
#include "metals.inc"

global_settings { charset utf8
                  ambient_light rgb 1.5
}

#declare theta=44;
#declare phi=4.9775;
camera{ location 12.5*<sin(theta)*sin(phi), cos(phi),-cos(theta)*sin(phi)>
        look_at <0,0,0>
        }
light_source { 10*<sin(theta)*sin(phi), cos(phi),-cos(theta)*sin(phi)> color rgb<1,1,1>}

//textures
#declare Mer = texture {
  pigment { color Green }
  normal { 
  ripples 0.2
  frequency 1000.0
  phase  1
  }
  finish { 
  ambient 0.1
  diffuse 0.2
  reflection 0.5
  specular 0.5
  }
  scale <3000, 3000, 3000>
 }

#declare Ciel = texture {
     pigment { Blue }
      finish { ambient 1 diffuse 0.2}
     }
     texture {
       pigment {
         bozo
         turbulence .5
         color_map {
           [0 White]
           [1 White filter 1]
         }
       }
       finish { ambient 1 diffuse 0 }
       scale <100, 250, 250>
       //rotate <5, 45, 0>
    }

// d├ęclarations des objets
#declare r=0.05;
#declare objet1 = //aretes
union{
cylinder { <-4.47213595499958,0,2.23606797749979>
   <-3.6180339887499,2.62865556059567,-2.23606797749979> r}
cylinder { <-3.6180339887499,2.62865556059567,-2.23606797749979>
   <-3.6180339887499,-2.62865556059567,-2.23606797749979> r}
cylinder { <-3.6180339887499,-2.62865556059567,-2.23606797749979>
   <-4.47213595499958,0,2.23606797749979> r}
cylinder { <-4.47213595499958,0,2.23606797749979>
   <-1.3819660112501,-4.2532540417602,2.23606797749979> r}
cylinder { <-1.3819660112501,-4.2532540417602,2.23606797749979>
   <5.55111512312578E-16,0,5> r}
cylinder { <5.55111512312578E-16,0,5>
   <3.6180339887499,-2.62865556059567,2.23606797749979> r}
cylinder { <3.6180339887499,-2.62865556059567,2.23606797749979>
   <3.6180339887499,2.62865556059567,2.23606797749979> r}
cylinder { <3.6180339887499,2.62865556059567,2.23606797749979>
   <5.55111512312578E-16,0,5> r}
cylinder { <5.55111512312578E-16,0,5>
   <-4.47213595499958,0,2.23606797749979> r}
cylinder { <-4.47213595499958,0,2.23606797749979>
   <-1.3819660112501,4.2532540417602,2.23606797749979> r}
cylinder { <-1.3819660112501,4.2532540417602,2.23606797749979>
   <5.55111512312578E-16,0,5> r}
cylinder { <-1.3819660112501,4.2532540417602,2.23606797749979>
   <1.3819660112501,4.2532540417602,-2.23606797749979> r}
cylinder { <1.3819660112501,4.2532540417602,-2.23606797749979>
   <-3.6180339887499,2.62865556059567,-2.23606797749979> r}
cylinder { <-3.6180339887499,2.62865556059567,-2.23606797749979>
   <-1.3819660112501,4.2532540417602,2.23606797749979> r}
cylinder { <-1.3819660112501,4.2532540417602,2.23606797749979>
   <3.6180339887499,2.62865556059567,2.23606797749979> r}
cylinder { <3.6180339887499,2.62865556059567,2.23606797749979>
   <4.47213595499958,0,-2.23606797749979> r}
cylinder { <4.47213595499958,0,-2.23606797749979>
   <3.6180339887499,-2.62865556059567,2.23606797749979> r}
cylinder { <3.6180339887499,-2.62865556059567,2.23606797749979>
   <1.3819660112501,-4.2532540417602,-2.23606797749979> r}
cylinder { <1.3819660112501,-4.2532540417602,-2.23606797749979>
   <-1.3819660112501,-4.2532540417602,2.23606797749979> r}
cylinder { <-1.3819660112501,-4.2532540417602,2.23606797749979>
   <-3.6180339887499,-2.62865556059567,-2.23606797749979> r}
cylinder { <-3.6180339887499,-2.62865556059567,-2.23606797749979>
   <-5.55111512312578E-16,0,-5> r}
cylinder { <-5.55111512312578E-16,0,-5>
   <1.3819660112501,-4.2532540417602,-2.23606797749979> r}
cylinder { <3.6180339887499,-2.62865556059567,2.23606797749979>
   <-1.3819660112501,-4.2532540417602,2.23606797749979> r}
cylinder { <4.47213595499958,0,-2.23606797749979>
   <-5.55111512312578E-16,0,-5> r}
cylinder { <-5.55111512312578E-16,0,-5>
   <1.3819660112501,4.2532540417602,-2.23606797749979> r}
cylinder { <1.3819660112501,4.2532540417602,-2.23606797749979>
   <4.47213595499958,0,-2.23606797749979> r}
cylinder { <4.47213595499958,0,-2.23606797749979>
   <1.3819660112501,-4.2532540417602,-2.23606797749979> r}
cylinder { <1.3819660112501,-4.2532540417602,-2.23606797749979>
   <-3.6180339887499,-2.62865556059567,-2.23606797749979> r}
cylinder { <1.3819660112501,4.2532540417602,-2.23606797749979>
   <3.6180339887499,2.62865556059567,2.23606797749979> r}
cylinder { <-5.55111512312578E-16,0,-5>
   <-3.6180339887499,2.62865556059567,-2.23606797749979> r}
}

#declare rs = 0.1; //sommets
#declare objet2 =union{
sphere { <5.55111512312578E-16,0,5> rs}
sphere { <-4.47213595499958,0,2.23606797749979> rs}
sphere { <-1.3819660112501,4.2532540417602,2.23606797749979> rs }
sphere { <3.6180339887499,2.62865556059567,2.23606797749979> rs}
sphere { <3.6180339887499,-2.62865556059567,2.23606797749979> rs}
sphere { <-1.3819660112501,-4.2532540417602,2.23606797749979> rs}
sphere { <4.47213595499958,0,-2.23606797749979> rs}
sphere { <1.3819660112501,-4.2532540417602,-2.23606797749979> rs}
sphere { <-3.6180339887499,-2.62865556059567,-2.23606797749979> rs}
sphere { <-3.6180339887499,2.62865556059567,-2.23606797749979> rs}
sphere { <1.3819660112501,4.2532540417602,-2.23606797749979> rs}
sphere { <-5.55111512312578E-16,0,-5> rs}
}

#declare objet3 =//plans
union{
mesh2{ vertex_vectors{ 4,
<-5.55111512312578E-16,0,-5>,
<4.47213595499958,0,-2.23606797749979>,
<5.55111512312578E-16,0,5>,
<-4.47213595499958,0,2.23606797749979>
                       }
        face_indices{ 2,
<0,1,2>, <0,2,3>
                       }
}
mesh2{ vertex_vectors{ 4,
<-1.3819660112501,4.2532540417602,2.23606797749979>,
<1.3819660112501,4.2532540417602,-2.23606797749979>,
<1.3819660112501,-4.2532540417602,-2.23606797749979>,
<-1.3819660112501,-4.2532540417602,2.23606797749979>
                       }
        face_indices{ 2,
<0,1,2>, <0,2,3>
                       }
}
mesh2{ vertex_vectors{ 4,
<3.6180339887499,2.62865556059567,2.23606797749979>,
<3.6180339887499,-2.62865556059567,2.23606797749979>,
<-3.6180339887499,-2.62865556059567,-2.23606797749979>,
<-3.6180339887499,2.62865556059567,-2.23606797749979>
                       }
        face_indices{ 2,
<0,1,2>, <0,2,3>
                       }
}}


// rendu

object{ objet1 //aretes
	texture{T_Brass_4C}
	}

object{ objet2 //sommets
	texture{T_Brass_4C}
	}

object{ objet3 //plans
	texture{T_Stone5}
	}

plane{ y, -10  texture{Mer} }

plane { y, 100 texture {Ciel} }