Computer aided geometric design studies computational representations, evaluation and manipulation of curves and regular surfaces, especially using splines and subdivision surfaces.
// Target: geometry-and-topology.bigb
A robust intersection search applies branch and bound to pairs of subdivision surface patches. Certified bounding volumes reject disjoint pairs, and refinement reduces unresolved pairs. Limit evaluation, tangent data and controlled approximation bounds produce and correct local intersection arcs, then patch adjacency joins them. Bounds must enclose the limit, not merely the current mesh. Flat polygon intersections are approximations and can miss tiny components or tangencies unless the associated geometric and transversality conditions are verified.
A subdivision surface enquiry acts on the limit surface, not just on the current control mesh. The basic subdivision surface interrogation operations are: enumerate initial patches and their topological adjacency; subdivide a patch into covering children with inherited boundary links; return conservative bounding volumes; estimate approximation error and, where available, normal variation; and evaluate limit positions and first derivatives or tangent data. Boundaries, creases and extraordinary subdivision vertices need explicit rules. Nonnegative convex subdivision weights can supply a local control-hull enclosure, but a scheme with negative weights needs another proved enclosure; an arbitrary control-mesh box is not automatically a bound on the limit.
The intersection of subdivision limit surfaces can be computed by a paired recursive search. Start with every relevant pair of root patches , along with their domains and adjacency identifiers:
  • If the certified bounding volumes of and are disjoint, discard the pair: their limit patches cannot intersect.
  • Otherwise refine the larger or less accurately approximated patch, replace the pair by its child pairs and repeat. Subdivide both when their scales are comparable. Preserve cross-patch adjacency information throughout the recursion.
  • When the two patches are sufficiently small and flat, form their approximating triangles or planar facets. For transverse configurations with verified error and normal bounds, triangle intersections give candidate line segments and seed locations. Empty polygonal intersection is not by itself an exclusion certificate for the true surfaces: near tangencies, close parallel patches or tiny internal loops require further subdivision or a validated test on the limit functions.
  • Correct the candidates onto both limit surfaces using limit-point and tangent enquiries, for example a local parameter chart and the predictor-corrector equations for transversal intersection of two parametric surfaces. Continue each resolved arc through adjacent leaves. Where a chart is unavailable, keep refining and produce an enclosure with a proved error bound rather than claim an exact point from the mesh.
  • Join arc endpoints using patch/parameter adjacency and verified shared-boundary matches, remove duplicate segments from adjacent patch pairs, orient each component and assemble the resulting open curves and closed loops. Purely spatial proximity is not enough to join two distinct nearby branches.
