2021-03-08 06:58:18 +11:00
|
|
|
/*
|
2021-03-16 10:48:07 +11:00
|
|
|
* des éléments du petit train
|
|
|
|
* ---------------------------
|
2021-03-08 06:58:18 +11:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2021-03-16 10:48:07 +11:00
|
|
|
//-----------------------------------------------------------------
|
2021-03-23 20:09:22 +11:00
|
|
|
#include "incs/constantes.inc"
|
2021-03-16 10:48:07 +11:00
|
|
|
|
2021-03-16 03:29:35 +11:00
|
|
|
//-----------------------------------------------------------------
|
|
|
|
|
2021-03-08 06:58:18 +11:00
|
|
|
#declare Corps_Grande_Roue = object
|
|
|
|
{
|
|
|
|
difference {
|
|
|
|
union {
|
2021-03-16 10:48:07 +11:00
|
|
|
cylinder { < 0, 0, 0>, <0.8, 0, 0>, 4 }
|
|
|
|
cylinder { <-0.5, 0, 0>, <0, 0, 0>, 4.3 }
|
2021-03-08 06:58:18 +11:00
|
|
|
}
|
|
|
|
cylinder { <-1.2, 0, 0> <-0.6, 0, 0>, 2.8 }
|
|
|
|
cylinder { < 1.2, 0, 0> < 0.6, 0, 0>, 3.2 }
|
2021-03-16 10:48:07 +11:00
|
|
|
|
2021-03-08 06:58:18 +11:00
|
|
|
#declare foo = 0;
|
|
|
|
#while (foo < 360)
|
2021-03-16 03:29:35 +11:00
|
|
|
#local R = 2.2;
|
|
|
|
#declare xx = sin(radians(foo))*R;
|
|
|
|
#declare yy = cos(radians(foo))*R;
|
2021-03-08 06:58:18 +11:00
|
|
|
|
|
|
|
cylinder { <-2, xx, yy>, <2, xx, yy>, 0.56 }
|
|
|
|
|
2021-03-15 13:08:13 +11:00
|
|
|
#declare foo = foo + 36;
|
2021-03-08 06:58:18 +11:00
|
|
|
#end
|
|
|
|
}
|
2021-03-16 10:48:07 +11:00
|
|
|
texture { Texture_Roues }
|
2021-03-08 06:58:18 +11:00
|
|
|
}
|
|
|
|
|
2021-03-16 03:29:35 +11:00
|
|
|
//-----------------------------------------------------------------
|
2021-03-08 06:58:18 +11:00
|
|
|
|
|
|
|
#declare Corps_Petite_Roue = object
|
|
|
|
{
|
|
|
|
difference {
|
|
|
|
union {
|
2021-03-16 10:48:07 +11:00
|
|
|
cylinder { < 0, 0, 0>, <0.8, 0, 0>, 3 }
|
|
|
|
cylinder { <-0.5, 0, 0>, <0, 0, 0>, 3.35 }
|
2021-03-08 06:58:18 +11:00
|
|
|
}
|
|
|
|
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)
|
2021-03-16 10:48:07 +11:00
|
|
|
#declare xx = sin(radians(foo))*2.29;
|
|
|
|
#declare yy = cos(radians(foo))*2.29;
|
2021-03-08 06:58:18 +11:00
|
|
|
|
2021-03-16 10:48:07 +11:00
|
|
|
sphere { <1.1, xx, yy>, 0.44 }
|
2021-03-08 06:58:18 +11:00
|
|
|
|
2021-03-12 09:33:35 +11:00
|
|
|
#declare foo = foo + 36;
|
2021-03-08 06:58:18 +11:00
|
|
|
#end
|
|
|
|
}
|
2021-03-16 10:48:07 +11:00
|
|
|
texture { Texture_Roues }
|
2021-03-08 06:58:18 +11:00
|
|
|
}
|
|
|
|
|
2021-03-16 10:48:07 +11:00
|
|
|
//-----------------------------------------------------------------
|
|
|
|
|
2021-03-08 06:58:18 +11:00
|
|
|
#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 }
|
|
|
|
}
|
|
|
|
|
2021-03-16 10:48:07 +11:00
|
|
|
//-----------------------------------------------------------------
|
|
|
|
|
2021-03-08 06:58:18 +11:00
|
|
|
#declare Petite_Roue = object
|
|
|
|
{
|
|
|
|
union {
|
|
|
|
object { Corps_Petite_Roue }
|
2021-03-16 10:48:07 +11:00
|
|
|
object { Moyeu translate <0.95, 0, 0> }
|
2021-03-08 06:58:18 +11:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#declare Grande_Roue = object
|
|
|
|
{
|
|
|
|
union {
|
|
|
|
object { Corps_Grande_Roue }
|
2021-03-16 10:48:07 +11:00
|
|
|
object { Moyeu translate <0.95, 0, 0> }
|
2021-03-08 06:58:18 +11:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------
|
|
|
|
|
|
|
|
#declare Chassis_Court = object
|
|
|
|
{
|
|
|
|
union {
|
2021-03-23 19:55:20 +11:00
|
|
|
box { <-3.5, 0.2, -12>, <3.5, 1.8, 12> }
|
2021-03-08 06:58:18 +11:00
|
|
|
box { <-3.6, 0.7, -12.5>, <3.6, 1.3, 12.5> }
|
|
|
|
}
|
|
|
|
translate y*4.1
|
2021-03-16 10:48:07 +11:00
|
|
|
texture { Texture_Chassis }
|
2021-03-08 06:58:18 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
#declare Chassis_Long = object
|
|
|
|
{
|
|
|
|
union {
|
2021-03-23 19:55:20 +11:00
|
|
|
box { <-3.5, 0.2, -15.5>, <3.5, 1.8, 15.5> }
|
2021-03-08 06:58:18 +11:00
|
|
|
box { <-4, 0.5, -16>, <4, 1.5, 16> }
|
|
|
|
}
|
|
|
|
translate y*4.1
|
2021-03-16 10:48:07 +11:00
|
|
|
texture { Texture_Chassis }
|
2021-03-08 06:58:18 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------
|
|
|
|
|
|
|
|
#declare Chassis_Boogie = object
|
|
|
|
{
|
|
|
|
union {
|
2021-03-16 03:29:35 +11:00
|
|
|
box { <-3.85, 0, -3>, <3.85, 1.6, 3> }
|
|
|
|
cylinder { <0, 1, 0>, <0, 4, 0>, 1.5 }
|
2021-03-08 06:58:18 +11:00
|
|
|
}
|
|
|
|
translate y*2
|
2021-03-16 03:29:35 +11:00
|
|
|
pigment { color Gray30 }
|
2021-03-08 06:58:18 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
#declare Boogie = object
|
|
|
|
{
|
2021-03-16 10:48:07 +11:00
|
|
|
#local HR = 3;
|
2021-03-08 06:58:18 +11:00
|
|
|
union
|
|
|
|
{
|
|
|
|
object { Chassis_Boogie }
|
2021-03-16 10:48:07 +11:00
|
|
|
object { Petite_Roue scale <-1, 1, 1> translate <-5.5, HR, -3.5> }
|
|
|
|
object { Petite_Roue translate < 5.5, HR, -3.5> }
|
|
|
|
object { Petite_Roue scale <-1, 1, 1> translate <-5.5, HR, 3.5> }
|
|
|
|
object { Petite_Roue translate < 5.5, HR, 3.5> }
|
2021-03-08 06:58:18 +11:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------
|
|
|
|
|
|
|
|
#declare Base_Courte = object
|
|
|
|
{
|
2021-03-16 10:48:07 +11:00
|
|
|
#local HR = 4;
|
|
|
|
union {
|
2021-03-08 06:58:18 +11:00
|
|
|
object { Chassis_Court }
|
2021-03-16 10:48:07 +11:00
|
|
|
object { Grande_Roue scale <-1, 1, 1> translate <-5.5, HR, -8> }
|
|
|
|
object { Grande_Roue translate < 5.5, HR, -8> }
|
|
|
|
object { Grande_Roue scale <-1, 1, 1> translate <-5.5, HR, 8> }
|
|
|
|
object { Grande_Roue translate < 5.5, HR, 8> }
|
2021-03-08 06:58:18 +11:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------
|