<?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='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='CapsuleGenerator.x3d'/>
<meta name='descriptioncontent='Capsule has top and bottom hemispheres with connected sides, with adjustable parameters in the contained Script fields. A Script node computes all coordIndex and Coordinate point values. X3D source for the produced capsule also appears on the player console.'/>
<meta name='createdcontent='13 October 2014'/>
<meta name='modifiedcontent='20 October 2019'/>
<meta name='creatorcontent='Don Brutzman'/>
<meta name='referencecontent='CapsuleGenerator.log.txt'/>
<meta name='referencecontent='CapsuleComparison.x3d'/>
<meta name='infocontent='InstantReality and BSContact work'/>
<meta name='TODOcontent='H3DViewer: missing Script appinfo and new SFInt32 when running CapsuleGenerator.js; got bugtracker?'/>
<meta name='referencecontent=' https://en.wikipedia.org/wiki/Capsule_(geometry) '/>
<meta name='referencecontent=' https://en.wiktionary.org/wiki/capsule '/>
<meta name='infocontent='This tessellation is not geodesic because the polygons are computed using rectangular quadrilaterals and vertical levels rather than triangulated shortest paths.'/>
<meta name='referencecontent=' http://en.wiktionary.org/wiki/geodesic '/>
<meta name='referencecontent=' http://en.wiktionary.org/wiki/geodesic_dome '/>
<meta name='referencecontent=' https://en.wikipedia.org/wiki/Geodesic '/>
<meta name='referencecontent=' https://en.wikipedia.org/wiki/Geodesic_grid '/>
<meta name='referencecontent=' https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/tools/X3dEdit3.3/X3D/src/org/web3d/x3d/NsidedPolygon.java '/>
<meta name='referencecontent=' https://savage.nps.edu/Savage/CommunicationsAndSensors/HalfDome/HemisphereExample.x3d '/>
<meta name='referencecontent=' https://savage.nps.edu/Savage/CommunicationsAndSensors/HalfDome/HemispherePrototype.x3d '/>
<meta name='identifiercontent=' https://x3dgraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/CapsuleGenerator.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!--

Index for DEF nodes : Capsule, CapsuleGeneratorScript, COMPUTED_COORDINATE, COMPUTED_IFS

Index for Viewpoint image : Viewpoint_1
-->
<Scene>
<WorldInfo title='CapsuleGenerator.x3d'/>
<Background skyColor='0.5 1 0.9'/>
<Viewpoint description='Capsule Generatorposition='0 0 4'/>
<Shape DEF='Capsule'>
<!-- Polygonal Capsule consisting of 2 Hemispheres with connected sides -->
<!-- ROUTE information for COMPUTED_IFS node:  [from CapsuleGeneratorScript.indicesComputed to set_coordIndex ] -->
<IndexedFaceSet DEF='COMPUTED_IFScreaseAngle='0.785398'>
<!-- ROUTE information for COMPUTED_COORDINATE node:  [from CapsuleGeneratorScript.pointsComputed to set_point ] -->
<Coordinate DEF='COMPUTED_COORDINATE'/>
</IndexedFaceSet>
<Appearance>
<Material emissiveColor='0.2 0.5 0'/>
</Appearance>
</Shape>
<!-- ROUTE information for CapsuleGeneratorScript node:  [from indicesComputed to COMPUTED_IFS.set_coordIndex ] [from pointsComputed to COMPUTED_COORDINATE.set_point ] -->
<Script DEF='CapsuleGeneratorScript'
  url=' "CapsuleGenerator.js" "https://x3dgraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/CapsuleGenerator.js" '>
<field name='heighttype='SFFloatvalue='2.0accessType='initializeOnly'
 appinfo='total height, includes top and bottom hemispheres'/>

<field name='radiustype='SFFloatvalue='0.5accessType='initializeOnly'
 appinfo='for cylinder and hemispherical end caps'/>

<field name='numberOfPointstype='SFInt32value='36accessType='initializeOnly'
 appinfo='horizontal resolution for cylinder and hemispherical end caps'/>

<field name='numberOfLevelstype='SFInt32value='10accessType='initializeOnly'
 appinfo='vertical resolution for cylinder and hemispherical end caps'/>

<field name='horizontalScaletype='SFFloatvalue='1.0accessType='initializeOnly'
 appinfo='radial scale factor'/>

<field name='verticalScaletype='SFFloatvalue='1.0accessType='initializeOnly'
 appinfo='vertical scale factor'/>

<field name='toptype='SFBoolvalue='trueaccessType='initializeOnly'
 appinfo='whether to draw top hemisphere'/>

<field name='sidetype='SFBoolvalue='trueaccessType='initializeOnly'
 appinfo='whether to draw side cylinder'/>

<field name='bottomtype='SFBoolvalue='trueaccessType='initializeOnly'
 appinfo='whether to draw bottom hemisphere'/>

<field name='pointsComputedtype='MFVec3faccessType='outputOnly'
 appinfo='points for Coordinate node'/>

<field name='indicesComputedtype='MFInt32accessType='outputOnly'
 appinfo='index values for IFS'/>

<field name='traceEnabledtype='SFBoolvalue='falseaccessType='initializeOnly'
 appinfo='whether to trace output values on X3D browser console'/>

<field name='geometryTypetype='SFStringvalue='polygonsaccessType='initializeOnly'
 appinfo='determines console output node type: polygons=IndexedFaceSet, lines=IndexedLineSet, points=PointSet'/>
</Script>
<ROUTE fromNode='CapsuleGeneratorScriptfromField='indicesComputedtoNode='COMPUTED_IFStoField='set_coordIndex'/>
<ROUTE fromNode='CapsuleGeneratorScriptfromField='pointsComputedtoNode='COMPUTED_COORDINATEtoField='set_point'/>
</Scene>
</X3D>
<!--

Index for DEF nodes : Capsule, CapsuleGeneratorScript, COMPUTED_COORDINATE, COMPUTED_IFS

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

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