Voir : 
la version texte avec indentation

La fenêtre de Viviani




le programme joint

Voir en 800x600

une variante

Voir en 800x600





La vision en relief permet de bien mieux appréhender ces surfaces complexes dans l'espace.
Ainsi, pour visualiser ces surfaces en relief ( images stéréoscopiques ), aller à cette page.




// La fenêtre de Viviani
#include "colors.inc"
#include "stones.inc"
#include "glass.inc"

camera {location <2,1.5,-7>
look_at <-0.3,0.2,-1>}

light_source {<-5,5,-8> White }
light_source {<10,5,-10> White}

//la pièce
union {
plane { z , 7 pigment{ Cyan}}
plane { y , -3 pigment{ rgb <0,0.8,1>}}
plane { x , -8 pigment{ Cyan} }
rotate <0,0,-3.2>
}

#declare sph=sphere { 0,2};
#declare cyl=cylinder { <0,-2,0>,<0,2,0>,1};

union{
object { sph
translate <-1,0,0>
clipped_by{cyl}
pigment { rgb <1,0.2,0.2>*1.6}
}
object { cyl
clipped_by{ sph
translate <-1,0,0>
}
pigment { rgb <1,1,0>*1.6}
}

// la sphère transparente
intersection { object {sph
translate <-1,0,0>
clipped_by{ object{cyl inverse}}
}
object {sph scale 0.995 inverse
translate <-1,0,0>
clipped_by{ object{cyl inverse}}
}
texture { T_Glass4 }
interior { ior Air_Ior }
} // fin intersection

intersection { cone { <1,0,0>,0,<1,2.1,0>,2.1}
cone { <1,0,0>,0,<1,2.1,0>,2.1 translate 0.02*y inverse }
texture { T_Glass3 }
interior { ior Crown_Glass_Ior}//ior Air_Ior }
finish { ambient 0.1 reflection 0.08 specular 0.2}
}
// le support
box { <-2.5,-3,-1.5>,<0.5,-2,1.5>
texture { T_Stone16 }
} // fin box
finish {reflection 0.5 ambient 0.8 diffuse 0.5 specular 0.5 }
rotate <0,25,-0.9>
}


Début