# Rhino SubD Rules

Rhino SubD Rules

This document is a short summary of technical information for developers who need to know the subdivision rules and formulae used by Rhino SubD objects. You do not need to know or understand this information in order to use Rhino SubD tools or the Rhino SubD SDK.

Rhino SubD surfaces are Catmull-Clark subdivision surfaces with the standard extensions to support creases and corners described in
Henning Biermann, Adi Levin, Denis Zorin Piecewise Smooth Subdivision Surfaces with Normal Control SIGGRAPH 2000

Last update: June 23, 2021

# Rhino SubD Control Net and Surface

A Rhino SubD surface is defined by a control net that is a polygon mesh with a finite number of vertices, edges, and faces. Faces with four or more sides may be nonplanar. Whenever the term surface is used, it refers to the Catmull-Clark limit surface obtained by subdividing the original control net an infinite number of times. It is possible to rapidly calculate Rhino SubD surfaces from the original control net.

## Terminology

Vertices and edges have a tag property. There are four vertex tag values: smooth, dart, crease, and corner. There are two edge tag values: smooth and crease. The tags have the following topological restrictions.

Every vertex has a control net point location.

Every edge has a starting and ending vertex. The starting and ending vertices must be distinct and have distinct control net points.

Every face is bounded by three or more distinct edges that form a polyline connecting the same number of distinct vertices. It follows that a face is attached to the same number of edges and vertices. The face’s vertex control net points may be nonplanar.

### Edge Tags

#### Smooth Edges

A smooth edge must be attached to exactly two faces. At least one end of a smooth edge must be attached to a smooth vertex. It follows that a smooth edge has four possible combinations of vertex tag pairs: smooth-smooth, smooth-dart, smooth-crease, and smooth-corner.

#### Crease Edges

A crease edge can be attached to zero or more faces. Is is typical for a crease edge to be attached to one or two faces; however, wire edges and non-manifold edges are permitted. The vertices at the end of a crease edge must be tagged as dart, crease, or corner. Both end vertices of a non-manifold edge must be tagged as corners.

### Vertex Tags

#### Smooth Vertices

Every edge attached to a smooth vertex must be a smooth edge. A smooth vertex must be attached to a minimum of two edges. It follows that a smooth vertex is an interior, manifold vertex and is attached to the same number of edges and faces. The number of attached edges and faces is the valence of the smooth vertex.

#### Dart Vertices

A dart vertex must be attached to two or more edges, exactly one of the attached edges must be a crease edge attached to two faces and the other attached edges must be smooth edges. It follows that a dart vertex is an interior, manifold vertex and is attached to the same number of edges and faces. The number of attached edges and faces is the valence of the dart vertex.

#### Crease Vertices

Exactly two crease edges must be attached to a crease vertex. Any other edges attached to a crease vertex must be smooth edges. It follows that there are four topological possibilities:

1. Both creases are wire edges,

2. Both creases are boundary edges (one attached face).

3. Both creases are interior edges (two attached faces) and the vertex is a manifold vertex.

4. Both creases are non-manifold edges (three or more attached faces) with the same number of attached faces.

#### Corner Vertices

Two or more crease edges must be attached to a corner vertex.

## Subdivision Point Formulae

In the formulae below, v,e, and f are used to indicate a vertex, edge, and face in the SubD control net and S(v), S(e), and S(f) are used to indicate their subdivision points.

### Face subdivision point

The subdivision point of a face with n edges is the average of the n vertex control net points;

S(f) = (P1+...+Pn)/n. The subdivision vertex is assigned a smooth tag.

If the face is a quad with corner points{Q1, Q2, Q3, Q4}, then the formula simplifies to the standard Catmull-Clark formula S(f) = (Q1+ Q2+ Q3+ Q4)/4.

### Vertex subdivision points

For vertices, the subdivision rule depends on the vertex tag. The subdivision vertex is assigned the same tag.

#### Smooth and dart vertices

If v is a smooth or dart vertex with control net point Pand valence k ( k edges connecting P and Ai and k faces f1, …, fk )  then
S(v) = (1-2/k)P + (A1 + ... +Ak)/k2 + (S(f1) + ... + S(fk))/k2.

When every face fi is a quad with corners {P, Ai, Qi, Ai+1}, then the formula simplifies to the standard Catmull-Clark formula
S(v) = (1 -74k)P + (32k2)(A1+...+Ak) + (14k2)(Q1+...+Qk) .

