#include "meteo.inc" #declare ClockMembres=clock; #while (ClockMembres>0.9) #declare ClockMembres=ClockMembres-0.8; #end // chemins {{{1 // chemin des jambes {{{2 #declare RotCuissDPath=spline { linear_spline 0.0, <0,0,0> 0.1, <-45,0,0> 0.2, <-45,0,0> 0.3, <0,0,0> 0.4, <0,0,0> 0.5, <0,0,0> 0.6, <0,0,0> 0.7, <30,0,0> 0.8, <0,0,0> 0.9, <-45,0,0> } #declare RotTibiaDPath=spline { linear_spline 0.0, <0,0,0> 0.1, <40,0,0> 0.2, <0,0,0> 0.3, <0,0,0> 0.4, <0,0,0> 0.5, <0,0,0> 0.6, <0,0,0> 0.7, <0,0,0> 0.8, <90,0,0> 0.9, <40,0,0> } #declare RotCuissGPath=spline { linear_spline 0.0, <0,0,0> 0.1, <0,0,0> 0.2, <0,0,0> 0.3, <30,0,0> 0.4, <0,0,0> 0.5, <-45,0,0> 0.6, <-45,0,0> 0.7, <0,0,0> 0.8, <0,0,0> 0.9, <0,0,0> } #declare RotTibiaGPath=spline { linear_spline 0.0, <0,0,0> 0.1, <0,0,0> 0.2, <0,0,0> 0.3, <0,0,0> 0.4, <90,0,0> 0.5, <40,0,0> 0.6, <0,0,0> 0.7, <0,0,0> 0.8, <0,0,0> 0.9, <0,0,0> } //Chemins des bras {{{2 #declare RotBrasDPath=spline { linear_spline 0.0, <0,0,0> 0.1, <10,0,0> 0.2, <20,0,0> 0.3, <30,0,0> 0.4, <0,0,0> 0.5, <-10,0,0> 0.6, <-20,0,0> 0.7, <-10,0,0> 0.8, <0,0,0> 0.9, <10,0,0> } #declare RotABrasGPath=spline { linear_spline 0.0, <0,0,0> 0.1, <0,0,0> 0.2, <-80,0,0> 0.3, <0,0,0> 0.9, <0,0,0> } #declare RotABrasDPath=spline { linear_spline 0.0, <0,0,0> 0.1, <0,0,0> 0.5, <0,0,0> 0.6, <-80,0,0> 0.7, <0,0,0> 0.9, <0,0,0> } #declare RotBrasGPath=spline { linear_spline 0.0, <0,0,0> 0.1, <-10,0,0> 0.2, <-20,0,0> 0.3, <-10,0,0> 0.4, <0,0,0> 0.5, <10,0,0> 0.6, <20,0,0> 0.7, <30,0,0> 0.8, <0,0,0> 0.9, <-10,0,0> } // chemin du robot {{{2 #declare RobotPosPath=spline { linear_spline 0.0, <0,0,0> 0.2, <0,0,0> 0.3, <0,0,0.5> 0.6, <0,0,0.5> 0.7, <0,0,1.0> 1.0, <0,0,1.0> 1.1, <0,0,1.5> 1.4, <0,0,1.5> 1.5, <0,0,2.0> 1.8, <0,0,2.0> 1.9, <0,0,2.5> 2.2, <0,0,2.5> 2.3, <0,0,3.0> 2.6, <0,0,3.0> 2.7, <0,0,3.5> 3.0, <0,0,3.5> 3.1, <0,0,4.0> 3.4, <0,0,4.0> 3.5, <0,0,4.5> 3.8, <0,0,4.5> 3.9, <0,0,5.0> 4.2, <0,0,5.0> } //déclarations {{{1 #declare RobotPos=RobotPosPath(clock); #declare DebutBassin=RobotPos+<0,0.8,0>; #declare RotBassin=<0,0,0>; #declare VecteurBassin=vrotate(<0,0.5,0>,RotBassin); #declare DebutTete=DebutBassin+VecteurBassin+vrotate(<0,0.08,0>,RotBassin); #declare RotTete=RotBassin+<0,0,0>; #declare VecteurTete=vrotate(<0,0.18,0>,RotTete); #declare DebutBrasD=DebutBassin+VecteurBassin+vrotate(<-0.22,0,0>,RotBassin); #declare DebutBrasG=DebutBassin+VecteurBassin+vrotate(< 0.22,0,0>,RotBassin); #declare RotBrasD=RotBassin+RotBrasDPath(ClockMembres); #declare RotBrasG=RotBassin+RotBrasGPath(ClockMembres); #declare VecteurBrasD=vrotate(<0,-0.3,0>,RotBrasD); #declare VecteurBrasG=vrotate(<0,-0.3,0>,RotBrasG); #declare DebutABrasD=DebutBrasD+VecteurBrasD; #declare DebutABrasG=DebutBrasG+VecteurBrasG; #declare RotABrasD=RotBrasD+RotABrasDPath(ClockMembres); #declare RotABrasG=RotBrasG+RotABrasGPath(ClockMembres); #declare VecteurABrasD=vrotate(<0,-0.3,0>,RotABrasD); #declare VecteurABrasG=vrotate(<0,-0.3,0>,RotABrasG); #declare DebutCuissD=DebutBassin+<-0.15,0,0>; #declare DebutCuissG=DebutBassin+< 0.15,0,0>; #declare RotCuissD=RotCuissDPath(ClockMembres); #declare RotCuissG=RotCuissGPath(ClockMembres); #declare VecteurCuissD=vrotate(<0,-0.4,0>,RotCuissD); #declare VecteurCuissG=vrotate(<0,-0.4,0>,RotCuissG); #declare DebutTibiaD=DebutCuissD+VecteurCuissD; #declare DebutTibiaG=DebutCuissG+VecteurCuissG; #declare RotTibiaD=RotCuissD+RotTibiaDPath(ClockMembres); #declare RotTibiaG=RotCuissG+RotTibiaGPath(ClockMembres); #declare VecteurTibiaD=vrotate(<0,-0.35,0>,RotTibiaD); #declare VecteurTibiaG=vrotate(<0,-0.35,0>,RotTibiaG); #declare DebutPiedD=DebutTibiaD+VecteurTibiaD+vrotate(<0,-0.025,-0.05>,RotTibiaD); #declare DebutPiedG=DebutTibiaG+VecteurTibiaG+vrotate(<0,-0.025,-0.05>,RotTibiaG); #declare RotPiedD=RotTibiaD+<0,0,0>; #declare RotPiedG=RotTibiaG+<0,0,0>; #declare VecteurPiedD=vrotate(<0,0,0.2>,RotPiedD); #declare VecteurPiedG=vrotate(<0,0,0.2>,RotPiedG); /// texturs {{{1 #declare TexPied = texture { pigment { color rgb x } } #declare TexMain = texture { pigment { color rgb x } } #declare TexCuiss = texture { pigment { color rgb y } } #declare TexTibia = texture { pigment { color rgb z } } #declare TexBassin = texture { pigment { color rgb x+z } } #declare TexBras = texture { pigment { color rgb y+z } } #declare TexABras = texture { pigment { color rgb x+y } } #declare TexTete = texture { pigment { color rgb 0 } } // objets {{{1 #declare Bassin = cylinder { DebutBassin,DebutBassin+VecteurBassin,0.15 texture { TexBassin } } #declare Epaules = cylinder { DebutBrasD,DebutBrasG,0.05 texture { TexBassin } } #declare Tete = cylinder { DebutTete,DebutTete+VecteurTete,0.07 texture { TexTete } } #declare BrasD = cylinder { DebutBrasD,DebutBrasD+VecteurBrasD,0.04 texture { TexBras } } #declare BrasG = cylinder { DebutBrasG,DebutBrasG+VecteurBrasG,0.04 texture { TexBras } } #declare ABrasD = cylinder { DebutABrasD,DebutABrasD+VecteurABrasD,0.03 texture { TexABras } } #declare ABrasG = cylinder { DebutABrasG,DebutABrasG+VecteurABrasG,0.03 texture { TexABras } } #declare MainD= sphere { DebutABrasD+VecteurABrasD,0.05 texture { TexMain } } #declare MainG= sphere { DebutABrasG+VecteurABrasG,0.05 texture { TexMain } } #declare CuissD = cylinder { DebutCuissD,DebutCuissD+VecteurCuissD,0.05 texture { TexCuiss } } #declare CuissG = cylinder { DebutCuissG,DebutCuissG+VecteurCuissG,0.05 texture { TexCuiss } } #declare TibiaD = cylinder { DebutTibiaD,DebutTibiaD+VecteurTibiaD,0.04 texture { TexTibia } } #declare TibiaG = cylinder { DebutTibiaG,DebutTibiaG+VecteurTibiaG,0.04 texture { TexTibia } } #declare PiedD = cylinder { DebutPiedD,DebutPiedD+VecteurPiedD,0.025 texture { TexPied } } #declare PiedG = cylinder { DebutPiedG,DebutPiedG+VecteurPiedG,0.025 texture { TexPied } } //affichage des objets {{{1 Bassin Epaules Tete BrasD BrasG ABrasD ABrasG CuissD CuissG TibiaD TibiaG PiedD PiedG MainG MainD ///divers {{{1 plane {y,0 texture { pigment { checker color rgb 1 color rgb <1,0.7,0.5> } } } camera { location 2 look_at RobotPos+y }