Modifié le 20 Octobre 2008 à 22 h 47
//@AUTEUR: Thomas Labarussias
//horoptere (/!\ rendu long /!\)
#include "colors.inc" //importation de la librairie de couleurs predefinies
global_settings {ambient_light rgb <8,8,8>} //eclairage ambient
background {color White} //couleur du fond
camera
{
location <2,2,1>
look_at <0,0,0>
sky <0,0,1>
}
#macro curve (rayon,compression)
#local bille = sphere {<0,0,0> 0.03 texture{finish {ambient 0.3}}}
#declare tt=-3.07;
union
{ union{
#while ( tt < 3.07 )
object {bille translate <rayon+rayon*cos(tt),compression*tan(tt/2),rayon*sin(tt)> pigment{color Red}}
#declare tt = tt+.001;
#end}
cylinder {<rayon,-2,0> <rayon,2,0> rayon pigment {color Green transmit 0.5}}
}
#end
object{curve (.5,.15)} //specifiez le rayon du cylindre 'porteur' et la compression de la courbe entre les parentheses