Sets Of Triangles, Part 2D

TriangleSet2D • Attributes

Three separate triangle sets stacked on top of on another. Each set contains a different number of triangles.

Triangles in a set do not have to be connected.

 

Rotate the vrignette to view the geometry.

<x3d>

<scene>

<!-- World Info -->
<worldInfo title="X3D TriangleSet2D Example">
</worldInfo>

<!-- Navigation Info -->
<navigationInfo headlight="true">
</navigationInfo>


<!-- Avatar Viewpoint -->
<viewpoint position="0.0 1.5 7.0" centerOfRotation="0.0 0.0 0.0">
</viewpoint>

<!-- Shapes -->
<shape>
<appearance>
<material diffuseColor="0.75 0.0 0.75" specularColor="0.05 0.05 0.05" shininess="0.15">
</material>
</appearance>
<triangleSet2d vertices="0.0 1.0, -0.5 0.0, 0.5 0.0, 1.5 1.0, 1.0 0.0, 2.0 0.0, -1.0 0.0, -1.5 1.0, -2.0 0.0" solid="false">
</triangleSet2d>
</shape>

<shape>
<appearance>
<material diffuseColor="0.75 0.75 0.0" specularColor="0.05 0.05 0.05" shininess="0.15">
</material>
</appearance>
<triangleSet2d vertices="0.25 1.0, 1.25 1.0, 0.75 2.0, -0.25 1.0, -0.75 2.0, -1.25 1.0" solid="false">
</triangleSet2d>
</shape>

<transform>
<shape>
<appearance>
<material diffuseColor="0.0 0.75 0.75" specularColor="0.05 0.05 0.05" shininess="0.15">
</material>
</appearance>
<triangleSet2d vertices="-0.5 2.0, 0.5 2.0, 0.0 3.0" solid="false">
</triangleSet2d>
</shape>

<!-- Scene Background -->
<background skyColor="0.20 0.20 0.20" groundColor="0.20 0.20 0.20">
</background>

</scene>

</x3d>