## X3DObject.AddNurbsCurve

### Description

Creates a NurbsCurveList object composed of one curve. This is typically used for creating nurbs curves from a set of geometry data.

### C# Syntax

    X3DObject X3DObject.AddNurbsCurve( Object in_ControlPoints, Object in_Knots, Boolean in_bClosed, Int32 in_lDegree, siKnotParameterization in_Parameterization, siNurbsFormat in_eNurbsFormat, String in_bstrName );

### Scripting Syntax

    oReturn = X3DObject.AddNurbsCurve( ControlPoints, [Knots], [Closed], [Degree], [Parameterization], [NurbsFormat], [Name] );

### Return Value

This method returns the X3DObject parent of this new geometry, the new X3DObject is parented under this X3DObject.

### Parameters

Parameter | Type | Description
--- | --- | ---
ControlPoints | 1D or 2D Array | The control points used for creating the nurbs surface. The control points can be stored in a 1-dimensional array or in a 2-dimensional matrix (Ux4) of x,y,z,w values. The 1-dimensional array should contain a sequence of x,y,z,w values (e.g. {Xo,Yo,Zo,...X(n-1),Y(n-1),Z(n-1),W(n-1)}).
Knots | Array of Doubles | An array of knot values. Default Value: Knots derived from control points.
Closed | Boolean | Specifies whether the nurbs surface is closed or not in U direction. Default Value: False
Degree | Long | Degree of the nurbs surface in U direction. Default Value: 3
Parameterization | siKnotParameterization | The parameterization factor of the nurbs surface in U direction. Default Value: siNonUniformParameterization
NurbsFormat | siNurbsFormat | Specifies how the data is formatted. Default Value: siSINurbs
Name | String | name of object

### Examples

#### VBScript Example

    NewScene , false
    aControlVertex = Array( _
            2.44921270764475E-16,4,0,1, _
            0.130925984580936,4,0,1, _
            0.392686645860565,3.987138627451,0,1, _
            0.781619130526076,3.92944824405423,0,1, _
            1.16300456042221,3.83391512600961,0,1, _
            1.53319488189217,3.70145930948035,0,1, _
            1.88861828877126,3.53335641633986,0,1, _
            2.22585364684673,3.33122536952072,0,1, _
            2.54165271631229,3.09701280083833,0,1, _
            2.83297430783163,2.83297430783163,0,1, _
            3.09701280083833,2.54165271631228,0,1, _
            3.33122536952073,2.22585364684672,0,1, _
            3.53335641633986,1.88861828877126,0,1, _
            3.70145930948036,1.53319488189217,0,1, _
            3.83391512600961,1.16300456042221,0,1, _
            3.92944824405423,0.781619130526073,0,1, _
            3.987138627451,0.392686645860562,0,1, _
            4,0.130925984580933,0,1, _
            4,-2.22044604925031E-15,0,1 _
    )
    aKnots = Array( 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 16  )
    set oRoot = Application.ActiveProject.ActiveScene.Root
    set oNurbsCurve = oRoot.AddNurbsCurve( _
            aControlVertex, _
            aKnots,_
            False, _
            3, _
            siNonUniformParameterization, _
            siSINurbs _
    )

### See Also

NurbsCurveList