- 实体坐标系(加x,y,z标志)
<X3D>
<Scene>
<Transform id="CoordinateAxes">
<shape>
<appearance>
<material diffuseColor='1 1 0.9'></material>
</appearance>
<sphere radius='0.1'/>
</shape>
<!-- Vertical Y arrow and label -->
<Group DEF='ArrowGreen'>
<Transform translation='0 0.5 0'>
<Shape>
<!-- radius原来是.025,height原来为1.0 -->
<Cylinder DEF='ArrowCylinder' bottom='false' radius='.05' height='1.0 ' top='false'/>
<Appearance DEF='Green'>
<Material diffuseColor='.1 .6 .1' emissiveColor='.05 .2 .05'/>
</Appearance>
</Shape>
<Transform translation='0 0.5 0'>
<Shape>
<!-- radius原来是.10,height原来为.1 -->
<Cone DEF='ArrowCone' bottomRadius='.10' height='.15'/>
<Appearance USE='Green'/>
</Shape>
</Transform>
<Billboard>
<Shape isPickable="false" DEF="AXIS_LABEL_Y">
<Text string="Y" solid="false">
<FontStyle size="0.6"></FontStyle>
</Text>
<Appearance USE='Green'></Appearance>
</Shape>
</Billboard>
</Transform>
</Group>
<Transform rotation='0 0 1 -1.57079'>
<!-- Horizontal X arrow and label -->
<Group DEF='ArrowRed'>
<Transform translation='0 0.5 0'>
<Shape>
<Cylinder USE='ArrowCylinder'/>
<Appearance DEF='Red'>
<Material diffuseColor='.7 .1 .1' emissiveColor='.33 0 0'/>
</Appearance>
</Shape>
<Transform translation='0 0.5 0'>
<Shape>
<Cone USE='ArrowCone'/>
<Appearance USE='Red'/>
</Shape>
</Transform>
<Billboard>
<Shape isPickable="false" DEF="AXIS_LABEL_Y">
<Text string="X" solid="false">
<FontStyle size="0.6"></FontStyle>
</Text>
<Appearance USE='Red'></Appearance>
</Shape>
</Billboard>
</Transform>
</Group>
</Transform>
<Transform rotation='1 0 0 1.57079'>
<!-- Perpendicular Z arrow and label, note right-hand rule -->
<Group DEF='ArrowBlue'>
<Transform translation='0 0.5 0'>
<Shape>
<Cylinder USE='ArrowCylinder'/>
<Appearance DEF='Blue'>
<Material diffuseColor='.3 .3 1' emissiveColor='.1 .1 .33'/>
</Appearance>
</Shape>
<Transform translation='0 0.5 0'>
<Shape>
<Cone USE='ArrowCone'/>
<Appearance USE='Blue'/>
</Shape>
</Transform>
<Billboard>
<Shape isPickable="false" DEF="AXIS_LABEL_Y">
<Text string="Z" solid="false">
<FontStyle size="0.6"></FontStyle>
</Text>
<Appearance USE='Blue'></Appearance>
</Shape>
</Billboard>
</Transform>
</Group>
</Transform>
</Transform>
</Scene>
</X3D>
2.线坐标系
3.坐标网格
<X3D>
<scene>
<Shape id="plane" isPickable="false">
<Appearance DEF="GRID_APPEARANCE" sortKey="-1">
<Material diffuseColor='0.0 0.0 0.0' specularColor='0.0 0.0 0.0' emissiveColor='0.3 0.3 0.3'></Material>
<DepthMode id="depthMode" readOnly="false"></DepthMode>
</Appearance>
<Plane id="gridPlane" solid="false" size='10 10' primType='LINES' subdivision='20 20'>
</Plane>
</Shape>
<Shape id="planeBorder" isPickable="false">
<Appearance >
<Material diffuseColor='0.0 0.0 0.0' specularColor='0.0 0.0 0.0' emissiveColor='0.3 0.3 0.3'></Material>
<DepthMode readOnly="false"></DepthMode>
</Appearance>
<IndexedLineSet coordIndex="0 1 2 3 0 -1" colorPerVertex="false" lit="false">
<Coordinate id="gridBordersCoordNode" point="-10.0 -10.0 0.0 , -10.0 10.0 0.0 , 10.0 10.0 0.0, 10.0 -10.0 0.0"/>
</IndexedLineSet>
</Shape>
</scene>
</X3D>