#VRML V2.0 utf8
#Genesis M. Ojeda
#Solar system made with textures and clocks
Group {
children [
# Stars background
Transform {
scale 50 50 50
children Shape {
appearance Appearance {
material Material {
emissiveColor 1 1 1
}
texture ImageTexture { url "./textures/stars.jpg" }
}
geometry Sphere {
solid FALSE
}
}
}
]
}
Group {
children [
# stationary Sun
Shape {
appearance Appearance {
material Material { }
texture ImageTexture {
url "./textures/solar.jpg"
}
}
geometry Sphere { }
},
# Several orbiting planets
DEF Planet1 Transform {
translation 2.0 0.0 0.0
center -2.0 0.0 0.0
children Shape {
appearance Appearance {
material Material { }
texture ImageTexture {
url "./textures/mercury.jpg"
}
}
geometry Sphere { radius 0.2 }
}
},
DEF Planet2 Transform {
translation 3.0 0.0 0.0
center -3.0 0.0 0.0
children Shape {
appearance Appearance {
material Material { }
texture ImageTexture {
url "./textures/venus.jpg"
}
}
geometry Sphere { radius 0.3 }
}
},
DEF Planet3 Transform {
translation 4.0 0.0 0.0
center -4.0 0.0 0.0
children Shape {
appearance Appearance {
material Material { }
texture ImageTexture {
url "./textures/earth.jpg"
}
}
geometry Sphere { radius 0.5 }
}
},
DEF Planet4 Transform {
translation 6.0 0.0 0.0
center -6.0 0.0 0.0
children Shape {
appearance Appearance {
material Material { }
texture ImageTexture {
url "./textures/mars.jpg"
}
}
geometry Sphere { radius 0.4 }
}
},
DEF Planet5 Transform {
translation 8.0 0.0 0.0
center -8.0 0.0 0.0
children [
Shape {
appearance Appearance {
material Material { }
texture ImageTexture {
url "./textures/jupiter.jpg"
}
}
geometry Sphere { radius 0.8 }
},
Transform {
rotation 0 1 0 1.5708
children Shape {
appearance Appearance {
material Material {
diffuseColor 0.8 0.8 0.5
transparency 0.3
}
}
geometry Cylinder {
radius 1.2
height 0.05
}
}
}
]
}
DEF Planet6 Transform {
translation 10.0 0.0 0.0
center -10.0 0.0 0.0
children Shape {
appearance Appearance {
material Material { }
texture ImageTexture {
url "./textures/saturn.jpg"
}
}
geometry Sphere { radius 0.7 }
}
},
DEF Planet7 Transform {
translation 12.0 0.0 0.0
center -12.0 0.0 0.0
children Shape {
appearance Appearance {
material Material { }
texture ImageTexture {
url "./textures/uranus.jpg"
}
}
geometry Sphere { radius 0.6 }
}
},
DEF Planet8 Transform {
translation 14.0 0.0 0.0
center -14.0 0.0 0.0
children Shape {
appearance Appearance {
material Material { }
texture ImageTexture {
url "./textures/neptune.jpg"
}
}
geometry Sphere { radius 0.5 }
}
},
# Animation clocks, one per planet...
DEF Clock1 TimeSensor { # Mercury
cycleInterval 5.00
loop TRUE
},
DEF Clock2 TimeSensor { # Venus
cycleInterval 6.00
loop TRUE
},
DEF Clock3 TimeSensor { # Earth
cycleInterval 8.00
loop TRUE
},
DEF Clock4 TimeSensor { # Mars
cycleInterval 10.88
loop TRUE
},
DEF Clock5 TimeSensor { # Jupiter
cycleInterval 11.86
loop TRUE
},
DEF Clock6 TimeSensor { # Saturn
cycleInterval 29.46
loop TRUE
},
DEF Clock7 TimeSensor { # Uranus
cycleInterval 84.01
loop TRUE
},
DEF Clock8 TimeSensor { # Neptune
cycleInterval 164.79
loop TRUE
},
# Animation paths, one per planet...
DEF Path1 OrientationInterpolator {
key [ 0.0, 0.50, 1.0 ]
keyValue [
0 0.995037 0.0995037 0.0,
0 0.995037 0.0995037 3.14,
0 0.995037 0.0995037 6.28
]
},
DEF Path2 OrientationInterpolator {
key [ 0.0 0.50 1.0 ]
keyValue [
-0.0775436 0.996989 0 0.0,
-0.0775436 0.996989 0 3.14,
-0.0775436 0.996989 0 6.28
]
},
DEF Path3 OrientationInterpolator {
key [ 0.0 0.50 1.0 ]
keyValue [
0 0.996989 0.0775436 0.0,
0 0.996989 0.0775436 3.14,
0 0.996989 0.0775436 6.28
]
}
DEF Path4 OrientationInterpolator {
key [ 0.0 0.50 1.0 ]
keyValue [
0 0.996989 0.0775436 0.0,
0 0.996989 0.0775436 3.14,
0 0.996989 0.0775436 6.28
]
}
DEF Path5 OrientationInterpolator {
key [ 0.0 0.50 1.0 ]
keyValue [
0 0.996989 0.0775436 0.0,
0 0.996989 0.0775436 3.14,
0 0.996989 0.0775436 6.28
]
}
DEF Path6 OrientationInterpolator {
key [ 0.0 0.50 1.0 ]
keyValue [
0 0.996989 0.0775436 0.0,
0 0.996989 0.0775436 3.14,
0 0.996989 0.0775436 6.28
]
}
DEF Path7 OrientationInterpolator {
key [ 0.0 0.50 1.0 ]
keyValue [
0 0.996989 0.0775436 0.0,
0 0.996989 0.0775436 3.14,
0 0.996989 0.0775436 6.28
]
}
DEF Path8 OrientationInterpolator {
key [ 0.0 0.50 1.0 ]
keyValue [
0 0.996989 0.0775436 0.0,
0 0.996989 0.0775436 3.14,
0 0.996989 0.0775436 6.28
]
}
]
}
ROUTE Clock1.fraction_changed TO Path1.set_fraction
ROUTE Clock2.fraction_changed TO Path2.set_fraction
ROUTE Clock3.fraction_changed TO Path3.set_fraction
ROUTE Clock4.fraction_changed TO Path4.set_fraction
ROUTE Clock5.fraction_changed TO Path5.set_fraction
ROUTE Clock6.fraction_changed TO Path6.set_fraction
ROUTE Clock7.fraction_changed TO Path7.set_fraction
ROUTE Clock8.fraction_changed TO Path8.set_fraction
ROUTE Path1.value_changed TO Planet1.set_rotation
ROUTE Path2.value_changed TO Planet2.set_rotation
ROUTE Path3.value_changed TO Planet3.set_rotation
ROUTE Path4.value_changed TO Planet4.set_rotation
ROUTE Path5.value_changed TO Planet5.set_rotation
ROUTE Path6.value_changed TO Planet6.set_rotation
ROUTE Path7.value_changed TO Planet7.set_rotation
ROUTE Path8.value_changed TO Planet8.set_rotation