Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
150 views60 pages

Curves and Surfaces in Graphics

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
150 views60 pages

Curves and Surfaces in Graphics

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 60

COMPUTER GRAPHICS

UNIT-IV

Lecture Notes
Prepared By :
DR PAWAN KUMAR GOEL
Unit- IV - Curves and Surfaces:

1. Quadric surfaces
2. Blobby objects
3. Introductory concepts of Spline
4. Bspline and Bezier curves and surfaces.
Quadric surfaces

• A frequently used class of objects are the quadric surfaces, which are
described with second-degree equations (quadratics).
• They include
1. Spheres,
2. Ellipsoids,
3. Paraboloids,
4. Hyperboloids etc.
Quadric surfaces
Sphere
• In Cartesian coordinates, a spherical surface with radius r centered on
the coordinate origin is defined as the set of points (x, y, z) that satisfy
the equation
Sphere in parametric form
Ellipsoid
• An ellipsoidal surface can be described as an extension of a spherical
surface, where the radii in three mutually perpendicular directions
can have different values.
Ellipsoid
• The Cartesian representation for points over the surface of an
ellipsoid centered on the origin is
Ellipsoid - Parametric representation
Superquadrics
Superquadrics
• Superquadrics are formed by incorporating additional parameters
into the quadric equations to provide increased flexibility for
adjusting object shapes.
• The number of additional parameters used is equal to the dimension
of the object: one parameter for curves and two parameters for
surfaces.

1. Superellipse
2. Superellipsoid
Blobby objects
Blobby object are non-rigid object that do not have fixed shape and
change their surface characteristics in certain motions.
• These objects are referred to as blobby objects, since their shapes show a
certain degree of fluidity
• Examples in this class of objects include
1. water droplets
2. melting objects
3. muscle shapes in the human body.
4. Molecular structures
Blobby objects
• Several models have been
developed for representing blobby
objects as distribution functions
over a region of space.
• Combinations of Gaussian density
functions, or "bumps“ (Fig 10.16)
Blobby objects
• Several models have been
developed for representing blobby
objects as distribution functions
over a region of space.
• Combinations of Gaussian density
functions, or "bumps“ (Fig 10.16)
Blobby objects

• A surface function is then defined as


Types of Curves
• A curve is an infinitely large set of points. Each point has two
neighbors except endpoints. Curves can be broadly classified into
three categories −
• explicit, implicit, and parametric curves.
Implicit Curves

• Implicit curve representations define the set of points on a curve by


employing a procedure that can test to see if a point in on the curve.
• Usually, an implicit curve is defined by an implicit function of the
form −
• f(x, y) = 0
• Eg. A common example is the circle, whose implicit representation is
• x2 + y2 - R2 = 0
Explicit Curves

• A mathematical function y = f(x) can be plotted as a curve.


• Such a function is the explicit representation of the curve.
Parametric curve
• The explicit and implicit curve representations can be used only when
the function is known.
• Curves having parametric form are called parametric curves.
• In practice the parametric curves are used.
• Every point on the curve is having two neighbors (other than the end
points).
• A two-dimensional parametric curve has the following form −
• P(t) = f(t), g(t) or P(t) = x(t), y(t)
• The functions f and g become the (x, y) coordinates of any point on
the curve, and the points are obtained when the parameter t (or u)
is varied over a certain interval [a, b], normally [0, 1].
Spline
• Spline is a flexible strip that is easily flexed to pass through a series
of design points (control points) to produce a smooth curve.
• Spline curve – a piecewise polynomial (cubic) curve whose
first and second derivatives are continuous across the
various curve sections.
Interpolation Vs Approximation
• A spline curve is specified using a
set of control points
• There are two ways to fit a curve to
these points:
• Interpolation - the curve passes
through all of the control points
• Approximation - the
curve does not pass
through all of the control
points
• Approximation for structure or shape
• Interpolation for animation
Bezier curves
• Bezier curve is discovered by the French engineer Pierre Bézier.
• These curves can be generated under the control of other points.
Approximate tangents by using control points are used to generate
curve.
• The simplest Bézier curve is the straight line from the point P0 to
P1.
• A quadratic Bezier curve is determined by three control points.
• A cubic Bezier curve is determined by four control points.
Bezier curves Numericals and derivation
Bezier curves and surfaces
Bezier curves and surfaces
Bezier curves and surfaces
Bezier curves and surfaces
Bezier curves and surfaces
• 1)Given control points (10,100), (50, 100), (70,120) and (100, 150).
Calculate coordinates of any four points lying on the corresponding
Beizer curve.

