# Analyze

`verb.eval.Analyze`

**CLASS**

`Analyze`

contains static immutable methods for analyzing NURBS geometry. This includes, but is not limited to:

- Determining the closest points on NURBS geometry to given points
- Determining knot structure
- Evaluating geometric properties (like arc length) of NURBS curves
- Determining the parameter of at arc length of NURBS curves

## knotMultiplicities

**STATIC METHOD**

`knotMultiplicities(knots : KnotArray) : Array<KnotMultiplicity>`

Determine the multiplicities of the values in a knot vector

**params**

- array of nondecreasing knot values

**returns**

- Array of KnotMultiplicity objects

## isRationalSurfaceClosed

**STATIC METHOD**

`isRationalSurfaceClosed(surface : NurbsSurfaceData, uDir : Bool) : Bool`

Determine whether a NURBS surface is "closed" in the given direction. Essentially, this determines if the end of the surface in the given direction is continuous at its end. This is an experimental method and not hightly reliable.

**params**

- The NURBS surface
- Whether to analyze the continuity in the U direction or the V direction

**returns**

- Whether the surface is continuous or not in the supplied direction.

## rationalSurfaceClosestPoint

**STATIC METHOD**

`rationalSurfaceClosestPoint(surface : NurbsSurfaceData, p : Point) : Point`

Determine the closest point on a NURBS surface to a given point. *This is an experimental method and not hightly reliable.*

**params**

- The NURBS surface
- The point to which we're trying to locate the closest point on the surface

**returns**

- The closest point on the surface, bounded by the parametric range of the surface

## rationalSurfaceClosestParam

**STATIC METHOD**

`rationalSurfaceClosestParam(surface : NurbsSurfaceData, p : Point) : UV`

Determine the closest parameters on a NURBS surface to a given point. *This is an experimental method and not hightly reliable.*

**params**

- The NURBS surface
- The point to which we're trying to locate the closest parameters on the surface

**returns**

- The closest parameters on the surface, bounded by the parametric domain of the surface

## rationalCurveClosestPoint

**STATIC METHOD**

`rationalCurveClosestPoint(curve : NurbsCurveData, p : Point) : Point`

Determine the closest point on a NURBS curve to a given point.

**params**

- The NURBS curve
- The point to which we're trying to locate the closest point on the curve

**returns**

- The closest point on the surface, bounded by the parametric domain of the surface

## rationalCurveClosestParam

**STATIC METHOD**

`rationalCurveClosestParam(curve : NurbsCurveData, p : Point) : Float`

Determine the closest parameters on a NURBS curve to a given point.

**params**

- The NURBS curve
- The point to which we're trying to locate the closest parameter on the curve

**returns**

- The closest parameter on the curve, bounded by the parametric domain of the curve

## rationalCurveParamAtArcLength

**STATIC METHOD**

`rationalCurveParamAtArcLength(curve : NurbsCurveData, len : Float, tol : Float, e-3 : undefined, beziers : Array<NurbsCurveData>, bezierLengths : Array<Float>) : Float`

Approximate the parameter at a given arc length on a NURBS curve

**params**

- The curve for which to do the procedure
- The arc length for which to do the procedure
- the tolerance - increasing the tolerance can make this computation quite expensive
- The curve decomposed into a sequence of beziers - this will be computed if omitted but speeds up the computation computed repeatedly
- The lengths of the beziers after being decomposed

**returns**

- The parameter

## rationalBezierCurveParamAtArcLength

**STATIC METHOD**

`rationalBezierCurveParamAtArcLength(curve : NurbsCurveData, len : Float, tol : Float, totalLength : Float) : Float`

Get the curve parameter at an arc length

**params**

- NurbsCurveData object representing the curve
- the arc length to find the parameter
- the tolerance - increasing the tolerance can make this computation quite expensive
- the total length of the curve, if already computed

**returns**

- the parameter

## rationalCurveArcLength

**STATIC METHOD**

`rationalCurveArcLength(curve : NurbsCurveData, u : Float, gaussDegIncrease : Int)`

Approximate the length of a rational curve by gaussian quadrature - assumes a smooth curve

**params**

- NurbsCurveData object representing the curve
- the parameter at which to approximate the length
- the degree of gaussian quadrature to perform - a higher number yields a more exact result

**returns**

- the approximate length

## rationalBezierCurveArcLength

**STATIC METHOD**

`rationalBezierCurveArcLength(curve : NurbsCurveData, u : Float, gaussDegIncrease : Int) : Float`

Approximate the length of a rational bezier curve by gaussian quadrature - assumes a smooth curve

**params**

- NurbsCurveData object representing the curve
- the parameter at which to approximate the length
- the degree of gaussian quadrature to perform - a higher number yields a more exact result

**returns**

- the approximate length

# KnotMultiplicity

`verb.eval.KnotMultiplicity`

**CLASS**

A simple helper class to represent the multiplicity of a knot at a given position.

## constructor

**METHOD**

`new KnotMultiplicity(knot : Float, mult : Int)`

Create a new KnotMultiplicity object
**params**

- The knot position
- The multiplicity of the knot

## inc

**METHOD**

`inc()`

Increments the multiplicity of the knot

## knot

**PROPERTY**

`knot : Float`

The parameter of the knot

## mult

**PROPERTY**

`mult : Int`

The multiplicity (i.e. the number of repeated occurrences) of the given knot in a knot vector