Surfaces and Curves.
Surfaces and Curves.
Introduction
• Graphics scenes can contain many different kinds of
objects
• No one method can describe all these objects
• Accurate models produce realistic displays of scenes
• Polygon and quadric surfaces
• Spline surfaces and construction techniques
• Procedural methods
• Physically-based modeling methods
• Octree encodings
• Boundary representations (B-reps)
• Space-partitioning representations
Polygon Surfaces
• The most commonly used boundary representation
• All surfaces are described with linear equations
• Simplify and speed up surface rendering and display of
objects
• Precisely define a polyhedron
• For non-polyhedron objects, surfaces are used
• Commonly used in design and solid modeling
• The wireframe outline can be display quickly
Polygon Tables
v3 S2 v5
E2
E4 E5
v2
v4
Polygon Tables
Plane Equations
• The equation for a plane surface
• Ax + By + Cz +D = 0
• By Cramer’s rule:
N=(A,B,C)
Plane Equations
• Identify a point (x, y, z) as either inside or outside a plane
surface
• In a right-handed coordinate system, the plane
parameters A, B, C, and D were calculated using vertices
selected in a counterclockwise order when viewing the
surface in an outside-to-inside direction.
Curve
Control Control
Points Points
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
Bézier Spline Curves
• A spline approximation method developed by
the French engineer Pierre Bézier (1962)for
use in the design of Renault car bodies
• A Bézier curve can be fitted to any number of
control points – although usually 4 are used
• Bezier splines :useful and convenient for curve
and surface design
• A Bezier curve is a parametric curve frequently
used in computer graphics and related fields.
• Generalizations of Bezier curves to higher
dimensions are called Bezier surfaces, of which
the Bezier triangle is a special case.
• Bezier curves are used to model smooth
curves that can be scaled indefinitely.
Bézier Spline Curves (cont…)
• Consider the case of n+1 control points
denoted as pk=(xk, yk, zk) where k varies
from 0 to n
• The coordinate positions are blended to
produce the position vector P(u) which
describes the path of the Bézier polynomial
function between p0 and pn
n
P (u ) pk BEZ k , n (u ), 0 u 1
k 0
Bézier Spline Curves (cont…)
• The Bézier blending functions BEZk,n(u) are
the Bernstein polynomials
k n k
BEZ k ,n (u ) C (n, k )u (1 u )
BEZ
k 0
k ,n (u ) 1
Means curve position is weighted sum of control points positions. It ensures
that polynomial smoothly follows control points without oscillations.
Convex Hull Property
• The properties of the Bernstein polynomials ensure
that all Bezier curves lie in the convex hull of their
control points.
• Hence, even though we do not interpolate all the data,
we cannot be too far away.
p1 p2
convex hull
Bezier curve
p0 p3
Bezier Curves
• The degree of the Bezier polynomial
• One less than the number of control points used.
• The relative position of control points
• With certain placements, we obtain degenerate
Bezier polynomials.
Design Techniques Using Bezier Curves
• Closed Bezier curves
• Specifying the first and last control points at the same
position.
• Multiple control points
• Specifying multiple control points at a single
coordinate position gives more weight to that
position.
Cubic Bezier Curves
• Four blending functions for cubic Bezier curves
BEZ 0,3 (u ) (1 u )3
2
BEZ1,3 (u ) 3u(1 u )
BEZ 2,3 (u ) 3u 2 (1 u )
3
BEZ 3,3 (u ) u
• Its parametric
vector function
is formed as
the Cartesian
product of
Bezier
blending
functions
• The form of blending function determine how the control
points influence shape of curve for values of parameter u
over range from 0 to 1.
• At u=0, blending function is BEZ 0,3 ,which has value 1.
• At u=1, blending function is BEZ 3,3 ,which has value of 1 at
that point.
• So, Cubic bezier curve will always pass through control
points p0 and p3.
• Other fuctions BEZ 1,3 and BEZ 2,3 influence shape of curve
at intermediate values of parameter u,so curve tends
towards points p1 and p2.
• Blending function BEZ 1,3 is maximum at u = 1/3.
• Blending function BEZ 2,3 is maximum at u = 2/3.
Disadvantages
B
k 0
k ,d (u ) 1
P’start = P1 -P0
p0
p3 P’end = P3 -P2