• 2) Set up the equation of Beizer curve and roughly trace it for three
control points (1,1), (2,2) and (3,1).
(From CO-RCS603.4)
Let P0(0, 0), P1(1, 2), P2(2, 1), P3(3, 1), P4(4, 10) and P5(5, 5) be given data
control points. If interpolation based on Bezier curve is used to find a curve
interpolating these data points. Find parametric midpoint of the gradient
and also calculate coordinate of parametric quartiles of the curve.

Write at least four properties of Bezier curves. Calculate and also,


roughly trace the Bezier curve for three control points (1, 1), (2, 2) and
(3, 1).

Construct enough points on the Bezier curve whose control points are
p0(4, 2), p1(8, 8) and p2(16, 4) to draw an accurate sketch.
1. What is the degree of the curve ?
2. What are coordinates at u = 0.5.
Concept of B-spline curve came to resolve the disadvantages having
by Bezier curve, as we all know that both curves are parametric in nature. In
Bezier curve we face a problem, when we change any of the control point
respective location the whole curve shape gets change. But here in B-spline
curve, the only a specific segment of the curve-shape gets changes or
affected by the changing of the corresponding location of the control points.

In the B-spline curve, the control points impart local control over the curve-
shape rather than the global control like Bezier-curve.

B-spline curve shape before changing the position of control point P1 –


B-spline curve shape after changing the position of control point P1 –

You can see in the above figure that only the segment-1st shape as we have
only changed the control point P 1, and the shape of segment-2nd remains intact.

B-spline Curve :
As we see above that the B-splines curves are independent of the number of
control points and made up of joining the several segments smoothly, where each
segment shape is decided by some specific control points that come in that
region of segment.
Feature Bezier Curve B-Spline Curve

Defined by a single polynomial equation of Defined by multiple piecewise polynomial segments,


Definition
fixed degree across the curve. controlled by a knot vector.

Control Points Each control point affects only a local segment of the
Each control point influences the entire curve.
Influence curve.

Lacks local control; changing a control point Has local control; changing a control point affects only
Local Control
affects the entire curve shape. a part of the curve, providing greater flexibility.

The degree is independent of the number of control


Degree and The degree is fixed by the number of control
points and can be chosen based on smoothness
Flexibility points (degree = number of control points - 1).
requirements.

Uses a knot vector to define the parametric intervals


Knot Vector Not used.
and segment influence of control points.

Generally C^n-1 continuous (for degree n)


Can achieve higher continuity (C^1, C^2, etc.) by
Continuity throughout. Higher continuity can be
adjusting degree and knot vector configuration.
challenging.
Limited shape flexibility as the curve Greater shape flexibility as the curve can pass
Shape Flexibility tends to be constrained between close to control points or create more complex
control points. shapes.

The curve starts and ends at the first Can be clamped or unclamped, allowing
Clamped Ends
and last control points. flexibility to start or end at the control points.

Suitable for simple shapes, animation Ideal for complex shapes, CAD/CAM, and multi-
Use Cases
paths, and single-segment curves. segment curves with smooth transitions.

Computational Generally requires fewer calculations More computationally intensive, but scalable
Efficiency but lacks scalability. with higher control over the curve's shape.

Can be converted into a B-spline curve Cannot be directly converted to a Bezier curve,
Conversion
(special case of B-splines). as it is more general and versatile.
Hermite curve
A Hermite curve is a type of mathematical curve that is defined by its
endpoints and associated tangent (or derivative) vectors at those endpoints. It
is widely used in computer graphics, animation, and geometric modeling for
creating smooth transitions between two points, as it provides direct control
over the curve’s shape at each endpoint.

You might also like