0% found this document useful (0 votes)
39 views

Computer Graphics (CSE 4103)

The document discusses different types of parametric curves used to represent curves in computer graphics. It describes parametric cubic curves defined by equations with t varying between 0 and 1. It also discusses Hermite curves defined by two endpoints and two tangent vectors, as well as Bezier curves defined by two endpoints and two control points that indirectly specify the tangents. Finally, it introduces spline curves as piecewise polynomial curves formed by connecting multiple curve segments, with each segment influenced by a few control points.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Computer Graphics (CSE 4103)

The document discusses different types of parametric curves used to represent curves in computer graphics. It describes parametric cubic curves defined by equations with t varying between 0 and 1. It also discusses Hermite curves defined by two endpoints and two tangent vectors, as well as Bezier curves defined by two endpoints and two control points that indirectly specify the tangents. Finally, it introduces spline curves as piecewise polynomial curves formed by connecting multiple curve segments, with each segment influenced by a few control points.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Department of Computer Science and Engineering,

Computer Graphics (CSE 4103)

University of Dhaka
Lecture 17
Representing Curves
Parametric Cubic Curves
Parametric cubic curves are of the following form:

with t on the interval [0, 1].


The above equations can be represented as

where,
Parametric Cubic Curves
The derivative of the curve is tangent vector, which is given by:

And the Tangent has both direction and magnitude

Two types of continuity are defined for parametric curves: Geometric continuity
(Gn) and Parametric continuity (Cn)

G0 Geometric continuity means the endpoint match.


G1 Geometric continuity means the tangent directions match (magnitude may or
may not match)

Cn continuity means the nth derivatives match


C0 continuity means the endpoints match (similar to G0)
C1 continuity means the tangent vectors direction and magnitude match
Parametric Cubic Curves
Generic Form

We rewrite the coefficient matrix C as a product of two matrices C = M.G


M is a 4 x 4 matrix called basis matrix
G is a 4 x n geometry matrix composed of a column of n-dimensional
(such as end points or tangent vectors)
Parametric Cubic Curves
Generic Form
For x term only (y(t) and z(t) are analogous), x(t) = T. M. Gx

Above is just a weighted sum of cubic equations. The equations are


determined by M and weights are the control points.

The different cubic polynomials are called blending functions and are
given by B = T. M.
Hermite Curve
Hence,

For this to be true


Hermite Curve

By expanding this, we get the Hermite Blending Functions:

Q(t) = (2t3-3t2+1)P1 + (-2t3+3t2)P4+(t3-2t2+t)R1+(t3-t2)R4

The Hermite blending functions


Hermite Curve

Example of few Hermite Curves Continuous Hermite Curves


Bezier Curve
Instead of two endpoints and two tangents, we specify two endpoints
P1 and P4, and two control points P2 and P3 that indirectly specify the
tangents.

P2 P2
P3
P4

P1 P1

P4
P3
Bezier Curve
Bezier Curve
Bernstein Polynomial
Bezier Curve
Q(t) = (1-t)3 P1 + 3t(1-t)2 P2 + 3t2(1-t) P3 + t3 P4

Q(t) = (1-3t + 3t2 –t3) P1 + 3t(1-2t+t2) P2 + 3t2(1-t) P3 + t3 P4


Q(t) = (1-3t + 3t2 –t3) P1 +
(3t-6t2+3t3) P2 +
(3t2-3t3) P3 +
t3 P4

[t3 t2 t 1] -1 3 -3 1 P1
3 -6 3 0 P2
-3 3 0 0 P3
1 0 0 0 P4
Bezier Curve
Q(t) = (1-t)3 P1 + 3t(1-t)2 P2 + 3t2(1-t) P3 + t3 P4

Blending function or Bernstein Polynomial


Spline Curve
Originally, splines were strips of metal bent with weights, and
used to lay out surfaces of cars, airplanes, etc.

B-splines are curve segments whose coefficients depend on


just a few control points.

Approximate a series of m+1 control points P0, P1, .., Pm with


m-2 cubic curve segment Q3, Q4, Qm.

Adjust parameters of each segment so that range of t is


contiguous over whole curve.

Each segment is thus associated with a range of t


Uniform B-Spline Curve
Curve segments are joined at knots, and the parameter value
at such a join is called the knot value. Initial and final points are
also knots.

The qualifier uniform means knots are spaced regularly in t.


Thus without loss of generality, we can let the interval between
knots be 1.

Each segment is defined by contiguous control points (lots of


overlap)

Each control point affect 4 segments, so moving a control


point moves the 4 segments in the same direction.
Uniform B-Spline Curve
Uniform B-Spline Curve

Blending function for Uniform B-spline


Thank you

You might also like