Extruded room wall

How to create an extruded wall

The room wall that you have clicked on was formed using an extrusion. Basically, an extrusion constructs an object from a list of points. The VRML code to construct the wall is:

geometry DEF my_room Extrusion {
convex FALSE
crossSection [
-1 0, -5 0,
-5 10,
5 10,
5 0, 1 0,
1 .1, 4.9 .1,
4.9 9.9, -4.9 9.9,
-4.9 .1, -1 .1,
-1 0
]
spine [
# straight line
0.0 0.0 0.0,
0.0 2.0 0.0
]

The crossSection field specifies the list of points. Basically, you list all the points of your object (in this case, all the interior and exterior points of the wall). The spine field specifies how to create an extruded shape from the crosssection. In the code above, the spine is described as starting from the origin and extruding 2 units in the Y axis.

You will also note that the face of the wall contains a textured surface. the material node contains a ImageTexture field that maps a texture image to the face of an object. The relevant code for texture mapping in the appearance node is as follows:

appearance Appearance {
material Material {
diffuseColor 1.0 0.9 0.7
}
texture ImageTexture {
url "stonewal.jpg"
}
textureTransform TextureTransform {
scale 16 8
}

Note that the diffuseColor attribute is overwridden by the ImageTexture attribute.

show me the basic wall without the rest of the world