#### Crease vertices

If v is a crease vertex with control net point P and A1 and A2are the opposite ends of the attached crease edges, then S(v)=(6P + A1+A2)/8.

#### Corner vertices

If  v is a corner vertex with control net point P, then S(v) = P.

### Edge subdivision points

For edges, there are four cases, a smooth edge attached to two smooth vertices, a crease edge, a smooth edge attached to one smooth vertex and one dart, crease, or corner vertex, and a smooth edge attached to two dart, crease, or corner vertices,

#### Smooth edges attached to two smooth vertices

If e is an edge with endpoints A1 and A2and attached faces f1and f2, then

S(e)= (A1+A2+S(f1) + S(f2))/4.

The subdivision vertex is assigned a smooth tag. The two subdivision edges are assigned a smooth tag.

If the faces are quads with corner points {A1, A2,Q1, Q2} and {A1, A2,Q3, Q4}, then the formula simplifies to the standard Catmull-Clark formula
S(e) = (6(A1+A2) + Q1+Q2+Q3+Q4)/16.

#### Crease edges:

If e is a crease edge with endpoints A1 and A2, then S(e) = (A1+A2)/2. The subdivision vertex is assigned a crease tag. The two subdivision edges are assigned a crease tag.

#### Smooth edge attached to one smooth vertex and one dart, crease, or corner vertex

For each vertex tag, dart, corner, and crease, there is a simple formula to determine a parameter k. The edge subdivision point is

S(e)=(cos(k)(T-A) +T+A+S(f1) + S(f2))/4,
where T is the tagged vertex control net point and A is a smooth vertex control net point.

Put another way, the standard smooth edge subdivision point is translated parallel to the edge by the vector (cos(k)/4)(T-A). The subdivision vertex is assigned a smooth tag.

In every case, the topological constraints on dart, corner, and crease vertex tags insure k2.

##### k for a smooth edge attached to a dart vertex with k faces

k=2/k.
When k>4 the translation is towards the dart vertex. When k<4 the translation is away from the dart vertex. When k=4, cos(k)=0, and S(e) is the standard smooth subdivision point.

##### k for a smooth edge attached to a crease vertex with k faces in the sector

k=/k.

When k>2 the translation is towards the crease vertex. When k=2, cos(k)=0, and S(e) is the standard smooth subdivision point.

##### k for a smooth edge attached to a corner vertex with k faces in the sector

Let be the smallest angle between the sector’s boundary crease edges (0).

k=/k.
The translation is always towards the corner vertex. Because the location of the corner vertex is fixed and the subdivision point for a crease edge is it’s midpoint, the angle is constant during subdivision.

#### Smooth edges attached to two two dart, crease, or corner vertices

If e is an edge with endpoints A1 and A2and attached faces f1and f2, then

S(e)= (A1+A2+S(f1) + S(f2))/4. The subdivision vertex is assigned a smooth tag.

The two subdivided edges will be attached to one smooth vertex and one dart, crease or corner vertex.

## Limit Surface Point Formulae

In the formulae below, v is a SubD vertex with control net point P. All attached faces are quads. For each attached edge ei, Ai denotes the control net point opposite P. For each attached quad  fi,{P, Ai, Qi, Ai+1} are control net corner points. L(v) is the limit surface point.

For vertices, the limit surface point depends on the vertex tag.

#### Smooth vertices

If v is a smooth valence k vertex attached to k smooth edges having smooth vertices at both ends and attached to k quad faces, then
L(v) =(kP + (4/k)(A1+...+Ak) +(1/k)(Q1+...+Qk))/(k+5).

#### Dart vertices

If v is a dart valence k vertex with control net point P,e1 is the crease edge and its opposite end is a crease vertex, and e2,..., ek are smooth edges with smooth vertices at their opposite ends, and Lk(v)is the limit surface point, then
L2(v) =(16P + 20(A1+A2)+3(Q1+Q2))/62,

L3(v) =(243P + 130A1+120(A2+ A3) + 19(Q1+Q3) + 29Q2)/19,

L4(v) =(752P + 210A1+160(A2+ A4) +180A2+29(Q1+Q4) + 44(Q2+Q3))/29,

....

#### Crease vertices

If v is a crease vertex with control net point P and A1 and A2are the opposite ends of the attached crease edges, then L(v)=(4P + A1+A2)/6.

#### Corner vertices

If v is a corner vertex with control net point P, then L(v) = P.