<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
<X3D profile='Immersive' version='3.3 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation =' https://www.web3d.org/specifications/x3d-3.3.xsd '>
<head>
<meta name='titlecontent='LineSetComparison.x3d'/>
<meta name='creatorcontent='Don Brutzman'/>
<meta name='createdcontent='2 September 2008'/>
<meta name='modifiedcontent='20 October 2019'/>
<meta name='descriptioncontent='A simple wireframe cube, comparing two functionally equivalent nodes: IndexedLineSet (per-vertex coloring) with LineSet (per-segment coloring). Keeping track of how each node "connects the dots" is simply a book-keeping problem.'/>
<meta name='identifiercontent=' https://X3dGraphics.com/examples/X3dForWebAuthors/Chapter06GeometryPointsLinesPolygons/LineSetComparison.x3d '/>
<meta name='referencecontent=' https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter13PointsLinesFaces/Figure13.11IndexedLineSetBoxWireframe.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!--

Index for DEF node : TextAppearance

Index for Viewpoint images : Viewpoint_1, Viewpoint_2, Viewpoint_3, Viewpoint_4
-->
<Scene>
<WorldInfo title='LineSetComparison.x3d'/>
<Viewpoint description='8m away - note linewidth is unchanged and perspective is ambiguousposition='0 0 8'/>
<Viewpoint description='15m away - note linewidth is unchanged and perspective is ambiguousposition='0 0 15'/>
<Transform translation='-3 0 0'>
<!-- Rotating a single cube can help show near/far ambiguity, i.e. the optical illusion for constant-pixel-width line structures -->
<Viewpoint description='IndexedLineSet cube close upposition='0 0 5'/>
<Shape>
<!-- The IndexedLineSet builds the same cube as the LineSet,but simply uses a different approach to connect the vertices. -->
<IndexedLineSet colorPerVertex='falsecoordIndex='0 1 2 3 0 -1 4 5 6 7 4 -1 0 4 -1 1 5 -1 2 6 -1 3 7 -1'>
<Coordinate point='-1 1 1 1 1 1 1 1 -1 -1 1 -1 -1 -1 1 1 -1 1 1 -1 -1 -1 -1 -1'/>
<Color color='1 0.058824 0.117647 0.878431 0.447059 0 1 0.992157 0.141176 0.101961 0.721569 0 0.12549 0 0.901961 0.878431 0 0.843137 0.294118 0 0.341176 1 0.980392 0.992157 1 1 1'/>
</IndexedLineSet>
</Shape>
</Transform>
<Transform translation='3 0 0'>
<Viewpoint description='LineSet cube close upposition='0 0 5'/>
<Shape>
<!-- Coordinate sequence for the vertexCount='5 5 2 2 2 2' array: 0 1 2 3 0, 4 5 6 7 4, 0 4, 1 5, 2 6, 3 7. This corresponds to the IndexedLineSet coordIndex actually. -->
<LineSet vertexCount='5 5 2 2 2 2containerField='geometry'>
<Coordinate point='-1 1 1 1 1 1 1 1 -1 -1 1 -1 -1 1 1 -1 -1 1 1 -1 1 1 -1 -1 -1 -1 -1 -1 -1 1 -1 1 1 -1 -1 1 1 1 1 1 -1 1 1 1 -1 1 -1 -1 -1 1 -1 -1 -1 -1'/>
<Color color='1 0 0 1 0.5 0 1 1 0 0 1 0 1 0 0 0 0 1 0.8 0 0.8 0.3 0 0.3 1 1 1 0 0 1 1 0 0 0 0 1 1 0.5 0 0.8 0 0.8 1 1 0 0.3 0 0.3 0 1 0 1 1 1'/>
</LineSet>
</Shape>
</Transform>
<Transform translation='-3 2 0'>
<Shape>
<Text string='"IndexedLineSet"'>
<FontStyle justify='"MIDDLE" "MIDDLE"size='0.5'/>
</Text>
<Appearance DEF='TextAppearance'>
<Material ambientIntensity='0diffuseColor='0 0 0emissiveColor='0 0.398733 1shininess='0.05specularColor='0.622449 0.622449 0.622449'/>
</Appearance>
</Shape>
</Transform>
<Transform translation='3 2 0'>
<Shape>
<Text string='"LineSet"'>
<FontStyle justify='"MIDDLE" "MIDDLE"size='0.5'/>
</Text>
<Appearance USE='TextAppearance'/>
</Shape>
</Transform>
</Scene>
</X3D>
<!--

Index for DEF node : TextAppearance

Index for Viewpoint images : Viewpoint_1, Viewpoint_2, Viewpoint_3, Viewpoint_4
-->

<!-- 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)
-->

<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources and X3D Scene Authoring Hints. -->