PovJouets/incs/train.inc

155 lines
3.0 KiB
PHP
Raw Normal View History

2021-03-08 06:58:18 +11:00
/*
* un petit train
* --------------
*
* pas la peine de chercher la benne ici, elle est partie
* dans son fichier 'benne.inc'.
*
*/
#declare Corps_Grande_Roue = object
{
difference {
union {
cylinder { <-1, 0, 0>, <1, 0, 0>, 4 }
cylinder { <-1, 0, 0>, <0, 0, 0>, 4.3 }
}
cylinder { <-1.2, 0, 0> <-0.6, 0, 0>, 2.8 }
cylinder { < 1.2, 0, 0> < 0.6, 0, 0>, 3.2 }
#declare foo = 0;
#while (foo < 360)
#declare xx = sin(radians(foo))*2.0;
#declare yy = cos(radians(foo))*2.0;
cylinder { <-2, xx, yy>, <2, xx, yy>, 0.56 }
#declare foo = foo + 45;
#end
}
translate y*4
pigment { color LightSteelBlue }
finish { phong 0.7 }
}
#declare Corps_Petite_Roue = object
{
difference {
union {
cylinder { < 0, 0, 0>, <1, 0, 0>, 3 }
cylinder { <-1, 0, 0>, <0, 0, 0>, 3.3 }
}
cylinder { <-1.4, 0, 0> <-0.6, 0, 0>, 1.7 }
cylinder { < 1.4, 0, 0> < 0.6, 0, 0>, 1.7 }
#declare foo = 0;
#while (foo < 360)
#declare xx = sin(radians(foo))*2.31;
#declare yy = cos(radians(foo))*2.31;
sphere { <1.1, xx, yy>, 0.42 }
2021-03-12 09:33:35 +11:00
#declare foo = foo + 36;
2021-03-08 06:58:18 +11:00
#end
}
translate y*3
pigment { color LightSteelBlue }
finish { phong 0.7 }
}
#declare Moyeu = object
{
union {
intersection {
sphere { <0, 0, 0>, .69 }
box { <0, -2, -2>, <2, 2, 2> }
}
cylinder { <-3, 0, 0>, <0.01, 0, 0>, .33 }
}
texture { T_Chrome_2C }
}
#declare Petite_Roue = object
{
union {
object { Corps_Petite_Roue }
object { Moyeu translate <0.95, 3, 0> }
}
}
#declare Grande_Roue = object
{
union {
object { Corps_Grande_Roue }
object { Moyeu translate <0.95, 4, 0> }
}
}
//-----------------------------------------------------------------
#declare Chassis_Court = object
{
union {
box { <-3.5, 0, -12>, <3.5, 2, 12> }
box { <-3.6, 0.7, -12.5>, <3.6, 1.3, 12.5> }
}
translate y*4.1
texture {
pigment { color Yellow }
finish { phong 0.6 ambient 0.4 }
}
}
#declare Chassis_Long = object
{
union {
box { <-3.5, 0, -15.5>, <3.5, 2, 15.5> }
box { <-4, 0.5, -16>, <4, 1.5, 16> }
}
translate y*4.1
texture {
pigment { color Yellow }
finish { phong 0.6 ambient 0.4 }
}
}
//-----------------------------------------------------------------
#declare Chassis_Boogie = object
{
union {
box { <-3.85, 0, -3>, <3.85, 2, 3> }
cylinder { <0, 1, 0>, <0, 4, 0>, 2 }
}
translate y*2
pigment { color Blue }
}
#declare Boogie = object
{
union
{
object { Chassis_Boogie }
object { Petite_Roue scale <-1, 1, 1> translate <-5.5, 0, -3.5> }
object { Petite_Roue translate < 5.5, 0, -3.5> }
object { Petite_Roue scale <-1, 1, 1> translate <-5.5, 0, 3.5> }
object { Petite_Roue translate < 5.5, 0, 3.5> }
}
}
//-----------------------------------------------------------------
#declare Base_Courte = object
{
union
{
object { Chassis_Court }
object { Grande_Roue scale <-1, 1, 1> translate <-5.5, 0, -8> }
object { Grande_Roue translate < 5.5, 0, -8> }
object { Grande_Roue scale <-1, 1, 1> translate <-5.5, 0, 8> }
object { Grande_Roue translate < 5.5, 0, 8> }
}
}
//-----------------------------------------------------------------