3.4. NURBS
Working with NURBS Curves and NURBS Surfaces in Grasshopper
NURBS
NURBS (Non-Uniform Rational B-Splines) are mathematical representations that can accurately model any shape from a simple 2D Line
, Circle
, Arc
, or Box
to the most complex 3D free-form organic surface or solid.
NURBS Curves
You can find the most common operations with NURBS Curves in:
- Curve > Primitives
Under Spline tab, you will find some other more advanced free-form NURBS Curves components:
- Curve > Spline
NURBS Curves are defined by a number of Control Points that influences the shape of the curve.
They are defined also by a degree which is an integer number in between 1 and 11.
By changing the Periodic value to True or False, you will be able to make this curve open or close.
Interpolate curve
They are different than NURBS curves since the curve is passing through each one of the Control Points.
Here is also possible to define the tangent vector at Start and End Points of the curve by specifying a vector with a certain directionality.
Kinky curve
Similar to Interpolate curve. The difference is the angle threshold. If the angle in between one point to the next one is above the angle threshold, the curve will be drawnn with a kink.
PolyLine
Connects the points with straight lines.
NURBS Curves Analysis
You can find all the NURBS Curves Analysis components under the tab:
- Curve > Analysis
Evaluate Curve
We can get specific properties of a Curve at a given point.
NURBS curves have a local domain that goes from 0 to 1 when the curve is reparameterized or a completely different number when is not. The reparameterization of a Curve will help us to work on a Curve’s domain more easily by simply specifying a value in between 0 and 1, being 0.5 the mid point in it.
Parameter t Determines the point on the curve to evaluate.
Curvature
Evaluates the curvature of a curve at a specified parameter.
Curvature Graph
Draws Rhino curvature graph. Variations on curvature over the domain of a curve.
NURBS Surfaces
Are very similar to NURBS Curves. The same algorithms are used to calculate Shape, Normals, Tangents, Curvatures and other properties, but there are some distinct differences.
In the case of NURBS surfaces, there are two directions implied in the geometry:
- A rectangular grid of
U
(Red) andV
(Green) curves.
Primitives
You will find primitive geometries under:
- Surface>Primitive
As an example, some Primitive geometries are:
- Cone, Cylinder, Sphere, Box, Plane Surface…
Freeform
Freeform NURBS Surface generation can be found under:
- Surface > Freeform
The most common Freeform operations are:
- Loft, Extrude, Edge Surface, Sweep… among others.
NURBS Surfaces Analysis
In order to be able to extract specific information from the surfaces, you can find many different components under:
- Surface > Analysis
Evaluate Surface
A very commonly used component to analyse surfaces is Evaluate Surface. This one helps us to evaluate surfaces at a parameter that is within the Surface Domain. This results to be a Point that is on the Surface.
(see also Surface Domain and Reparameterize)
- Surface > Analysis > Evaluate Surface
Surface Domain
A surface domain is defined as the range of (u,v)
parameters that evaluate (or intersect) into a 3D Point on that surface.
Reparameterize
Reparameterize NURBS Surfaces is often useful, so that the u
and v
domains both range from 0 to 1.
Example of reparameterization on a curve:
On a surface:
Tangent Plane
The Tangent Plane to a surface at a given point is the Plane that touches the surface at that point.
Normal Vectors
The Z-direction of the Tangent Plane represents the Normal Direction of the surface at that point.