Report 7
Report 7
Curves
1. Curves
2. Properties
3. Polynomial pieces
5. Cubics
6. Approximating curves
7. References
Curves
-
A curve can be intuitively thought of as the path traced by a pen over a period of time. While most
often considered in a 2D space (as on paper), curves can also exist in 3D space or even other abstract
spaces. Mathematically, curves can be understood in two primary ways:
As a continuous image of an interval: This defines the curve as the set of points traced over time.
As a continuous map: This describes the curve as a function mapping time to specific points in space.
In this discussion, we focus on the first definition, where the curve is a set of points. A curve is
composed of an infinite number of points, each typically having two neighbors, except endpoints (if
they exist). Some curves may be infinite or closed (forming loops), while others may have distinct
endpoints.
Curves are generally thin and outline shapes rather than filling regions. Although mathematical
constructs like space-filling curves exist, they are outside the scope of this discussion. Instead, we
focus on curves as outlines, useful for representing shapes.
To use curves in computations or graphics, we need a way to represent or "name" them. While some
curves, such as lines or circles, have standard representations, others, known as free-form curves,
can take on arbitrary shapes and are more complex to specify. There are three primary
mathematical representations of curves:
• Implicit Representation:
A curve is defined as the set of points satisfying an equation f(x,y)=0. For example, the circle
defined by x2+y2−1=0. Implicit functions are scalar functions that return a single real value.
• Parametric Representation:
A curve is defined as a function mapping a parameter (e.g., time) to a point. For example, a circle
can be represented parametrically as (x,y)=(cost,sint) for t∈[0,2π). Parametric functions are
vector-valued, with outputs that can represent positions in 2D or 3D space. This form is
particularly intuitive and widely used in computer graphics because it is easy to sample and
render.
• Generative or Procedural Representation:
Curves are generated using algorithms or processes, such as subdivision schemes or fractals.
These representations are useful for certain complex shapes that cannot be easily described by
implicit or parametric equations.
Although curves are sets of points, their representations offer ways to describe and manipulate these
sets. Different representations come with trade-offs. For instance, parametric curves are easier to
sample and render, making them the preferred choice in computer graphics. On the other hand,
implicit forms can simplify calculations like determining whether a point lies on a curve.
A single curve can often be expressed in multiple ways. For example, the circle x2+y2−1=0 in
implicit form is equivalent to the parametric representation (x,y)=(cost,sint). However,
depending on the application, one representation might be more convenient or practical than
the others.
While this chapter focuses on parametric representations due to their computational
advantages, it is essential to recognize that all representations provide valuable tools for
understanding and utilizing curves in mathematical and graphical contexts.
where ( df(t)/dt )represents the derivative of the curve. Computing s often requires numerical
methods, as closed-form solutions are rarely available.
In practice, we use:
u for free parameters ranging over [0,1].
s for arc-length parameters.
t for other parameters that do not fit the previous categories.
Arc-length parameterization is particularly useful for applications requiring consistent motion along
a curve, such as animations or robotics. However, due to its computational complexity, simpler
parameterizations are often used unless precise control over curve traversal is needed.
Splines
Before the advent of computers, draftsmen used a flexible metal tool called a spline to create
smooth curves. The metal's stiffness allowed it to bend smoothly without folding, naturally
forming the desired shape.
Mathematicians modeled these curves using piecewise polynomial functions. Initially, the term
"spline" referred specifically to smooth, piecewise polynomial functions. Over time, its meaning
broadened to encompass any piecewise polynomial function.
In this context, a spline is defined as a piecewise polynomial function, which is highly effective for
representing curves.
Curve Properties
-
To describe a curve, its properties must be identified. For named curves (e.g., circles or ellipses),
these are typically specific characteristics such as the radius and center position for a circle or
the orientation and axis ratio for an ellipse. For free-form curves, a broader set of properties is
required.
Types of Curve Properties:
1. Local Properties: These describe characteristics of the curve at a specific location, independent
of the entire shape. Examples include:
• Continuity.
• Position at a point.
• Direction at a point.
• Curvature and other derivatives.
An analogy is a train track in the fog: standing on the track,
you can discern if it's straight, curved, or at an endpoint, but
not whether it forms a loop or its total length.
2. Global Properties: These require knowledge of the entire curve,
such as whether it is closed, crosses itself, or its total length.
The study of local properties of curves and surfaces is known as differential geometry. Local
properties focus on characteristics that can be discerned without external tools like GPS or
compasses, providing a mathematical framework for analyzing curves.
A curve is said to interpolate a point if that point lies on it. For a function f(t), it interpolates a
value v if there exists a parameter t such that f(t) = v. The value of t where interpolation occurs is
called the site.
Continuity
Understanding the continuity of curves is crucial for ensuring smooth transitions between
parametric segments. When combining two curve pieces, their endpoints must align. If f1(1) = f2(0),
the curve will have a visible break and fail to form a continuous stroke, violating the fundamental
definition of a curve.
1. Positional Continuity (C₀):
Ensures the endpoints of adjoining segments meet (f1(1) = f2(0)).
2. First Derivative Continuity (C₁):
The tangent vectors at the connection point match (f'1(1) = f'2(0)), avoiding sharp corners.
3. Second Derivative Continuity (C₂):
Ensures smooth curvature transitions, often important for applications like motion or fluid
dynamics.
4. Higher Derivative Continuity (Cₙ):
Rarely needed but may be required for specific scenarios, such as turbulence-free designs (e.g.,
airplane wings).
Geometric vs. Parametric Continuity
• Parametric Continuity (Cₙ): Depends on the parameterization of the curve. For example, unequal
speeds across segments can cause discontinuity.
• Geometric Continuity (Gₙ): Focuses on the shape of the curve, ensuring derivatives are
proportional in direction but not necessarily in magnitude. For instance:
f'1(1) = k * f'2(0),
where k is a scalar.
Geometric continuity is less restrictive than parametric continuity and allows for more flexible
representations.
Polynomial Pieces
The most widely used representations of curves in computer graphics is done by piecing together basic
elements that are defined by polynomials and called polynomial pieces.
Polynomial notation
Polynomials are functions expressed as a sum of terms involving powers of a variable t, written as:
f(t) = a0 + a1t + a2t 2 + … + ant n ,
where ai are coefficients, and n is the polynomial's degree (if an = 0 ).
This form is called the canonical form. It can also be generalized as:
Cubics
In computer graphics, piecewise polynomials are commonly used to represent curves, with cubic
polynomials being particularly popular. This preference arises due to several reasons:
2
1. Sufficient Continuity: Cubic polynomials allow for C continuity, which is generally adequate for
1
most visual applications. While quadratic polynomials offer only C smoothness, higher-order
polynomials typically do not justify their added complexity.
2. Minimum-Curvature Interpolation: Cubic polynomials can represent the smoothest possible
curve that passes through a given set of points by minimizing curvature over the curve's
length.
3. Symmetry and Control: They exhibit a symmetry that allows specification of both position and
derivative at the start and end of a curve segment.
4. Trade-off in Numerical Stability and Smoothness**: Cubics strike a balance between
computational complexity and the degree of smoothness provided.
The canonical form of a cubic polynomial is expressed as:
f(u) = a0 + a1*u + a2*u 2 + a3*u 3 .
However, this representation is not always the most convenient for controlling curves. To address
this, alternative representations of cubic polynomials are used to simplify control and ensure
smooth connections between curve segments.
Each cubic polynomial segment requires four coefficients or control points. For a piecewise
cubic polynomial curve with n segments:
• Up to 4n control points might be needed without sharing or dependencies.
• Sharing points or enforcing dependencies between adjacent segments typically reduces the
total number of control points.
There is no single representation that simultaneously achieves:
1. Cubic segments for all pieces.
2. Curve interpolation at control points.
3. Local control of the curve.
2
4. C continuity across segments.
Different representations prioritize three of these properties, but not all four.
Natural cubics
2
Natural cubic splines are used to create smooth curves with C continuity, meaning the curve is
smooth in terms of position, slope, and curvature across its segments. Each cubic segment is
connected by matching the position, first derivative (slope), and second derivative (curvature) at
the endpoints.
The control points for these splines include the endpoints of each segment and the first and
second derivatives at the start of the curve. However, most of the derivatives are determined by
the previous segment, so only a few parameters are independently adjustable.
One major drawback is that natural cubic splines lack local control. Changing one part of the
curve can affect the rest of it, which can make adjustments harder. They are also sensitive to
changes, meaning a small tweak at the start can cause big changes further along the curve.
Additionally, users only have direct control over the starting derivatives, while the rest are
calculated automatically based on earlier segments.
Despite these challenges, natural cubic splines are great for situations where a very smooth curve
is more important than having precise, localized control.
Cardinal cubics
1
Cardinal cubic splines are C continuous curves made up of cubic polynomial segments that
interpolate a set of points. They provide local control and allow for smooth transitions between
points, making them useful for many applications.
Each segment in a cardinal spline uses four control points: two that define the segment's start and
end, and two additional points that influence the derivatives at the segment's boundaries. These
derivatives are calculated using the surrounding control points. A parameter called tension controls
how tightly the curve bends around the points. A tension value of 0 produces a Catmull-Rom spline, a
commonly used special case.
1
While cardinal splines ensure smooth C transitions, they do not achieve C continuity. Additionally,
2
the curve does not interpolate the first and last control points unless extra points are added at the
ends.
Cardinal splines are preferred over high-degree interpolating polynomials because they avoid issues
like overshooting and lack of local control. Instead, they provide a practical and visually smooth
interpolation method with reasonable computational efficiency.
Approximating curves
In computer graphics, curve control can be achieved through interpolation or approximation. While
interpolation forces a curve to pass through specific points, it often lacks smoothness and
flexibility. Approximation schemes, like Bézier and B-spline curves, instead use control points to
influence the curve's shape without explicitly passing through them. This approach offers smoother
behavior, local control, and versatility, making it a preferred choice in many applications.
Bézier curves
Bézier Curves provides an in-depth explanation of the properties and applications of Bézier curves,
a fundamental tool in computer graphics for creating smooth, free-form shapes. These curves are
named after Pierre Bézier, who contributed significantly to their development, and have been
independently explored by several researchers. Their flexibility, precision, and computational
efficiency make them indispensable in various fields, such as design, animation, and font rendering.
A Bézier curve is defined by a polynomial of degree d and is controlled by d+1 control points. The
curve interpolates the first and last control points, ensuring it begins and ends at these positions,
while the intermediate control points shape the curve without necessarily lying on it. This behavior
allows designers to have intuitive control over the curve's appearance. The derivatives at the curve's
endpoints are influenced by the control points. For instance, the first derivative depends on the
vectors between the first two and last two control points, providing a natural way to define the
curve's direction and smoothness. ·
In practice, Bézier curves of any degree can be used, but cubic Bézier curves (d=3) are
most common because they balance flexibility, smoothness, and computational efficiency. A
cubic Bézier curve is defined by four control points. It interpolates the first and last points
and uses the intermediate points to determine the first and second derivatives at the
endpoints. These curves are widely used to construct complex shapes by connecting
multiple cubic segments.
The document highlights several advantages of Bézier curves. They are straightforward to
manipulate through their control points, enabling precise adjustments to the curve's
shape. Their convex hull property ensures the curve remains bounded within the polygon
formed by the control points, simplifying visualization and bounding box calculations.
Bézier curves also possess the variation diminishing property, meaning the curve does not
oscillate more than its control polygon, leading to smooth, predictable shapes.
One of the key computational benefits of Bézier curves is the existence of efficient
algorithms for evaluation and manipulation, such as the de Casteljau algorithm. This
recursive approach not only computes points on the curve but also facilitates subdivision
into smaller Bézier segments, enabling divide-and-conquer strategies for rendering,
collision detection, and intersection testing.
Applications of Bézier curves are widespread. In graphic design, tools like Adobe Illustrator
rely on cubic Bézier curves for vector graphics. Font rendering systems, such as
PostScript, use these curves to define character outlines. The ability to easily interpolate,
approximate, and manipulate shapes makes Bézier curves integral to modern computer
graphics, ensuring smooth, precise, and visually appealing results across various domains.
B-splines
B-splines are a method for approximating a set of points with a curve composed of polynomials
d-1
of degree d that provide C continuity. Unlike Bézier splines, B-splines do not necessarily
interpolate their control points but are shaped by their influence. This makes B-splines well-
suited for creating smooth curves with high levels of continuity.
A B-spline curve is defined as a linear combination of basis splines (B-splines), which are
themselves piecewise polynomials of degree d. These basis functions allow for:
• Local Control: Changes to a control point only affect the curve locally.
• Convex Hull Property: The curve lies within the convex hull of its control points.
• Variation Diminishing Property: The curve oscillates no more than the control polygon.
B-splines are highly flexible due to their ability to use uniform or non-uniform knot spacing.
Uniform B-splines have evenly spaced knots, leading to consistent behavior, while non-uniform
B-splines allow for customized control over the curve's shape. B-splines are particularly
2
advantageous for applications requiring high continuity and smoothness, such as creating C or
higher-continuity curves.
NURBS
NURBS extend B-splines by introducing rational components, allowing the representation of
shapes and curves that standard B-splines cannot achieve. They use a weighted combination of
control points and are defined by a ratio of two functions:
• The numerator and denominator are composed of B-spline basis functions.
• By assigning weights to control points, NURBS provide enhanced flexibility and precision in
shaping curves.
This capability is particularly useful for accurately representing conic sections, such as circles
and ellipses, which cannot be directly modeled with polynomial B-splines.
References
http://repo.darmajaya.ac.id/5422/1/
Fundamentals%20of%20Computer%20Graphics%2C%20Fourth%20Edition%20%28%20PDFDrive%
20%29.pdf