You are on page 1of 7

 CODING

#VRML V2.0 utf8


Background {
topUrl "D:\chabao\tugas kampus\semester 6\vrml teori\planet\outerspace.jpg"
backUrl "D:\chabao\tugas kampus\semester 6\vrml teori\planet\outerspace.jpg"
frontUrl "D:\chabao\tugas kampus\semester 6\vrml teori\planet\outerspace.jpg"
rightUrl "D:\chabao\tugas kampus\semester 6\vrml teori\planet\outerspace.jpg"
leftUrl "D:\chabao\tugas kampus\semester 6\vrml teori\planet\outerspace.jpg"
}
Transform {
translation -3.5 -11 0
children [
Shape {
appearance Appearance {
material Material { diffuseColor 1 1 0 }
}
geometry Text {
string ["Quis1, Ardany AM 162394",
"Latihan Pergerakan dinamis lewat koding"]
fontStyle FontStyle {
family "serief"
style "BOLD"
size 0.8
justify " ????? "
} } }]},
Group {
children [
Shape {
appearance DEF White Appearance {
material Material {}
texture ImageTexture {
url [ "D:\chabao\tugas kampus\semester 6\vrml
teori\planet\texmatahari.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 {
texture ImageTexture {
url [ "D:\chabao\tugas kampus\semester 6\vrml
teori\planet\texmerkurius.jpg" ]}}
geometry Sphere { radius 0.3 }
}
},
DEF Planet2 Transform {
translation 3.0 0.0 0.0
center -3.0 0.0 0.0
children Shape {
appearance Appearance {
texture ImageTexture {
url [ "D:\chabao\tugas kampus\semester 6\vrml teori\planet\texvenus.jpg" ]}}
geometry Sphere { radius 0.4 }
}
},
DEF Planet3 Transform {
translation 4.0 0.0 0.0
center -4.0 0.0 0.0
children Shape {
appearance Appearance {
texture ImageTexture {
url [ "D:\chabao\tugas kampus\semester 6\vrml teori\planet\texbumi.jpg" ]}}
geometry Sphere { radius 0.5 }
}
},
DEF Planet4 Transform {
translation 5.5 0.0 0.0
center -5.5 0.0 0.0
children Shape {
appearance Appearance {
texture ImageTexture {
url [ "D:\chabao\tugas kampus\semester 6\vrml teori\planet\texmars.jpg" ]}}
geometry Sphere { radius 0.4 }
}
},
DEF Planet5 Transform {
translation 7.0 0.0 0.0
center -7.0 0.0 0.0
children Shape {
appearance Appearance {
texture ImageTexture {
url [ "D:\chabao\tugas kampus\semester 6\vrml teori\planet\texjupiter.jpg" ]}}
geometry Sphere { radius 0.8 }
}
},
DEF Planet6 Transform {
translation 10.0 0.0 0.0
center -10.0 0.0 0.0
children Shape {
appearance Appearance {
texture ImageTexture {
url [ "D:\chabao\tugas kampus\semester 6\vrml
teori\planet\texsaturnus.jpg" ]}}
geometry Sphere { radius 0.7 }
}
},
DEF Planet7 Transform {
translation 12.5 0.0 0.0
center -12.5 0.0 0.0
children Shape {
appearance Appearance {
texture ImageTexture {
url [ "D:\chabao\tugas kampus\semester 6\vrml teori\planet\texuranus.png" ]}}
geometry Sphere { radius 0.6 }
}
},
DEF Planet8 Transform {
translation 14.5 0.0 0.0
center -14.5 0.0 0.0
children Shape {
appearance Appearance {
texture ImageTexture {
url [ "D:\chabao\tugas kampus\semester 6\vrml
teori\planet\texneptunus.jpg" ]}}
geometry Sphere { radius 0.6 }
}
},
DEF Planet9 Transform {
translation 16.0 0.0 0.0
center -16.0 0.0 0.0
children Shape {
appearance Appearance {
texture ImageTexture {
url [ "D:\chabao\tugas kampus\semester 6\vrml teori\planet\texpluto.jpg" ]}}
geometry Sphere { radius 0.3 }
}
},
#Animation clock, one per planet
DEF Clock1 TimeSensor {
cycleInterval 2.0
loop TRUE
},
DEF Clock2 TimeSensor {
cycleInterval 3.5
loop TRUE
},
DEF Clock3 TimeSensor {
cycleInterval 5.0
loop TRUE
},
DEF Clock4 TimeSensor {
cycleInterval 6.5
loop TRUE
},
DEF Clock5 TimeSensor {
cycleInterval 8.0
loop TRUE
},
DEF Clock6 TimeSensor {
cycleInterval 9.5
loop TRUE
},
DEF Clock7 TimeSensor {
cycleInterval 11.0
loop TRUE
},
DEF Clock8 TimeSensor {
cycleInterval 12.5
loop TRUE
},
DEF Clock9 TimeSensor {
cycleInterval 14.0
loop TRUE
},
#Animation paths, one per planet
DEF PlanetPath1 OrientationInterpolator {
key [ 0.0, 0.50, 1.0 ]
keyValue [ 0.0 0.0 1.0 0.0,
0.0 0.0 1.0 3.14,
0.0 0.0 1.0 6.28 ]
},
DEF PlanetPath2 OrientationInterpolator {
key [ 0.0, 0.50, 1.0 ]
keyValue [ 0.0 0.0 1.0 0.0,
0.0 0.0 1.0 3.14,
0.0 0.0 1.0 6.28 ]
},
DEF PlanetPath3 OrientationInterpolator {
key [ 0.0, 0.50, 1.0 ]
keyValue [ 0.0 0.0 1.0 0.0,
0.0 0.0 1.0 3.14,
0.0 0.0 1.0 6.28 ]
},
DEF PlanetPath4 OrientationInterpolator {
key [ 0.0, 0.50, 1.0 ]
keyValue [ 0.0 0.0 1.0 0.0,
0.0 0.0 1.0 3.14,
0.0 0.0 1.0 6.28 ]
},
DEF PlanetPath5 OrientationInterpolator {
key [ 0.0, 0.50, 1.0 ]
keyValue [ 0.0 0.0 1.0 0.0,
0.0 0.0 1.0 3.14,
0.0 0.0 1.0 6.28 ]
},
DEF PlanetPath6 OrientationInterpolator {
key [ 0.0, 0.50, 1.0 ]
keyValue [ 0.0 0.0 1.0 0.0,
0.0 0.0 1.0 3.14,
0.0 0.0 1.0 6.28 ]
},
DEF PlanetPath7 OrientationInterpolator {
key [ 0.0, 0.50, 1.0 ]
keyValue [ 0.0 0.0 1.0 0.0,
0.0 0.0 1.0 3.14,
0.0 0.0 1.0 6.28 ]
},
DEF PlanetPath8 OrientationInterpolator {
key [ 0.0, 0.50, 1.0 ]
keyValue [ 0.0 0.0 1.0 0.0,
0.0 0.0 1.0 3.14,
0.0 0.0 1.0 6.28 ]
},
DEF PlanetPath9 OrientationInterpolator {
key [ 0.0, 0.50, 1.0 ]
keyValue [ 0.0 0.0 1.0 0.0,
0.0 0.0 1.0 3.14,
0.0 0.0 1.0 6.28 ]

}]}

ROUTE Clock1.fraction_changed TO PlanetPath1.set_fraction


ROUTE Clock2.fraction_changed TO PlanetPath2.set_fraction
ROUTE Clock3.fraction_changed TO PlanetPath3.set_fraction
ROUTE Clock4.fraction_changed TO PlanetPath4.set_fraction
ROUTE Clock5.fraction_changed TO PlanetPath5.set_fraction
ROUTE Clock6.fraction_changed TO PlanetPath6.set_fraction
ROUTE Clock7.fraction_changed TO PlanetPath7.set_fraction
ROUTE Clock8.fraction_changed TO PlanetPath8.set_fraction
ROUTE Clock9.fraction_changed TO PlanetPath9.set_fraction
ROUTE PlanetPath1.value_changed TO Planet1.set_rotation
ROUTE PlanetPath2.value_changed TO Planet2.set_rotation
ROUTE PlanetPath3.value_changed TO Planet3.set_rotation
ROUTE PlanetPath4.value_changed TO Planet4.set_rotation
ROUTE PlanetPath5.value_changed TO Planet5.set_rotation
ROUTE PlanetPath6.value_changed TO Planet6.set_rotation
ROUTE PlanetPath7.value_changed TO Planet7.set_rotation
ROUTE PlanetPath8.value_changed TO Planet8.set_rotation
ROUTE PlanetPath9.value_changed TO Planet9.set_rotation
 HASIL

 JARAK DEKAT

Nb : total ada 9 planet + 1 matahari

You might also like