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 boundary representation specifies a solid through its oriented bounding faces and their edge and vertex of a polyhedron incidence. Supporting planes and coordinates supply geometry; face loops and adjacency supply topology. A valid closed manifold model requires compatible orientation, two incident faces per edge and a single local fan at each vertex of a polyhedron, together with an embedded boundary.
A mesh representation with two oppositely directed records per ordinary edge. Each record stores its origin vertex of a polyhedron, incident face, next face-boundary record and opposite record; previous records are often cached. The opposite record's origin gives the destination. This usage differs from a dangling half-edge of a graph.
An edge record stores endpoint vertices of a polyhedron, its two incident faces, and predecessor and successor edges for each face. These four boundary-neighbour references are the wings. Face and vertex of a polyhedron records also carry entry references for traversal. Local edits must preserve all reciprocal incidence references and orientations.
Joined pieces have order- parametric continuity when their positions and one-sided derivatives through order agree in the actual common parameter. Changing parameter-interval lengths changes the required derivative scale by the chain rule. For regular curves, parametric continuity implies the corresponding geometric continuity.
Joined regular parametric curves have order- geometric continuity when their local images admit compatible orientation-preserving regular parameter choices with matching derivatives through order . At order one the nonzero one-sided tangent vectors must be positive scalar multiples. At order two the oriented bending must also match: equality of unsigned curvature alone does not suffice if the curves bend to opposite sides.
A fillet rounds a corner or edge by inserting a tangent transition. In a planar circular construction, intersect normal lines through the prescribed tangent points to find the circle centre. Choosing the retained side and local clipping region is part of the design: intersecting the entire original solid with the fillet disk generally removes unrelated geometry. Tangent joining need not make curvature continuous.
Constructive solid geometry describes a solid by combining primitive regions with Boolean set union, set intersection and difference. With primitive defining functions nonpositive inside, minimum implements union and maximum implements intersection. These formulas encode membership rather than signed distance functions. Solid modellers often regularize Boolean operations to remove isolated lower-dimensional remnants.
A rooted tree whose leaves describe primitive regions and whose internal nodes describe Boolean operations. A half-space leaf can hold an implicit equation and an inside-sign convention. Evaluate membership from the leaves toward the root; interval arithmetic can propagate conservative inside/outside bounds over a box instead of a single point.
A geometry representation with scalar partition of unity basis functions commutes with every affine map of its control points. For , linearity moves through the sum and the sum-to-one identity supplies the translation . Positivity is needed for a convex hull property, but not for this equivariance. The same argument applies to linear subdivision matrices whose rows sum to one. General projective transformations require homogeneous control points and rational dehomogenization rather than transforming Euclidean controls with unchanged weights.
For overlapping solid bodies, the penetration depth is the smallest translation needed to remove interior overlap, with orientation fixed. It is distance from the origin to the complement of the translational collision region. Define signed separation as positive ordinary separation for disjoint bodies, zero for contact, and for interior overlap. Translation-space branch and bound can bracket it using certified intersection/containment queries. This convention handles crossing and complete containment; merely negating unsigned boundary distance does not.
A basis with the displayed identities reproduces affine functions from their values at the precision sites . For two such bases, the tensor-product precision sites are : summation independently recovers and . Affine images of this site grid therefore produce exact planar parameterizations, independent of the chosen control-grid representation.
A control point is an editable geometric handle used to specify a curve or surface through a basis or refinement rule. The handle is part of the representation; it need not be a point on the resulting curve. In a Bézier curve, the control points are the geometric coefficients of the Bernstein basis. Joining them in order gives a control polygon, which makes the handles easy to manipulate without drawing the curve as a chain of line segments.[ref]
For example, use the cubic Bézier curve with control points
Its Bernstein basis representation gives
The greatest height is , so neither interior control point, both at height , lies on this curve. The endpoint control points do lie on it: and . This separates interpolation, which requires passage through prescribed data, from an approximating representation, which uses handles to shape a curve without requiring passage through every handle. If measured points must be interpolated, choose control points to satisfy those constraints; simply using the measured points as the handles of a Bézier curve does not enforce interpolation.
Figure 1.
Original cubic and the curve after moving only the interior control point P1 upward by one unit, with fixed endpoints and a smaller displacement at the same parameter
. Details.
Now move only by the vector , giving . With the Bernstein basis and parameter unchanged, the new curve is
At this gives , a displacement despite moving the handle by a full unit. Both endpoints stay fixed because the coefficient vanishes there. Thus dragging a control point shapes a whole range of the curve; it does not generally drag an arbitrary selected point on the curve by the same vector. The control-point influence on a curve tells us exactly how much each parameter value moves.
For a parametric curve represented by fixed scalar functions and control points in Euclidean space, write
The influence function of this handle is : the resulting displacement vector is , and its norm is . These are exact finite changes, not only a first-order estimate. Where is negative the displacement points opposite to . Where , the curve is unchanged at that parameter.
Figure 1.
The influence coefficient 3t(1-t)^2 equals the vertical displacement for a unit upward move of P1, reaches 4/9 at t=1/3, and vanishes at both endpoints
. Details.
For the cubic Bézier curve above, the Bernstein basis influence function is . Its derivative is
It increases up to and decreases thereafter on . Consequently the largest displacement at corresponding parameters is
For it is . This is a comparison at the same parameter. A geometric closest-distance comparison, as in a closest-point search on a subdivision curve, instead minimizes over another parameter:
The closest parameter can differ from , so is not automatically a maximum closest-distance separation of the two curves. Neither parameter is assumed to be arc length.
The support of a function is the closure of the parameter values where . It bounds where a nonzero handle move can act, but may include boundary points where the actual displacement is zero. Here the support of a function is all of relative to the parameter domain, while the endpoints are unaffected. In contrast, a B-spline of order has support within in its spline knot sequence, so its handle affects only that parameter range; the support and Gram bandwidth of B-splines describes the same locality in another application. Changing the spline knots or the basis along with the handle requires a different comparison.
When the basis functions form a partition of unity, , each evaluation is an affine combination of the control points. Applying an affine map to all handles gives
This is affine equivariance of a geometric basis, also called affine covariance: affine maps preserve affine combinations. In particular, translating every handle by translates the whole curve by , whereas moving just one handle produces . The Bernstein basis has this partition of unity property.[ref] Nonnegative weights further make evaluations convex combinations, giving the convex hull bound illustrated by the control polygon; nonnegativity is not needed for affine covariance.
For a proof outline of the influence formula, subtract the two basis representations: every unchanged coefficient cancels, leaving . The same subtraction with several moved handles gives . No claim about interpolation, closest-point search on a subdivision curve or endpoint motion follows until the actual basis values are examined.
A mesh connecting a surface's control points according to the representation's indexing topology. A tensor-product surface basis gives a rectangular index grid and quadrilateral cells, even when its points in space are neither planar nor rectangular. The drawn mesh is a geometric skeleton, not generally the exact limit surface or an enclosing solid. Positive partition of unity coefficients give a convex hull bound on the relevant controls.
A control polygon joins successive control points by line segments. It gives an editable geometric skeleton, not usually the exact curve. An open control polygon has two ends; a closed control polygon also joins the last control point to the first. Store the first control point only once when using cyclic indices, so the closing edge is counted exactly once. Positive partition of unity basis functions place the curve inside the convex hull of its active control points; a convergent subdivision curve rule refines the control polygon toward its limit, with a certified error when an appropriate bound is available.
If is gravitational acceleration and is the camera's acceleration, the locally felt upward vector is . Choose the travel unit vector , set , and, when , take and . These form an orthonormal basis with in the plane. If is parallel to , the condition leaves the roll angle free even when ; transport a previous transverse axis or choose a well-conditioned coordinate axis and project it into .
A subdivision curve is the limit of repeated refinement of a control polygon, when that limit exists. Each finite stage still consists of line segments; the limiting curve can have a continuous derivative. Linear stationary rules, which use the same fixed weighted averages at every stage, can be studied through their subdivision masks and often represent splines. An interpolation rule retains the old control points, as in binary linear interpolatory subdivision; an approximating rule such as Chaikin subdivision generally moves away from them. Increasing the number of control points alone does not prove convergence or smoothness.
// Target: analysis.bigb
The centered subdivision mask retains old control points and inserts edge midpoints. Its control polygon is unchanged as a geometric curve by refinement. Its basic limit is the hat , with support . This linear spline representation reproduces constants and linear functions, and is but generally not at its spline knots.
The functional precision set of a subdivision scheme consists of functions exactly reproduced by refining their uniform samples with the scheme's consistent parameter placement. Polynomial precision usually specifies the reproduced polynomial space. If exactness is required for every grid spacing and shift, the binary midpoint-interpolation scheme has precision exactly the affine functions. At one fixed grid, its entire reconstruction range is the space of continuous piecewise linear functions on that grid; this larger range should not be confused with polynomial precision or arbitrary-grid reproduction.
Chaikin subdivision generates a rounded subdivision curve by repeatedly cutting the corners off a control polygon. Each edge contributes two new control points, one a quarter of the way along the edge and the other three quarters of the way along it. Connecting these new control points in edge order replaces the old corners by shorter line segments. This makes Chaikin subdivision a useful way to draw a smooth outline from a small, editable set of control points, without evaluating B-spline basis functions at each drawing step. Joy presents both the corner-cutting rule and its closed version.[ref]
For a closed control polygon with control points , set and interpret indices cyclically. One refinement gives
and the new control polygon is the ordered sequence
Close it by joining back to . Use the old control points for every average in the same refinement; updating them in place would define a different algorithm. One refinement produces stored control points, and refinements produce , counting entries even if some coordinates coincide. Open control polygons need an explicit endpoint convention: applying only the interior edge rule discards the original endpoints, whereas retaining endpoints changes the boundary rule. The closed analysis below uses cyclic indices throughout.
For a worked example, start with the rectangular control polygon
The first edge gives and . Applying Chaikin subdivision to all four edges, including the closing edge, gives exactly eight control points in this order:
Thus the rectangle becomes an octagonal control polygon. Two refinements have control points, and five have . The illustration shows finite control polygons at stages ; the last is already visually rounded but still consists of line segments.
Figure 1.
Chaikin corner cutting on a rectangle at iterations zero, one, two and five
. The dashed rectangle is the original control polygon and its convex hull. Blue line segments and dots show the current control polygon and control points; no panel claims to be the exact limiting curve. Details.
The convex hull property follows directly from the weights. Each new control point is a convex combination of the endpoints of one old edge, because the weights are nonnegative and sum to one. Consequently, if is the convex hull of the stage- control points, then . Every later line segment, and every limit point, stays in the original convex hull. This gives a useful geometric enclosure. It also explains why Chaikin subdivision is approximating rather than an interpolation rule: the rectangle's four original corners are outside the first octagon's convex hull, so the limiting curve cannot pass through them. A refinement control polygon generally lies off the limiting curve as well.
For the cyclic uniform rule, the closed limit is the periodic quadratic uniform B-spline curve determined by the original control points. Uniform refers to equal spacing in the spline knot sequence, not equal physical lengths of edges of the control polygon. An infinite uniform control sequence has the corresponding local description; arbitrary open endpoint conventions need separate treatment. Joy derives the quarter-point refinement by splitting quadratic uniform B-spline spans.[ref]
Here is an explicit description of that closed limit, with cyclic indices and a unit parameter span for each original control point:
Each coordinate is a quadratic polynomial, and the three coefficients form a nonnegative partition of unity. The span runs from to . Differentiating gives and , so adjacent spans have matching values and matching first derivatives. Their second derivatives generally differ. Thus the parameterized curve is , generally not ; degenerate control points can still make its tangent vector vanish. For the rectangle, the span around is
which rounds the original corner between edge midpoints and . For equally spaced abscissae, the centered Chaikin basis function gives the scalar graph version of this quadratic B-spline representation and has support of width three original grid intervals.
Another useful property is affine equivariance of a geometric basis: refining and applying an affine map commute. For ,
and the same calculation holds for . The sum-to-one weights account for the translation. Therefore at every refinement, and also for the limit. A designer can apply a shear mapping, translation, or other affine map to the original control polygon and obtain exactly the transformed outline.
For example, compose the shear mapping with the translation to obtain . The rectangle's control points become . On its right edge, cutting first gives and then . Transforming first and cutting instead gives , the same control point.
Figure 2.
Shearing and translating a control polygon commutes with one Chaikin refinement
. Left: the rectangle and its first refinement. Right: the transformed control polygon, with blue dots from cutting after the affine map and orange rings from applying the affine map after cutting. All eight pairs coincide. Details.
Historically, George M. Chaikin published “An algorithm for high-speed curve generation” in Computer Graphics and Image Processing 3(4), December 1974, pages 346–349. Its emphasis was practical curve generation through a recursive algorithm using simple arithmetic, with applications including machine control and three-dimensional curves. The lasting appeal of Chaikin subdivision is how an elementary local average creates an entire smooth B-spline curve.[ref]
This centered quadratic cardinal B-spline weights each original control ordinate at its uniformly spaced abscissa. Its translates sum to one. It and its first derivative match at half-integer knots, while the second derivative can jump. The limit graph is ; one ordinate influences exactly three original intervals. Refinement of a quadratic adds in the limit, yielding this basis by extending each three-point neighborhood quadratically.
For uniformly spaced abscissae, quarter and three-quarter averages applied to constant or affine samples leave the same polynomial. For on spacing , both new subgrids lie on . For degree , their candidate polynomial formulas differ with leading term , which has a nonzero highest-degree coefficient. Thus preservation of polynomial degree for arbitrary sufficiently long data sequences holds exactly for degrees zero, one and two, despite quadratic values changing.
Under , the descendants of control index zero lie at , where each is in the mask support. Dividing by the refined parameter scale gives a limiting influence enclosure with the displayed endpoints. For a mask supported on its width is when the endpoints are active and a nonzero compactly supported basic limit exists. To prove exactness, the largest active mask term is the only surviving term near the right endpoint of the refinement equation, forcing ; the analogous left-end argument completes the result. Mask padding should be removed, and a nonconvergent rule has no limit support.
A useful subdivision curve interface provides parameter ranges, endpoint and limit evaluation, derivatives, subdivision into equivalent restricted pieces, a certified bounding volume, and a certified error relative to a chord. Positive subdivision masks often give a convex hull bound. Masks with negative coefficients need a separate enclosing bound; their control-point hull need not enclose the limit curve.
At a regular differentiable interior nearest point of a parametric curve, the displacement from the query point is perpendicular to the tangent vector. A branch and bound search uses distances to certified enclosing bounding volumes as lower bounds, and evaluated limit points as upper bounds. Refine the most promising restricted pieces until the upper bound differs from the global lower bound by the chosen distance tolerance. Safeguarded Newton root-finding iteration accelerates local candidates, but endpoints, nonregular points, ties and other stationary branches must not be omitted.
For a point light at , the shadow of a curve point is the first surface intersection on its ray beyond that point. Certified patch bounds and subdivision isolate intersections; regular hits are corrected with a three-variable Newton method solve. Differentiating the displayed equation gives , a predictor for continuation along the shadow. Surface boundaries and grazing rays require clipping and reseeding; every visible component must be isolated, rather than assumed detectable from a fixed sample of the casting curve.
For an oriented plane function , certified extrema over a bounding volume allow a subdivision curve piece to be rejected when , or wholly retained when . Otherwise subdivide. At an explicitly chosen rendering tolerance, a sufficiently flat, sufficiently short piece can be replaced by its clipped chord. This is an approximation, not a proof of exact crossing topology. Exact treatment of tangent contacts and small excursions requires root isolation of and splitting into sign-constant intervals, when the curve representation supports such isolation.
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
Lateral artifacts of a subdivision surface are unwanted variations along an intended straight extrusion: input cross-sections identical along a lattice direction acquire ripples in that direction under refinement. For a stationary arity- lattice rule , extrusion along the first lattice coordinate is preserved exactly when is independent of the residue for every transverse offset . Then summing along each row gives a single associated univariate subdivision mask. This direction-specific criterion does not promise invariance under every possible oblique extrusion.
If a triangular-lattice subdivision mask has the displayed residue-sum equality, refining data gives , independent of . If affine coordinates reproduce their parameter positions, a geometrically straight extrusion is preserved. Rotationally symmetric masks give the corresponding property in all three lattice-edge directions. A boundary curve compatible with this extrusion uses the collapsed mask , not just the central row of the two-dimensional mask.
Mid-edge subdivision replaces each mesh edge by its midpoint, joins successive midpoints around every old face, and joins successive midpoints around every old vertex. For an interior manifold mesh, each new vertex has valence four. Each geometric update is a convex combination, so every refined control point remains in the convex hull of the original control mesh. The regular limit is associated with the quadratic four-direction box spline.
The descendant of a face with cyclic vertices has vertices . Their arithmetic mean is unchanged. On the cyclic Fourier basis, a mode of frequency is multiplied by . Every nonconstant mode has modulus less than one, so the descendant face shrinks to the original vertex centroid. This puts that centroid on the subdivision limit, without requiring the original face to be planar.
Interrogation of a subdivision limit needs patch/topology navigation, refinement, limit evaluation and derivatives where they exist, with certified bounds and geometric error estimates. On regular patches one may use the corresponding spline representation. At extraordinary subdivision vertices, local subdivision matrices determine limit positions and tangents under the scheme's smoothness conditions. A normal vector may exist even when second derivatives and Gaussian curvature do not; finite refined polygons are approximations rather than exact limit queries.
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 plane section of a subdivision surface is a zero set of the plane functional evaluated on the limit parametric surface. Certified patch bounding volumes reject sign-definite patches. On a regular transverse section, and the parameter tangent is ; predictor-corrector continuation method traces a branch after every component has been isolated. Closed loops, tangencies, coplanar patches and extraordinary-vertex neighborhoods require more than corner-sign tests. Degenerate sections can contain isolated points or two-dimensional portions rather than only regular curves.
For disjoint compact bodies, the minimum occurs on their boundaries. Patch bounding volumes give certified lower bounds and evaluated limit-point pairs give upper bounds. A branch and bound search refines promising patch pairs until the global bounds differ by the tolerance. Boundary distance alone cannot detect containment; touching, crossing or nested solid bodies have ordinary set distance zero. Negative overlap values require an additional convention such as translational penetration depth.
An extraordinary subdivision vertex has a valence different from that of the regular refinement lattice. Regular box spline calculations do not alone establish smoothness at this vertex. The finite local subdivision matrix, its eigenvalues, and the associated characteristic map of a subdivision surface determine convergence and tangent behavior.
The characteristic map of a subdivision surface is the planar limit map obtained from the two independent tangent eigenvectors of its local subdivision matrix. In the usual stationary setting, a simple constant eigenvalue one, a semisimple double subdominant eigenvalue , strictly smaller other eigenvalues, and a regular injective characteristic map establish the standard tangent-plane behavior for nondegenerate data. The eigenvalue inequalities alone do not exclude a folded or singular characteristic map. For an alternating scheme these tests must use a full period of refinement.
A regular quincunx subdivision step replaces a square lattice by the union of its old vertices and face centres. In lattice indices one may use
Thus two steps give ordinary binary refinement. If is the one-step subdivision mask symbol, the two-step symbol is . The two lattice parity classes separately determine the old-vertex and face-vertex stencils; their coefficient sums must each be one to reproduce constants.
On a regular triangular grid, Loop subdivision retains an old vertex with weight and adds its six neighbors with weight each. A new edge vertex has weights on the endpoints and on the two opposite vertices. Extraordinary vertices require valence-dependent rules.
// Target: analysis.bigb
For the three unit-grid edge vectors and a multivariate polynomial of total degree at most three, sampled regular-grid Loop subdivision generates the graph of . Thus affine polynomials are reproduced exactly and all polynomials through degree three retain their degree. Fourth-degree data constant along one edge direction reduce to a Cardinal cubic B-spline, whose limit need not be a polynomial.
On an infinite regular triangular grid, height data constant along one edge direction remain constant along that direction under Loop subdivision. Across rows the induced rule is , , the centered Cardinal cubic B-spline rule.
// Target: analysis.bigb
A stationary binary subdivision mask specifies a refinement operator . Indices may be vectors for a surface. Coefficients restricted to a parity class give the stencil for one type of refined vertex.
// Target: analysis.bigb
For a stationary univariate refinement , the subdivision mask width counts fine-grid positions from the first to the last active entry in a column, including any internal zeros. Consecutive columns are translates by rows, the subdivision arity. The number of old control points used by a particular new point is instead the size of its row stencil; it need not equal the mask width. A span convention counts fine intervals, so numerical width claims should specify the convention.
The subdivision arity is the integer factor by which a stationary refinement shrinks parameter-grid intervals: control index has coordinate after levels. It is distinct from the mask width and from the number of neighbors in a stencil.
For backward differences , a scalar stationary arity- subdivision mask has symbol . The identity gives the displayed intertwining whenever the quotient is a finite Laurent polynomial. Iterating supplies higher-difference masks. The coefficients are candidate th-derivative controls. A convergent derivative scheme, proved by contraction of its first differences, establishes corresponding smoothness of the original limit under the standard consistent parameterization.
Finite local subdivision matrices for the scaled difference scheme track derivative variations in nested parameter intervals. A product-norm bound below one proves uniform contraction for every interval and therefore gives a lower bound on derivative continuity. A product eigenvalue of modulus at least one is an obstruction when its mode is reachable from the data and visible in the limit: generic data excite it, so the corresponding derivative differences fail to vanish. Harmless polynomial or unobservable modes must be removed before applying such an upper bound. Borderline smoothness needs direct analysis, not rounding a numerical exponent. Stability and convergence of the underlying scheme must be checked rather than inferred from mask width.
A local subdivision matrix maps the control points in a refinement-invariant neighborhood to the refined neighborhood. Row sums one express constant reproduction. Its constant eigenvector has eigenvalue one; remaining eigenvalues govern decay of shape modes. Near an extraordinary subdivision vertex, tangent modes and a characteristic map of a subdivision surface are needed to test geometric smoothness, beyond simple convergence.
A Bézier curve is a parametric curve specified by control points in a Euclidean space and the Bernstein basis:
Here is a binomial coefficient. Each coordinate is a polynomial of polynomial degree at most ; special choices of control points can lower the polynomial degree. The ordered control points form the control polygon. A cubic Bézier curve uses four control points and has the explicit form
The curve passes through and ; the interior control points steer its shape and need not lie on it.[ref]
For a worked example, choose
Substituting these control points gives
Here , so neither interior control point, both at height , lies on the curve. De Casteljau's algorithm computes the same point using only successive linear interpolations.
The endpoint tangent vectors follow from the Bézier derivative control polygon:
Thus the curve leaves toward and arrives at from . These nonzero derivatives determine the endpoint tangent lines; if an endpoint derivative vanishes, that formula alone does not determine its tangent direction. Endpoint handles are useful when arranging a parametric first-derivative join of Bézier curves.
The parameter is usually not arc length. For this example,
Equal steps in therefore do not generally travel equal distances. Distance along the curve is instead the arc length, given by the integral ; its derivative is the norm of the tangent vector and measures the rate of travel.
Two geometric facts make Bézier curves especially convenient for design. First, the Bernstein basis weights are nonnegative and form a partition of unity, since the binomial theorem gives . Hence is a convex combination of the control points and lies in their convex hull.[ref] The convex hull is the smallest convex set containing the control points, not their axis-aligned bounding box. Here it is a trapezoid, strictly smaller than : the box corner is outside the convex hull. The curve need not fill or touch every edge of either enclosure. The convex hull guarantee concerns ; outside that interval weights can be negative.
Second, applying an affine map to every control point gives exactly the same result as applying it to the entire curve. For ,
This is affine equivariance of a geometric basis: a translation, rotation or shear mapping can be performed on a handful of control points. For example, transforms the four control points to and transforms the midpoint to , also obtained from the same weights .
These editable handles explain the usefulness of Bézier curves in computer aided geometric design, vector graphics paths and outline fonts: a small collection of points controls an entire smooth stroke, and resizing the design preserves its mathematical shape. Cambridge's computer-graphics notes describe their use in graphic design, typography and PostScript outlines. The industrial context includes Pierre Bézier's work at Renault and Paul de Casteljau's work at Citroën.[ref]
// Target: analysis.bigb
A weighted quadratic Bézier curve with positive middle weight retains endpoint interpolation and endpoint tangent directions while changing the bulge. For a circular arc of angle less than , choose endpoints on the circle, their tangent intersection as the middle control point, and . Unlike an ordinary nonconstant polynomial Bézier curve, this rational representation can describe a circular arc exactly.
For a degree- Bézier curve, the th derivative has degree at most and control points . The first derivative follows by differentiating the Bernstein basis and shifting one summation index; iteration proves the general formula. A parameter interval of length multiplies these derivative controls by .
Two adjacent Bézier curves of degrees and interval lengths have a join precisely when their endpoint positions and their derivatives in the common parameter agree. Parallel endpoint polygon edges alone give tangent-direction agreement; their scaled vectors must be equal for parametric first-derivative continuity.
De Casteljau's algorithm evaluates a Bézier curve by repeated linear interpolation between neighboring control points. Fix , start with , and compute
Each new row has one fewer point. The final point is . Use the same at every stage: it describes the fraction of each line segment traversed from its first endpoint toward its second. A cubic Bézier curve needs three levels containing , , and linear interpolations, respectively.[ref]
For the Bézier curve with control points , , , , evaluation at takes the midpoint of every neighboring pair. The first level gives
The second level gives
and the third level gives
The intermediate control polygons shrink toward the evaluated point. Each step is a convex combination, giving a geometric explanation of the convex hull property; every step also commutes with an affine map.
Figure 1.
Cubic Bézier curve, its convex hull and bounding box, and the three levels of De Casteljau's algorithm at t = 1/2
. Details.
The same construction splits the Bézier curve exactly, with no approximation. The outer edges of the triangular array give the new control points: for a cubic, specify the left piece and specify the right piece.[ref] At these two lists are
Write and for the Bézier curves defined by these lists, each with its own parameter . Then
Their images reproduce the original curve, while their derivatives account for the shorter parameter intervals. At the join,
The chain rule gives ; in the original parameter, both pieces have derivative . This is the interval scaling in the parametric first-derivative join of Bézier curves.
Figure 2.
Exact midpoint subdivision with two smaller control polygons, endpoint tangent directions, and equally spaced parameter samples
. Details.
Repeated midpoint splitting is useful for drawing vector graphics paths: each piece has a smaller control polygon and its own convex hull enclosure. A renderer can refine pieces until they are sufficiently close to line segments at the chosen display scale. Evaluating and splitting it are thus two results of the same short algorithm.
For a proof outline, expanding the recursion gives
Pascal's identity proves this by induction; at , it is precisely the Bernstein basis formula for the Bézier curve. The geometric construction remains useful even when expanding the polynomial by hand would be cumbersome.
// Target: analysis.bigb
A bounding volume is a simple enclosing set for an object : every point of belongs to . Its purpose is to make a cheap rejection possible before examining the object itself. For example, an axis-aligned bounding box can enclose a triangle using just its smallest and largest coordinates.
The guarantee is one-sided. If and , then
Thus an empty set intersection of the bounding volumes certifies an empty set intersection of the objects. An overlap of the bounding volumes is necessary for actual intersection, but does not prove it. This is a conservative enclosure test: rejection is conclusive, acceptance means further examination is needed.
Consider the filled triangles with vertices of a polygon and with vertices of a polygon . Their axis-aligned bounding boxes overlap in . Nevertheless, every point of satisfies , whereas every point of satisfies . The two triangles are disjoint. The shaded square in the bounding volume hierarchy illustration makes this false candidate visible.
For collision detection, a broad phase produces possible object pairs from bounding volume tests; a narrow phase examines the actual shapes, for example with a triangle-triangle intersection algorithm. Scott Le Grand's Chapter 32. Broad-Phase Collision Detection with CUDA explains this separation in its opening paragraphs. Whether touching counts as a collision must be specified by the application.
An enclosure must cover the entire object being queried. A box fitted to samples of a parametric curve only guarantees enclosure of the sampled points, unless a separate bound covers the whole parametric curve. For a Bézier curve, the convex hull of its control points provides such a bound on its defining parameter interval. In floating-point arithmetic, outward rounding can preserve certified coordinate bounds; an inward roundoff error can invalidate a rejection. Bounds must also be updated when objects move.
A conservative enclosure test may retain disjoint objects as candidates, but must never reject a true set intersection. Increasing an enclosure can add candidates while preserving this implication.
Collision detection determines whether geometric objects meet, under a specified convention for touching. A bounding volume test can reject a pair before a more detailed shape test.
The broad phase generates candidate pairs with inexpensive conservative enclosure tests. An accepted pair still needs the narrow phase.
The narrow phase checks the actual objects for candidates retained by the broad phase. Its numerical guarantees depend on the chosen shape test.
// Target: analysis.bigb
A bounding volume hierarchy is a data structure arranged as a rooted tree: leaves store objects, and each internal node stores a bounding volume enclosing its children in a rooted tree. Consequently, every node encloses all objects in its subtree. A common choice is a binary tree of axis-aligned bounding boxes. The objects assigned to sibling subtrees can be different even when their bounding volumes overlap.[ref]
Here is an exact two-dimensional example. Use the triangles from bounding volume, together with having vertices of a polygon and having vertices of a polygon . Group under , and under . Their parent axis-aligned bounding boxes and the box at the root of a tree are
The diagram shows all seven nodes. Taking the coordinate-wise minimum and maximum of the two child boxes constructs each parent box; the resulting box contains the set union of the children, and can also contain empty space between them.
Figure 1.
Four exact triangles, their enclosing boxes, and a seven-node bounding volume hierarchy arranged as a binary tree
. Details.
A bounding volume hierarchy traversal starts at the root of a tree and discards a subtree when its bounding volume misses the query. Accepted internal nodes expose their children; accepted leaves supply candidates for actual shape tests. Box2D's official Collision: Dynamic Tree describes axis-aligned bounding box region queries that return overlapping leaf boxes. A query box that bounds a different query shape can produce additional false candidates.
For the closed query rectangle
left-first depth-first search tests the node boxes in order: root, , , , . The first four overlap ; does not, because its smallest -coordinate is . Pruning skips both and . Five box tests leave two broad phase candidates. The narrow phase rejects , since throughout , and accepts : the point belongs to both and . There are two detailed shape tests and one true hit.
Figure 2.
An exact rectangle query prunes the right subtree and leaves two box candidates but only one triangle hit
. Details.
For a query asking for all intersections, time complexity depends on the number of visited nodes and the cost of each candidate shape test. With fixed dimension and constant bookkeeping cost per node, the work is
where counts candidate objects and is Big O notation. A balanced binary tree has small height of a binary tree, but a query can enter both children at every level. In this example a query containing visits all seven nodes and tests all four triangles. More generally, a full binary tree with single-object leaves has nodes, so such a query takes work for constant-cost shape tests even when its height of a binary tree is . Listing hits itself requires outputs. Small height alone gives no unconditional logarithmic query bound.
For collision detection between two bounding volume hierarchies, traverse pairs of nodes: reject disjoint pairs of bounding volumes, expand a nonleaf member of an accepted pair, and apply the narrow phase at accepted leaf pairs. A single collection's self-query must exclude pairing an object with itself and avoid duplicate unordered pairs. If every object overlaps every other object, reporting all pairs already requires results. Construction quality, empty space in boxes and the queries determine how much pruning is useful.[ref]
For a short correctness outline, an object is enclosed by its leaf box, and each child box is enclosed by its parent box. Repeated subset relations carry this property to every ancestor. A true query intersection therefore prevents rejection at every ancestor of the object's leaf. Updating leaf boxes after motion also requires restoring all affected ancestor bounds before querying.
A bounding volume hierarchy traversal visits only nodes whose ancestors passed a conservative enclosure test. It can use depth-first search; its time complexity depends on how many nodes pass, not just the height of a binary tree.
// Target: optics.bigb
An axis-aligned bounding box is a Cartesian product of closed intervals aligned with a chosen Cartesian coordinate system:
Only the two opposite corners and need to be stored. In two dimensions it is a rectangle. Changing the Cartesian coordinate system can change how tightly the axis-aligned bounding box fits the same object.[ref]
For a nonempty finite set of points , the smallest such axis-aligned bounding box has
These minimum and maximum values also enclose the convex hull of : each coordinate of a convex combination lies between the smallest and largest input coordinates. In particular, three vertices of a polygon determine the axis-aligned bounding box of a filled triangle. For a general nonempty compact set, the same formulas use all its points; inspecting only an arbitrary finite sample is insufficient.
Given nonempty boxes and , the closed interval convention gives
Equivalently, reject as soon as or in any coordinate. The surviving set intersection has endpoints and . This is an exact box test, while its conclusion about enclosed objects remains a conservative enclosure test.[ref]
Equality counts as touching: and share an edge, so their set intersection is nonempty. Replacing every in the overlap formula by tests intersection of the interiors of full-dimensional boxes and excludes this contact. A zero-width closed interval can represent a point or a lower-dimensional enclosure, and must not automatically be discarded when touching counts. A box with some is empty; test emptiness before applying rules intended for nonempty boxes. The broad phase must retain touching candidates whenever the narrow phase counts touching as a hit.
For nonempty boxes, the smallest enclosing axis-aligned bounding box of their set union is
This operation supplies the parent boxes in a bounding volume hierarchy. It is an enclosure of the set union, rather than generally the set union itself. In floating-point arithmetic, comparisons are conclusive only for endpoints that still enclose the intended exact objects; use certified bounds such as interval arithmetic with outward rounding when that guarantee is required.
// Target: analysis.bigb
For two noncoplanar triangles, first reject vertices strictly on one side of the other triangle's plane. Otherwise intersect each triangle with the other plane and compare the resulting intervals along the common line. Coplanar triangles require a planar overlap test; zero-area triangles require separate line segment or point tests.
// Target: analysis.bigb

Articles by others on the same topic (0)

There are currently no matching articles.