CG Unit 3
CG Unit 3
Displays of three dimensional curved lines and surfaces can be generated from an input set of
mathematical functions defining the objects or from a set of users specified data points.
When functions are specified, a package can project the defining equations for a curve to the display
plane and plot pixel positions along the path of the projected function.
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.
• 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
• The Cartesian representation for points over the surface of an ellipsoid centered on the origin
is
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
In parametric form
2. Superellipsoid
• Figure 10-13 illustrates supersphere shapes that can be generated using various values for
parameters s1 and s2.
• These and other superquadric shapes can be combined to create more complex structures,
such as furniture, threaded bolts, and other hardware
Spline
Drafting terminology
• 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.
Spline Representations
• 2D illustration
• Fonts
• 3D Modelling
• Animation
Big Idea
• User specifies control points
• Approximation – the curve does not pass through all of the control points
Convex Hulls
• The boundary formed by the set of control points for a spline is known as a convex hull
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 −
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
X2 + y 2 – R 2 = 0
Explicit Curves
Parametric curve
• The explicit and implicit curve representations can be used only when
• Every point on the curve is having two neighbors (other than the end points).
• 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].
• 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.
• First parametric derivatives (tangent lines) of the coordinate functions two successive curve
sections are equal at their joining point.
• Second-order parametric continuity, or C2 continuity, means that both the first and second
parametric derivatives of the two curve sections are the same at the intersection.
• geometric continuity.
• the two curves sections must have the same coordinate position at the boundary point (
Same as zero order parametric continuity)
• the parametric first derivatives are proportional at the intersection of two successive sections
(In parametric continuity these are equal)
• both the first and second order derivatives of the two 2.curve sections are proportional at
their boundary
Spline Specification
There are three equivalent methods for specifying a particular spline representation:
(1) We can state the set of boundary conditions that are imposed on the spline;
boundary conditions
• Boundary conditions for this curve might be set, for example, on the endpoint coordinates
x(0) and x(l) and on the parametric first derivatives at the endpoints x'(0) and x '(1) .
• Boundary conditions are sufficient to determine the values of the four coefficients ax, bx,
cx, and dx.
Matrix Form
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.
• The simplest Bézier curve is the straight line from the point P0 to P1.
• They generally follow the shape of the control polygon, which consists of the segments joining
the control points.
• They always pass through the first and last control points.
• They are contained in the convex hull of their defining control points.
• The degree of the polynomial defining the curve segment is one less that the number of
defining polygon point. Therefore, for 4 control points, the degree of the polynomial is 3, i.e.
cubic polynomial.
• The direction of the tangent vector at the end points is same as that of the vector determined
by first and last segments.
• The convex hull property for a Bezier curve ensures that the polynomial smoothly follows the
control points.
• No straight line intersects a Bezier curve more times than it intersects its control polygon.
• Bezier curves exhibit global control means moving a control point alters the shape of the
whole curve.
• A given Bezier curve can be subdivided at a point t=t0 into two Bezier segments which join
together at the point corresponding to the parameter value t=t0.
• Suppose we are given n + 1 control-point positions: pk = (xk, yk, zk), with k varying from 0 to
n.
• These coordinate points can be blended to produce the position vector P(u), which describes
the path of an approximating Bezier polynomial function between P0 and Pn
Bezier curves Numericals and derivation
Beizer curve.
2) Set up the equation of Beizer curve and roughly trace it for three