<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "http://www.web3d.org/specifications/x3d-3.3.dtd">
<X3D profile='Interchange' version='3.3 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation =' http://www.web3d.org/specifications/x3d-3.3.xsd '>
<head>
<meta name='titlecontent='ColorPerVertexExamples.x3d'/>
<meta name='descriptioncontent='Geometry Polygons Nodes: Color, Coordinate, ElevationGrid, Extrusion, IndexedFaceSet, IndexedLineSet, PointSet'/>
<meta name='creatorcontent='Don Brutzman'/>
<meta name='createdcontent='5 September 2005'/>
<meta name='modifiedcontent='11 January 2014'/>
<meta name='Imagecontent='ColorPerVertexExamples.png'/>
<meta name='rightscontent='Copyright (c) 2005, Daly Realism and Don Brutzman'/>
<meta name='identifiercontent=' http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter06GeometryPointsLinesPolygons/ColorPerVertexExamples.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!--

Index for DEF nodes : FourColors, FourColorsRGBA, FourPoints

Index for Viewpoint image : Viewpoint_1
-->
<Scene>
<Viewpoint description='ColorPerVertex Examplesposition='0 0 6'/>
<Background groundColor='0.1 0.1 0.1skyColor='0.1 0.1 0.1'/>
<Transform translation='-0.5 0 0'>
<Transform translation='-3 0 0'>
<Shape>
<!-- Default settings: colorPerVertex='true' -->
<IndexedFaceSet colorIndex='0 1 2 3 0 -1coordIndex='0 1 2 3 0 -1'>
<Coordinate DEF='FourPointspoint='0 0 0 1 0 0 1 1 0 0 1 0'/>
<Color DEF='FourColorscolor='1 0 0 0 1 0 0 0 1 0.8 0.8 0.8'/>
</IndexedFaceSet>
</Shape>
</Transform>
<Transform translation='-1 0 0'>
<Shape>
<!-- Note that only 4 points are needed to create a 4-vertex polygon. -->
<IndexedFaceSet colorPerVertex='falsecolorIndex='2coordIndex='0 1 2 3 0 -1'>
<Coordinate USE='FourPoints'/>
<ColorRGBA DEF='FourColorsRGBAcolor='1 0 0 1 0 1 0 1 0 0 1 0.5 0.8 0.8 0.8 0'/>
</IndexedFaceSet>
</Shape>
</Transform>
<Transform translation='1 0 0'>
<Shape>
<!-- Student TODO: try different color indices. -->
<IndexedLineSet colorIndex='0 1 2 3 0 -1coordIndex='0 1 2 3 0 -1'>
<Coordinate USE='FourPoints'/>
<Color USE='FourColors'/>
</IndexedLineSet>
</Shape>
</Transform>
<Transform translation='3 0 0'>
<Shape>
<!-- Note that 5 points are needed to create 4 complete line segments. -->
<IndexedLineSet colorPerVertex='falsecolorIndex='0coordIndex='0 1 2 3 0 -1'>
<Coordinate USE='FourPoints'/>
<Color USE='FourColors'/>
</IndexedLineSet>
</Shape>
</Transform>
</Transform>
</Scene>
</X3D>
<!--

Index for DEF nodes : FourColors, FourColorsRGBA, FourPoints

Index for Viewpoint image : Viewpoint_1
-->

<!-- Color key: <X3dNode DEF='idName' field='value'/> matches <XmlElement DEF='idName' attribute='value'/>
(Light blue background: behavior node) (Grey background: inserted documentation) (Magenta background: X3D Extensibility)
-->

<!-- Additional help information about X3D scenes: X3D Resources, X3D Scene Authoring Hints and X3D Tooltips -->