| 1 |
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 4.0//EN" "https://www.web3d.org/specifications/x3d-4.0.dtd">
|
| 3 | <X3D profile='Interchange' version='4.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-4.0.xsd'> |
| 4 | <head> |
| 5 | <component level='3' name='NURBS'/> |
| 6 | <meta name='title' content=' NurbsSwungSurfaceExample.x3d '/> |
| 7 | <meta name='description' content='X3D Architecture example: NurbsSwungSurface demonstration.'/> |
| 8 | <meta name='creator' content='Doug Sanden and Don Brutzman'/> |
| 9 | <meta name='created' content='13 April 2022'/> |
| 10 | <meta name='modified' content='28 September 2025'/> |
| 11 |
<meta name='Image' content='NurbsSwungSurfaceExample.png' />
|
| 12 | <meta name='specificationSection' content='X3D Architecture, 27 NURBS component, 27.4.11 NurbsSwungSurface'/> |
| 13 | <meta name='specificationUrl' content='https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/nurbs.html#NurbsSwungSurface'/> |
| 14 | <meta name='identifier' content=' https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/NurbsSwungSurfaceExample.x3d '/> |
| 15 | <meta name='generator' content='X3D-Edit 4.0, https://www.web3d.org/x3d/tools/X3D-Edit'/> |
| 16 | <meta name='license' content='../license.html'/> |
| 17 | </head> |
| 18 | <Scene> |
| 19 | <Group> |
| 20 | <Shape> |
| 21 | <LineSet vertexCount='2' containerField='geometry'> |
| 22 | <Coordinate point='0 0 0 4 0 0'/> |
| 23 | </LineSet> |
| 24 | <Appearance> |
| 25 | <Material emissiveColor='1 0 0'/> |
| 26 | <LineProperties linewidthScaleFactor='4' containerField='lineProperties'/> |
| 27 | </Appearance> |
| 28 | </Shape> |
| 29 | <Shape> |
| 30 | <LineSet vertexCount='2' containerField='geometry'> |
| 31 | <Coordinate point='0 0 0 0 4 0'/> |
| 32 | </LineSet> |
| 33 | <Appearance> |
| 34 | <Material emissiveColor='0 1 0'/> |
| 35 | <LineProperties linewidthScaleFactor='4' containerField='lineProperties'/> |
| 36 | </Appearance> |
| 37 | </Shape> |
| 38 | <Shape> |
| 39 | <LineSet vertexCount='2' containerField='geometry'> |
| 40 | <Coordinate point='0 0 0 0 0 4'/> |
| 41 | </LineSet> |
| 42 | <Appearance> |
| 43 | <Material emissiveColor='0 0 1'/> |
| 44 | <LineProperties linewidthScaleFactor='4' containerField='lineProperties'/> |
| 45 | </Appearance> |
| 46 | </Shape> |
| 47 | </Group> |
| 48 | <Background skyColor='1 1 1' transparency='1.0'/> |
| 49 | <Viewpoint/> |
| 50 | <Transform> |
| 51 | <Shape> |
| 52 | <Appearance> |
| 53 | <Material transparency='.5'/> |
| 54 | </Appearance> |
| 55 | <NurbsSwungSurface containerField='geometry'> |
| 56 | <NurbsCurve2D containerField='profileCurve' controlPoint='.5 .25 0 .25 0 1 .25 1 .25 2 0 2' knot='0 0 0 .25 .5 .75 1 1 1' tessellation='8' weight='1 1 1 1 1 1'/> |
| 57 | <NurbsCurve2D containerField='trajectoryCurve' controlPoint='2 -.5 1.5 -.25 1.5 -.25 1.5 1.0 2.0 1.5 2.0 2.0 1.0 2.0 1.0 1.5 -.25 1.5 -.25 2.0 -.5 2.0' knot='0 0 0 1 2 3 4 5 6 7 8 9 9 9' tessellation='8' weight='1 1 1 1 1 1 1 1 1 1 1'/> |
| 58 | </NurbsSwungSurface> |
| 59 | </Shape> |
| 60 | </Transform> |
| 61 | <Transform> |
| 62 | <Shape> |
| 63 | <Appearance> |
| 64 | <Material DEF='CYAN' diffuseColor='0 .8 .8'/> |
| 65 | <LineProperties linewidthScaleFactor='6' containerField='lineProperties'/> |
| 66 | </Appearance> |
| 67 | <!-- 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 --> |
| 68 | <NurbsCurve DEF='PROFILE' knot='0 0 0 .25 .5 .75 1 1 1' weight='1 1 1 1 1 1' containerField='geometry'> |
| 69 | <CoordinateDouble containerField='controlPoint' point='.5 .25 0 0 .25 0 0 1 0 .25 1 0 .25 2 0 0 2 0'/> |
| 70 | </NurbsCurve> |
| 71 | </Shape> |
| 72 | <Shape> |
| 73 | <Appearance> |
| 74 | <Material DEF='MAGENTA' diffuseColor='.8 0 .8'/> |
| 75 | <LineProperties linewidthScaleFactor='6' containerField='lineProperties'/> |
| 76 | </Appearance> |
| 77 | <NurbsCurve DEF='TRAJECTORY' knot='0 0 0 1 2 3 4 5 6 7 8 9 9 9' weight='1 1 1 1 1 1 1 1 1 1 1' containerField='geometry'> |
| 78 | <CoordinateDouble containerField='controlPoint' point='2 -.5 0 1.5 -.25 0 1.5 -.25 0 1.5 1.0 0 2.0 1.5 0 2.0 2.0 0 1.0 2.0 0 1.0 1.5 0 -.25 1.5 0 -.25 2.0 0 -.5 2.0 0'/> |
| 79 | </NurbsCurve> |
| 80 | </Shape> |
| 81 | </Transform> |
| 82 | </Scene> |
| 83 | </X3D> |
<!--
Color-coding 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.
-->