Initializing 3D Canvas...

Loop Subdivision

3 min read1 page

Loop Subdivision (1-to-4 Splitting): Charles Loop's subdivision scheme operates on arbitrary triangular meshes to produce $C^2$ continuous limit surfaces (except at extraordinary vertices where it is $C^1$). Every triangular face splits into 4 sub-triangles by placing new odd vertices along edges using a 4-point weighted stencil.

Loop Triangle Stencils:

1. Edge Stencil (Odd Vertices): v_edge = 3/8*(A + B) + 1/8*(C + D). 2. Vertex Stencil (Even Vertices): Weighted blend between current vertex and its 1-ring neighbors parameterized by valence n. 3. 1-to-4 Topology: 1 parent triangle splits into 4 child triangles with balanced valence.
python
1def loop_edge_point(v_a, v_b, v_c, v_d):
2 """
3 Loop subdivision odd (edge) vertex mask for interior edge (v_a, v_b).
4 v_c and v_d are the two opposing vertices in adjacent triangles.
5 Weight mask: 3/8*(A + B) + 1/8*(C + D)
6 """
7 return (3.0 / 8.0) * (v_a + v_b) + (1.0 / 8.0) * (v_c + v_d)
8
9def loop_vertex_update(v_old, neighbors):
10 """
11 Loop subdivision even (original) vertex update mask.
12 n = valence, beta = (5/8 - (3/8 + 1/4*cos(2*pi/n))**2) / n
13 v_new = (1 - n * beta) * v_old + beta * sum(neighbors)
14 """
15 import math
16 n = len(neighbors)
17 if n < 3:
18 return v_old
19 beta = (5.0 / 8.0 - (3.0 / 8.0 + 0.25 * math.cos(2.0 * math.pi / n)) ** 2) / n
20 sum_neighbors = sum(neighbors, type(v_old)([0.0, 0.0, 0.0]))
21 return (1.0 - n * beta) * v_old + beta * sum_neighbors
Subdivision Blend
0.60
3 min read1 page

Loop Limit Surface Evaluation: Rather than iteratively subdividing the mesh infinitely, eigen-analysis of the Loop subdivision matrix provides closed-form formulas for the exact limit position and tangent planes of any vertex directly from its initial 1-ring star.

Closed-Form Limit Stencils:

1. Eigen-structure: The subdivision matrix has dominant eigenvalue 1 and subdominant eigenvalues yielding tangent eigenvectors. 2. Direct Evaluation: Direct computation of limit position v_inf = (1 - α) * v + α * v_ring. 3. Analytic Normal: Cross product of the two limit tangent vectors provides continuous C1 normals for ray-tracing and physics.
python
1def loop_limit_position(vertex, neighbors):
2 """
3 Computes exact limit surface position for Loop subdivision without infinite iterations.
4 limit_v = (1 - alpha) * vertex + (alpha / n) * sum(neighbors)
5 where alpha = 3*n / (8*beta + 3*n)
6 """
7 import math
8 n = len(neighbors)
9 if n < 3:
10 return vertex
11
12 beta = (5.0 / 8.0 - (3.0 / 8.0 + 0.25 * math.cos(2.0 * math.pi / n)) ** 2) / n
13 alpha = (3.0 * n) / (8.0 * beta + 3.0 * n)
14
15 centroid = sum(neighbors, type(vertex)([0.0, 0.0, 0.0])) / n
16 return (1.0 - alpha) * vertex + alpha * centroid
0=Control Mesh, 1=Limit Surface
1.00