0% found this document useful (0 votes)
93 views

Script VRML

This document describes a VRML scene file that defines a bedroom with various furniture objects like a bed, desk, chair, wardrobe, small table, and sofa. The bedroom has walls defined in another VRML file. The furniture objects like bed, desk, and sofa are composed of basic 3D shapes and positioned in the bedroom scene using transformations. Lights are also defined and positioned in the bedroom scene.

Uploaded by

qrun2000
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views

Script VRML

This document describes a VRML scene file that defines a bedroom with various furniture objects like a bed, desk, chair, wardrobe, small table, and sofa. The bedroom has walls defined in another VRML file. The furniture objects like bed, desk, and sofa are composed of basic 3D shapes and positioned in the bedroom scene using transformations. Lights are also defined and positioned in the bedroom scene.

Uploaded by

qrun2000
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

#VRML V2.

0 utf8
# file name: almari.wrl
# almari
Group
{
children
[
DEF MyBox Shape
{
appearance Appearance
{
material Material
{
diffuseColor 0.9 0.9 0.9
}
}
geometry Box
{
size 2.0 5.0 2.0
}
},
# handle
Transform
{
translation -0.7 0.6 1.05
scale
0.1 0.1 0.15
children USE MyBox
},
]
}
#VRML V2.0 utf8
# file name: kamar.wrl
# Kamar dengan tempat tidur, meja
kursi belajar, lampu, almari, dan sofa
Group
{
children
[
# kamar dengan tembok
Inline
{
url "ruang.wrl"
}
# tempat tidur dengan dua
bantal merah
Transform

{
translation -7.0 0.5 4.5
children
[
Shape
{
appearance DEF
BedMaterial Appearance
{
material Material
{
diffuseColor 0.0
0.4 0.5
}
}
geometry DEF Bed Box
{
size 7.0 1.0 5.0
}
}
Transform
{
translation -2.0 0.65
-1.0
scale
0.2 0.2 0.2
rotation
0.0 1.0 0.0
-1.57
children
[
Shape
{
appearance DEF
PillowAppearance Appearance
{
material Material
{
diffuseColor
0.8 0.0 0.0
}
}
geometry USE Bed
}
]
}
Transform
{

translation -2.0 0.65 1.0


scale
0.2 0.2 0.2
rotation
0.0 1.0 0.0
-1.57
children
[
Shape
{
appearance USE
PillowAppearance
geometry USE Bed
}
]
}
]
},
#kursi belajar
Transform
{
translation -6.5 2.3 -4.55
scale
0.2 0.33 0.3
rotation
0.0 1.0 0.0 4.71
children
[
DEF Chair Inline
{
url "kursi.wrl"
}
]
},
Transform
{
translation -8.75 3.0 -4.5
scale
0.5 0.4 0.5
rotation
0.0 1.0 0.0 4.71
children
[
# meja belajar
Inline
{
url "meja.wrl"
}
Transform
{
translation -3.0 0.5
-0.15

scale

10.0 10.0

10.0
rotation

0.0

1.0 0.0

1.57
children
[
#lampu belajar
Inline
{
url "lampu.wrl"
}
]
},
]
},
# almari
Transform
{
translation 9.5 2.5 -5.75
scale
1.0 1.0 1.0
rotation
0.0 1.0 0.0
-1.57
children
[
Inline
{
url "almari.wrl"
}
]
},
# meja kecil
Transform
{
translation 7.0 1.5 2.45
scale
0.3 0.2 0.3
children
[
Inline
{
url "meja.wrl"
}
]
},
# sofa santai
Transform
{

translation 7.0 0.5 -1.0


children
[
DEF Sofa Inline
{
url "sofa.wrl"
}
]

}
geometry Box
{
size 9 15 0.5
}
}
]
},

},
]
Transform
{
translation 7.0 0.5 5.5
rotation
0.0 1.0 0.0 3.14
children USE Sofa
},
]

}
#VRML V2.0 utf8
# file name: lampu.wrl
# The VRML 2.0 Sourcebook
Group {
children [

}
#VRML V2.0 utf8
# file name: kursi.wrl
# kursi warna kuning
Group
{
children
[
Inline
{
url "setkursi.wrl"
}

Transform
{
translation 0.0 0.5 -3.25
children
[
Shape
{
appearance Appearance
{
material Material
{
diffuseColor 1.0
1.0 0.0
}

DEF MoveLamp PlaneSensor { },


DEF Lamp Transform {
children [
Shape {
appearance DEF White
Appearance {
material Material { }
}
geometry Cylinder {
radius 0.1
height 0.01
}
},
# Base - First arm joint
Group {
children [
DEF MoveFirstArm
SphereSensor {
offset 1.0 0.0 0.0 -0.7
},
DEF FirstArm Transform {
translation 0.0 0.15 0.0
rotation 1.0 0.0 0.0 -0.7
center
0.0 -0.15 0.0
children [
# Lower arm
DEF LampArm Shape {

appearance USE White


geometry Cylinder {
radius 0.01
height 0.3
}
},
# First arm - second arm

height 0.15
bottomRadius
0.12
bottom FALSE
}
},
# Light bulb
Transform {
translation 0.0

joint
Group {
children [
DEF MoveSecondArm
SphereSensor {
offset 1.0 0.0 0.0 1.9
},
DEF SecondArm
Transform {
translation 0.0 0.3 0.0
rotation 1.0 0.0 0.0
1.9
center 0.0 -0.15 0.0
children [
# Second arm
USE LampArm,
# Second arm - shade
joint
Group {
children [
DEF
MoveLampShade SphereSensor {
offset 1.0 0.0 0.0
-1.25
},
DEF LampShade
Transform {
translation 0.0
0.075 0.0
rotation 1.0 0.0
0.0 -1.25
center 0.0 0.075
0.0
children [
# Shade
Shape {
appearance
USE White
geometry Cone
{

-0.05 0.0
children Shape
{
appearance
USE White
geometry
Sphere {
radius 0.05
}
}
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}

#VRML V2.0 utf8


# file name: lamputembok.wrl
# lampu tembok bentuk kerucut
Group
{
children
[
Transform

{
rotation 1.0 0.0 0.0 3.14
children
[
Shape
{
appearance Appearance
{
material Material
{
diffuseColor 1.0
1.0 0.0
}
}
geometry Cone
{
bottomRadius 0.75
height
2.0
}
}
]
},
Transform
{
translation 0.0 1.0 0.0
children
[
PointLight
{
location 0.0 2.0 0.0
color 1.0 0.4 0.2
intensity 0.8
attenuation 0.0 0.6 0.0
radius 10.0
}
]
}
]
}

#VRML V2.0 utf8


# file name: meja.wrl
# meja kuning dengan 4 kaki
Group
{

children
[
# atas meja
Shape
{
appearance DEF Yellow
Appearance
{
material Material
{
diffuseColor 1.0 1.0 0.0
}
}
geometry Box { size 9 1.0
7}
},
#kaki1
Transform
{
translation -3.5 -3.5 2.5
children DEF TableLeg Shape
{
appearance USE Yellow
geometry Cylinder
{
radius 0.5
height 7
}
}
},
#kaki2
Transform
{
translation 3.5 -3.5 2.5
children USE TableLeg
},
#kaki3
Transform
{
translation -3.5 -3.5 -2.5
children USE TableLeg
},
#kaki4
Transform
{
translation 3.5 -3.5 -2.5
children USE TableLeg

},
]
}

#VRML V2.0 utf8


# file name: ruang.wrl
Group
{
children
[
# background ruang
Background
{
skyColor
[
0.0 0.2 0.7
0.0 0.5 1.0
1.0 1.0 1.0
]
skyAngle [ 1.309 1.571 ]
groundColor
[
0.1 0.1 0.0
0.4 0.25 0.2
0.6 0.6 0.6
]
}
# lantai putih
Shape
{
appearance DEF FloorApp
Appearance
{
material Material
{
diffuseColor 1.0 1.0 1.0
}
}
geometry DEF FloorGeo Box
{
size 21.0 0.2 14.0
}
},

Transform
{
translation -7.0 3.5 -7.0
children
[
DEF BrickWall Inline
{
url "tembok.wrl"
}
]
},
Transform
{
translation 7.0 3.5 -7.0
children USE BrickWall
},

Transform
{
translation 0.0 3.5 7.0
children USE BrickWall
},
Transform
{
translation -7.0 3.5 7.0
children USE BrickWall
},
Transform
{
translation 7.0 3.5 7.0
children USE BrickWall
},

Transform
{
translation -10.5 3.5 -3.5
rotation 0.0 1.0 0.0 1.57
children USE BrickWall
},

Transform
{
translation -10.5 3.5 3.5
rotation 0.0 1.0 0.0 1.57
children
[
USE BrickWall
DEF Light Inline
{
url "lamputembok.wrl"
}
]
},

[
Shape
{
appearance DEF Yellow
Appearance
{
material Material
{
diffuseColor 1.0 1.0 0.0
}
}
geometry Box { size 9 1.0
7}
},

Transform
{
translation 10.5 3.5 -3.5
rotation 0.0 1.0 0.0 1.57
children USE BrickWall
},

Transform
{
translation -3.5 -3.5 2.5
children DEF TableLeg Shape
{
appearance USE Yellow
geometry Box
{
size 1.0 7 1.0
}
}
},

Transform
{
translation 10.5 3.5 3.5
rotation 0.0 1.0 0.0 1.57
children
[
USE BrickWall
DEF Light Inline
{
url "lamputembok.wrl"
}
]

Transform
{
translation 3.5 -3.5 2.5
children USE TableLeg
},
]
}

},
]
}

#VRML V2.0 utf8


# file name: setkursi.wrl
Group
{
children

#VRML V2.0 utf8


# file name: sofa.wrl
# A green sofa built
Group
{
children
[
# sofa seat
Shape

appearance DEF Green


Appearance
{
material Material
{
diffuseColor 0.0 1.0 0.0
}
}
geometry Box
{
size 7.0 1.0 3.0
}
}
# sofa back
Transform
{
translation 0.0 0.75 -1.0
children
[
Shape
{
appearance USE Green
geometry Box
{
size 7.0 2.5 1.0
}

]
},
]
}

#VRML V2.0 utf8


# file name: tembok.wrl
# Brick wall
Shape {
appearance Appearance {
material Material { }
texture ImageTexture {
url "brick.jpg"
}
textureTransform
TextureTransform {
scale 5.0 5.0
}
}
geometry Box { size 7.0 7.0
0.5 }
}

You might also like