Curves and Surfaces: UNIT-4 By: Sandeep Kumar AP CSE Department
Curves and Surfaces: UNIT-4 By: Sandeep Kumar AP CSE Department
Curves and Surfaces: UNIT-4 By: Sandeep Kumar AP CSE Department
UNIT-4
By :
Sandeep Kumar
AP CSE Department
QUADRIC SURFACES
A frequently used class of objects are the quadric surfaces, which are described
with second-degree equations (quadratics). They include spheres, ellipsoids, tori,
paraboloids, and hyperboloids. Quadric surfaces, particularly spheres and
ellipsoids, are common elements of graphics scenes, and they are often available
in graphics packages as primitives from which more complex objects can be
constructed.
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
x2+y2+z2 = r2
We can also describe the spherical surface in parametric form, using latitude and
longitude angles
Blobby objects
Some objects do not maintain a fixed shape, but change their surface
characteristics in certain motions or when in proximity to other objects.
Examples in this class of objects include molecular structures, water droplets and
other liquid effects, melting objects, and muscle shapes in the human body. These
objects can be described as exhibiting "blobbiness" and are often simply referred
to as blobby objects, since their shapes show a certain degree of fluidity.
Blobby objects
Several models have been developed for representing blobby objects as
distribution functions over a region of space known as surface functions. A
surface function is defined as
f(x,y,z) = ∑k bk*exp(-ak*r2k) - T =0
points
Convex Hull
The convex polygon boundary that encloses
a set of control points is called the convex
hull.
● explicit,
● Implicit,
● 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
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 −
● The functions f and g become the (x, y) coordinates of any point on the curve,
and the points are obtained when the parameter u is varied over a certain
interval [a, b], normally [0, 1].
Parametric Continuity Conditions
To ensure a smooth transition from one section of a piecewise parametric curve
to the next, we can impose various continuity conditions at the connection points.
If each section of a spline is described with a set of parametric coordinate
functions of the form
1. We can state the set of boundary conditions that are imposed on the spline.
2. we can state the matrix that characterizes the spline
3. we can state the set of blending functions (or basis functions)
Suppose we have the following parametric cubic polynomial representation for the
x coordinate along the path of a spline section:
Boundary Conditions
● Boundary conditions for this curve might be set,
● for example, on the endpoint coordinates x(0) and x(1) and on the parametric
first derivatives at the endpoints x'(0) and x'(1) .
● These four boundary conditions are sufficient to determine the values of the
four coefficients ax, bx, cx, and dx.
From the boundary conditions, we can obtain the matrix that characterizes this
spline curve by first rewriting the equation
as the matrix product
Boundary Conditions
Matrix Form
we can obtain the matrix that characterizes this spline curve by first rewriting
equation as the matrix product
Blending Functions
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.
BEZIER CURVES
A Bezier curve section can be fitted to any number of control points. The number
of control points to be approximated and their relative position determine the
degree of the Bezier polynomial. As with the interpolation splines, a Bezier curve
can be specified with boundary conditions, with a characterizing matrix, or with
blending functions. For general Bezier curves, the blending-function specification
is the most convenient.
BEZIER CURVES...
● Bezier curve is defined by a set of control points b0, b1, b2 and b3.
● Points b0 and b3 are ends of the curve.
● Points b1 and b2 determine the shape of the curve.
BEZIER CURVES...
Bezier Curve Properties:
1. Bezier curve is always contained within a polygon called as convex hull of its
control points.
2. The first and last points of the curve are coincident with the first and last
points of the defining polygon.
3. The degree of the polynomial defining the curve segment is one less than the
total number of control points. (Degree = Number of Control Points – 1)
BEZIER CURVES...
Bezier Curve Equation-
● t is any parameter where 0 <= t <= 1
● P(t) = Any point lying on the bezier curve
● Bi = ith control point of the bezier curve
● n = degree of the curve
● Jn,i(t) = Blending function = C(n,i)ti(1-t)n-i where C(n,i) = n! / i!(n-i)!