<?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='Interchange'  version='3.3 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation =' https://www.web3d.org/specifications/x3d-3.3.xsd ' >
<head>
<component level='3name='NURBS'/>
<meta name='titlecontent=' NurbsSweptSurfaceExample.x3d '/>
<meta name='descriptioncontent='X3D Architecture example: NurbsSweptSurface demonstration.'/>
<meta name='creatorcontent='Doug Sanden and Don Brutzman'/>
<meta name='createdcontent='13 April 2022'/>
<meta name='modifiedcontent='22 November 2023'/>
<meta name='Imagecontent='NurbsSweptSurfaceExample.png' />
<meta name='specificationSectioncontent='X3D Architecture, 27 NURBS component, 27.4.11 NurbsSweptSurface'/>
<meta name='specificationUrlcontent=' https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/nurbs.html#NurbsSweptSurfaceExample '/>
<meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/NurbsSweptSurfaceExample.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!--

to top <!-- Index for DEF nodes: CROSSSECTION, CYAN, GRAY, MAGENTA, TRAJECTORY, TRAJECTORYCONTROLLINES, TRAJECTORYCONTROLPTS

Index for Viewpoint node: Viewpoint_1
-->
<Scene>
<Group>
<Shape>
<LineSet vertexCount='2containerField='geometry'>
<Coordinate point='0 0 0 4 0 0'/>
</LineSet>
<Appearance>
<Material emissiveColor='1 0 0'/>
<LineProperties linewidthScaleFactor='4containerField='lineProperties'/>
</Appearance>
</Shape>
<Shape>
<LineSet vertexCount='2containerField='geometry'>
<Coordinate point='0 0 0 0 4 0'/>
</LineSet>
<Appearance>
<Material emissiveColor='0 1 0'/>
<LineProperties linewidthScaleFactor='4containerField='lineProperties'/>
</Appearance>
</Shape>
<Shape>
<LineSet vertexCount='2containerField='geometry'>
<Coordinate point='0 0 0 0 0 4'/>
</LineSet>
<Appearance>
<Material emissiveColor='0 0 1'/>
<LineProperties linewidthScaleFactor='4containerField='lineProperties'/>
</Appearance>
</Shape>
</Group>
<Background skyColor='1 1 1transparency='1.0'/>
<Viewpoint/>
<Transform>
<Shape>
<Appearance>
<Material transparency='.5'/>
</Appearance>
<NurbsSweptSurface solid='falsecontainerField='geometry'>
<NurbsCurve DEF='TRAJECTORYcontainerField='trajectoryCurveknot='0 0 0 1 2 3 4 5 5 5weight='1 1 1 1 1 1 1'>
<Coordinate DEF='TRAJECTORYCONTROLPTScontainerField='controlPointpoint='0 2 4 0 2 2 0 0 2 2 0 2 2 0 0 2 4 0 2 4 2'/>
<!-- Coordinate DEF='TRAJECTORYCONTROLPTS' containerField='controlPoint' point='4 0 2, 2 0 2, 2 0 0, 2 2 0, 0 2 0, 0 2 4, 2 2 4' / -->
</NurbsCurve>
<NurbsCurve2D containerField='crossSectionCurvecontrolPoint='-.25 0 .5 0 .5 .25 0 .5 .5 .75 .5 1 -.25 1 -.25 0knot='0 0 0 1 2 3 4 5 6 6 6tessellation='30weight='1 1 1 1 1 1 1 1'/>
</NurbsSweptSurface>
</Shape>
</Transform>
<Transform>
<Shape>
<Appearance>
<Material DEF='CYANdiffuseColor='0 .8 .8'/>
<LineProperties linewidthScaleFactor='6containerField='lineProperties'/>
</Appearance>
<!-- To convert a NurbsCurve2D control curve to a displayable NurbsCurve 1. rename element NurbsCurve2D -> NurbsCurve 2. cut controlPoint= field and paste into child node CoordinateDouble point field 3. edit point field adding a 3rd (z) = 0 to each xy point -->
<NurbsCurve DEF='CROSSSECTIONknot='0 0 0 1 2 3 4 5 6 6 6weight='1 1 1 1 1 1 1 1containerField='geometry'>
<CoordinateDouble containerField='controlPointpoint='-0.25 0 0 0.5 0 0 0.5 0.25 0 0 0.5 0 0.5 0.75 0 0.5 1 0 -0.25 1 0 -0.25 0 0'>
<!-- point array (8 tuples, 24 total doubles) has closed geometry with coincident endpoints -->
</CoordinateDouble>
</NurbsCurve>
</Shape>
<Shape>
<Appearance>
<Material DEF='MAGENTAdiffuseColor='.8 0 .8'/>
<LineProperties linewidthScaleFactor='6containerField='lineProperties'/>
</Appearance>
<NurbsCurve USE=' TRAJECTORYcontainerField='geometry'/>
</Shape>
<Shape>
<Appearance>
<Material DEF='GRAYdiffuseColor='.5 .5 .5transparency='.5'/>
<LineProperties linewidthScaleFactor='6containerField='lineProperties'/>
</Appearance>
<NurbsCurve DEF='TRAJECTORYCONTROLLINESknot='0 0 1 2 3 4 5 6 6order='2weight='1 1 1 1 1 1 1containerField='geometry'>
<Coordinate USE=' TRAJECTORYCONTROLPTScontainerField='controlPoint'/>
</NurbsCurve>
</Shape>
</Transform>
</Scene>
</X3D>
<!--

to top <!-- Index for DEF nodes: CROSSSECTION, CYAN, GRAY, MAGENTA, TRAJECTORY, TRAJECTORYCONTROLLINES, TRAJECTORYCONTROLPTS

Index for Viewpoint node: Viewpoint_1
-->
-->

<!-- Online at
https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/NurbsSweptSurfaceExampleIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/NurbsSweptSurfaceExample.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)
-->

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