<?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>
</head>
<!--
-->
<Scene>
<WorldInfo title='LineSetComparison.x3d'/>
<Viewpoint description='8m away - note linewidth is unchanged and perspective is ambiguous' position='0 0 8'/>
<Viewpoint description='15m away - note linewidth is unchanged and perspective is ambiguous' position='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 up' position='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='false' coordIndex='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 up' position='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 2' containerField='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='0' diffuseColor='0 0 0' emissiveColor='0 0.398733 1' shininess='0.05' specularColor='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>
<!--
-->
-->
<!--
Online at
https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter06GeometryPointsLinesPolygons/LineSetComparisonIndex.html
-->
<!--
Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter06GeometryPointsLinesPolygons/LineSetComparison.x3d
-->
<!--
Color legend: X3D terminology
<X3dNode
DEF='idName' field='value'/>
matches XML terminology
<XmlElement
DEF='idName' attribute='value'/>
(Light-blue background: event-based behavior node or statement)
(Grey background inside box: inserted documentation)
(Magenta background: X3D Extensibility)
-->
<!--
For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints.
-->