Building shapes out of points, lines, and faces
lnplot.wrl
#VRML V2.0 utf8
Viewpoint {
position 0.0 0.0 10.0
description "Entry view"
}
NavigationInfo {
type [ "EXAMINE", "ANY" ]
headlight TRUE
}
Transform {
translation -5.0 -4.0 0.0
children [
# Axes
Shape {
appearance Appearance {
material Material {
diffuseColor 1.0 1.0 1.0
emissiveColor 1.0 1.0 1.0
}
}
geometry IndexedLineSet {
coord Coordinate {
point [
0.0 0.0 0.0, 10.0 0.0 0.0, 0.0 8.0 0.0
]
}
coordIndex [
0, 1, -1, 0, 2, -1
]
}
}
# Line plot with different color lines
Shape {
appearance Appearance {
material Material {
diffuseColor 0.0 1.0 0.0
emissiveColor 0.0 1.0 0.0
}
}
geometry IndexedLineSet {
coord Coordinate {
point [
1.0 1.0 0.0, 2.0 4.0 0.0,
3.0 5.0 0.0, 4.0 4.0 0.0,
5.0 6.0 0.0, 6.0 7.0 0.0,
7.0 5.0 0.0, 8.0 6.0 0.0,
9.0 4.0 0.0, 10.0 3.0 0.0,
]
}
coordIndex [
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1,
]
}
}
Shape {
appearance Appearance {
material Material {
diffuseColor 1.0 1.0 0.0
emissiveColor 1.0 1.0 0.0
}
}
geometry IndexedLineSet {
coord Coordinate {
point [
1.0 3.0 0.0, 2.0 2.0 0.0,
3.0 2.0 0.0, 4.0 1.0 0.0,
5.0 2.0 0.0, 6.0 4.0 0.0,
7.0 3.0 0.0, 8.0 5.0 0.0,
9.0 5.0 0.0, 10.0 6.0 0.0,
]
}
coordIndex [
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1,
]
}
}
]
}