A termination criterion specifies geometric error and conditioning, not merely a fixed refinement depth. For isolated regular transverse components, shrinking limit enclosures and normal/error bounds permit reliable curve approximation. Candidate boxes cannot be discarded merely because no coarse edge has crossed another surface: a complete small closed component can lie in the interior. Tangency, coincident limit patches, creases and poorly conditioned extraordinary-point neighborhoods need special tests or must be reported as unresolved degenerate configurations. The intersection is that of the two subdivision limits; intersecting a finite refined mesh without error control only gives an approximation.
A solid body transform is a rigid transformation: it preserves distances within the object. In three-dimensional coordinates it has the form , with translation and an orthogonal matrix . For a proper physical rotation, the coefficient constraints are
Equivalently the columns of are an orthonormal basis with positive orientation. A reflection also preserves distance but has and is excluded when “solid-body motion” means a rotation and translation. There are three rotational and three translational degrees of freedom, not twelve independent matrix coefficients.
Computationally use the homogeneous coordinates representation
The last row is ; matrix multiplication composes transforms. Alternatively store a unit quaternion together with , maintaining its unit norm. A transpose gives the rotational inverse: .
Write the cubic Bézier curve as , where . The binomial theorem gives . Transforming the controls produces
This proves pointwise equivariance, including the original parameter values; it is stronger than a statement that the two curves merely have the same shape.
Orthogonality was not used in the calculation. The identical proof applies to every affine map , including scales, shears and even singular affine maps. It applies to every representation with scalar, control-independent partition of unity basis functions: Bézier curves of every degree, B-splines, surfaces built on a tensor-product surface basis, triangular Bézier patches, and more general linear control-point representations. Positivity is not needed for affine equivariance of a geometric basis. For linear stationary subdivision matrices with row sums one, each refinement step commutes with the affine transformation; taking a convergent limit proves the corresponding assertion for subdivision curves and subdivision surfaces. Rules with geometry-dependent nonlinear weights require separate equivariance tests and are not covered automatically.
The affine class is the largest class that preserves every such Euclidean-control construction with unchanged basis weights, under the usual continuity assumption. In fact the degree-one case would force
for all and . This segment identity, followed by continuity, forces to be affine. Nonlinear transforms such as perspective division generally fail it.
There is a further extension when the representation itself is enlarged: apply a projective transformation linearly to homogeneous controls , then dehomogenize the weighted sum. The transformed objects are rational Bézier curves or non-uniform rational B-splines, with transformed weights as well as transformed Euclidean controls. This works wherever the new denominator is nonzero. It does not assert projective invariance of ordinary polynomial Bézier curves with their old weights.
Let the point light be at . For a subdivision curve point , its projected shadow lies on the ray beyond the subdivision curve:
The shadow is the first intersection of that ray with the receiving subdivision surface after the subdivision curve point. Thus solve
and retain the smallest admissible . This is the defining equation for shadow tracing for a subdivision curve.
First organize the subdivision surface patches into a bounding volume hierarchy. For a restricted subdivision curve interval, rays through its enclosing volume define an enclosing ray cone from ; subdivision surface bounds that do not meet this cone can be rejected. Refine surviving subdivision curve intervals and subdivision surface patches. For a fixed , isolate all possible ray intersections using those bounds, then correct each regular candidate with the Jacobian matrix for the Newton method
The scalar triple product shows that is invertible exactly when . Enforce the patch domain and throughout correction, and choose the smallest valid . Bounds or validated root isolation, rather than a fixed list of subdivision curve samples, are needed if every shadow component is to be found.
Once a regular intersection is known, follow it as changes. Differentiating gives a useful predictor:
Take a small predictor step in and apply a Newton method correction at the new subdivision curve parameter. Move through patch adjacency with its chart transition; shrink steps when derivatives or error estimates change rapidly. Subdivide further and test a geometric curve-to-chord bound to approximate the resulting shadow trace to a chosen tolerance.
Surface-boundary crossings terminate or clip a trace. If a ray has no admissible subdivision surface intersection, that subdivision curve parameter contributes no shadow on . At grazing contact the Jacobian is singular, so use interval subdivision and root isolation to detect the event and seed any outgoing branches. If several intersections are possible, recheck which is first; facing the light locally is helpful but is not a proof of global uniqueness. Open-curve endpoints and closed-curve seams must also be accounted for. With a compact represented geometry, transversal intersections and validated subdivision bounds, this algorithm traces every visible component; a purely sampled implementation gives only a tolerance-dependent approximation and cannot certify arbitrary tiny missed components.
For a directional light, replace the ray by for a fixed propagation vector and . The intersection equation becomes , with Jacobian and continuation right-hand side . The same enquiries and event handling apply.
The corresponding subdivision surface interrogation needs mesh connectivity and patch adjacency, boundary and crease flags, local coordinate charts with transition maps, and subdivision into smaller patches with their original-chart mappings. Its evaluation enquiry returns a limit point, tangent derivatives and a normal vector; second derivatives are supplied only where the limit is sufficiently smooth. Certified bounding volumes and patch approximation errors allow a hierarchy for intersection and proximity searches. Boundary-curve enquiries complete the interface for clipping.
On regular parts of a subdivision surface, these evaluations may use its equivalent tensor-product or box spline patch. Near an extraordinary subdivision vertex, the local subdivision matrix determines the limit position through its constant left eigenvector, and its tangent modes determine the normal vector under the scheme's characteristic map of a subdivision surface regularity conditions. Refinement alone does not establish those conditions. A subdivision surface may have a well-defined tangent plane there without possessing second derivatives or Gaussian curvature. An interrogation interface must distinguish these cases and can work on surrounding regular charts when a higher derivative is unavailable at the vertex itself.
Together, subdivision, bounds, topology and limit evaluation support ray–subdivision surface intersection: bounds eliminate irrelevant patches; surviving patches are refined, and regular candidate intersections are corrected using position and first derivatives. The returned intersection is a point of the limit subdivision surface with an error certificate, rather than automatically a point on the last control mesh.
Treat the subdivision surface as an evaluable limit together with its refinement hierarchy. At a requested location , evaluate the limit position and two independent limit tangent vectors, then set
On regular regions, local spline patches supply position and derivative evaluations. Near extraordinary vertices, use the actual subdivision rule and its limit-position and tangent evaluation machinery, or a convergent local refinement with controlled position and normal vector errors. If a tangent pair degenerates, the regular offset evaluator is not defined there; a crease requires separate one-sided offsets and an explicitly chosen join.
For polygonal interrogation, subdivide the base mesh adaptively. At every new sample, evaluate the base limit and its limit normal vector, and displace that sample by . Connect these samples with the inherited connectivity, refining until flatness and normal-variation bounds meet the desired tolerance. If the position error is and unit-normal error is , the offset-position error is at most , in addition to the interpolation error between samples. A variable normal offset can be sampled at the same locations, with its approximation error included as well. The result retains the base subdivision hierarchy for locating points and refining patches.
Displacing the original control vertices along estimated vertex normals and applying the original subdivision mask just once does not, in general, give the exact surface offset. If is one linear refinement step, then , while displacing the refined base gives ; normalization and the normal calculation are nonlinear, so in general. Thus the exact offset is an interrogation wrapper around the base limit, and a conventional subdivision control mesh for it is a fitted approximation requiring refinement or error control. Refine and interrogate the base limit, then offset its evaluated points; do not assume offsetting commutes with subdivision.
Choose one grid-edge vector as the extrusion direction and an independent edge vector . Label grid points , so extruded height data have , independent of . The Loop subdivision stencils are affine-exact in the coordinates, so the refined horizontal grid has spacing one-half and the same row structure.
At an old vertex, two neighbors lie in its own row, two in the row above and two in the row below. Its refined height is therefore
A new vertex on an edge parallel to has both endpoints in row and its opposite vertices in rows , giving exactly the same value . A new vertex on either of the other edge directions has endpoints in rows ; its two opposite vertices are also one in each of these rows. Its height is
Every refined vertex in a given row consequently has the same height. Induction proves this at every refinement level. The piecewise planar interpolating mesh is also constant along between rows, since adjacent rows have constant heights and form parallel straight lines. Taking its convergent limit preserves this invariance. Thus
where the points lie in the domain. The limit subdivision surface is an extrusion of the univariate limit curve. This is a statement about functional data on the regular grid, not about an arbitrary spatial mesh with extraordinary vertices or independently imposed boundary stencils.
Use the limit subdivision surface and limit subdivision curve, rather than treating their initial control meshes as the reflecting geometry. Build adaptive refinement hierarchies for both. Each surface cell supplies a limit-position evaluator, local tangent vectors and a normal vector; each curve interval supplies a limit-position evaluator and tangent. Regular regions may be evaluated as local splines, while extraordinary neighborhoods require the evaluation machinery of the specified subdivision rules. A piecewise smooth surface is handled patch by patch, with explicit boundary or crease joins.
A useful initial polygonal construction refines the surface to small triangles and the source curve to small line segments. For a candidate mirror triangle in a plane , reflect the eye across that plane:
For a source edge , a physical reflection point is the plane intersection of the line :
Keep only , , points inside the mirror triangle, and eye/source points on the appropriate reflecting side. Unfolding the reflected path across the mirror proves the specular reflection condition. As moves along a straight edge, lies on the intersection of the mirror plane with the plane through , so the retained locus is a straight segment, a point or the empty set. Plane and triangle clipping computes its endpoints. If these defining points are collinear, or a denominator vanishes, use the corresponding limiting geometric case rather than a generic plane formula. A bounding volume hierarchy accelerates candidate search where geometric bounds exclude pairs; refined facet segments provide seeds and approximate connectivity.
To obtain the reflection curve of the actual limits, correct these seeds. In a local surface chart write , and on a source interval write . Set
The exact limit reflection locus is together with the front-side conditions. For a two-sided mirror, orient locally so that and require ; for a one-sided mirror use its prescribed orientation and discard the wrong side. At grazing incidence this orientation condition ceases to be strict and the case needs separate handling. Unlike the eye-facing assumption in the parametric question, no global orientation condition is supplied here.
Apply a continuation method: at a rank-two root of , predict in a nullspace tangent direction and correct by the Newton method on a transverse section. Map corrected parameters to , crossing patch and curve-interval boundaries through their hierarchy adjacency. Trace all branches, recognizing closed components and endpoints. Supplement facet seeds by recursive searches of the surface-cell/source-interval product, with interval arithmetic or other certified enclosures of ; otherwise a small loop absent from the initial polygonal approximation could be missed. Split singular neighborhoods where the Jacobian matrix loses rank, and test the open source-to-mirror and mirror-to-eye segments for occlusion when selecting actually visible components.
Allocate a geometric error budget to limit evaluation, root correction and polygonal chords. For example, require combined position-evaluation and corrected-root error at most and, on every regular arc, require the chord error bound . Use subdivision position and normal bounds for evaluations: a tiny position error alone is insufficient, since a wrong normal vector changes the reflected ray. Away from singularities an inverse transverse Jacobian matrix bound converts reflection residual into parameter error and a bound on converts this to space error. Refine until these bounds hold, or use validated enclosures of entire arcs and their distances to the chords.
Near a caustic the inverse bound can become large, so the hierarchy must refine more strongly or isolate the singular branch geometry. Mesh flatness alone does not certify a reflection tolerance. With regular convergent evaluators and finite resolvable components, the resulting ordered vertices and chords satisfy
The problem supplies no particular subdivision rules or smoothness guarantees, so this construction specifies what their evaluators and bounds must provide; an arbitrary nonsmooth or degenerate limit need not have an ordinary finite reflection curve. Refine for seeds, enforce reflection on the actual limit geometry, then refine the traced arcs to the required spatial tolerance.
Subdivision surface 2026-10-14
A subdivision surface is the limit of repeated mesh refinement and vertex averaging. Exact interrogation evaluates this limit and, where defined, its tangent vectors and normal vectors; a finite refined control mesh is generally only an approximation to the limit.
// Target: analysis.bigb