10 Surface Modeling 1
10 Surface Modeling 1
Surface Modeling
⚫ Shape design and representation of complex
objects can not be achieved by lines and
curves
⚫ We need to describe objects precisely and
accurately
⚫ Surface description is usually tackled as an
extension to the wireframe representation
⚫ We create surfaces and then we use them to
cut and trim solid features and primitives to
obtain the models of complex objects
2
Surface Modeling
⚫ “Rich” Models
⚫ More complete and less ambiguous than wire
frame model
⚫ Can provide hidden line and surface algorithms
to add realism to the displayed geometry
⚫ Can provide mass and inertial properties,
interference checking, cross-sectional views,
FEM meshes, NC tool paths, etc.
⚫ More complex, requires more processor time
and computer storage
⚫ Identification of correct side of a surface ? 3
Surfaces
⚫ Surface:
1. Ruled Surface
Convolute Involute
Conoid
Hyperboloid 5
Surface Modeling
⚫ Surface v/s Solid models:
⚫ Surface model defines only geometry; no
information about topology
⚫ For example: a common edge between 2
surfaces; neither the surfaces nor the edge store
such information
⚫ Surface models created by first creating the
curve network and then connecting them
appropriately
⚫ Solids are created through “Feature based”
approach
6
Surface Modeling
⚫ Three most common representations for 3D
surfaces
⚫ Polygon Mesh Surfaces
⚫ Parametric Surfaces
⚫ Quadric Surfaces
⚫ Any quadric can be written as the quadratic form
pTAp + bTp + c = 0 where p = [x, y, z]T
with A, b and c giving the coefficients
⚫ Some packages allow one of the
representations but most of the packages allow
objects to be described with other schemes
also 7
Parametric Surfaces
⚫ Two types:
⚫ Analytic Surfaces
⚫ Synthetic Surfaces
⚫ Analytic Surfaces:
⚫ Plane, Ruled Surface, Surface of revolution,
Tabulated Cylinder
⚫ Synthetic Surfaces:
⚫ Bicubic Hermite Spline Surface, B-Spline Surface,
Rectangular and Triangular Bézier Surface, Coons
patches, Gordon Surface, …
8
Plane
⚫ Defined by 3 non coincident, non-linear points
9
Ruled (Lofted) Surface u=1
v=1
⚫ Linear surface
𝑞𝛽 (𝑢)
⚫ Two boundary curves u = 0
v=1
⚫ Linear interpolation
⚫ No twists or kinks
Directrix
12
Coons Patch
⚫ Used with either open boundaries or given data
points
⚫ Used to create a surface using curves that form
closed boundaries
⚫ For example: Horses’ Saddle (convex and
concave surface
Patch
Closed Boundary
13
Fillet Surface
⚫ B-spline surface that blends two surfaces
together
⚫ Two original surfaces may or may not be
trimmed
14
Offset Surface
⚫ Existing surfaces can be offset to create new
ones identical in shape but different dimensions
⚫ Used to speed up surface construction
15
Surface Representation
⚫ Nonparametricand parametric forms of curves
can be extended to surfaces
⚫ Non-parametric form: an equation is fitted to
pass through all the data points or
⚫ Data points used to develop a series of patches
that are connected together with at least C0
continuity
16
Surface Representation
⚫ Equation of surface/surface patch:
⚫P = [x y z]T = [x y f(x,y)]T
p q
z = f ( x , y) = a mn x m y n x
m =0 n =0
z
Surface is described by an xy
grid of size (p+1) x (q+1) points 17
Parametric Surfaces
It uniquely
maps the
parametric
space
(E2 in u and v
values) to the
Cartesian
space (E3 in
x, y, and z
values)
Parametric representation
of a surface 19
Surface Patches
⚫ A general 3D surface
can be modeled by
dividing it into an
assembly of
topological patches Patch 1
v1 Patch 2
u1
v2
u2 20
Surface Patches
⚫ Patch:
⚫ Basic mathematical element
to create a composite surface
⚫ One/multi patch surfaces
Patch
⚫ Topology may be rectangular v1
1
Patch
or triangular u1
2
v2
⚫ Triangular patches more u2
flexible as they do not
require ordered arrays of
data points
21
Boundary Conditions of a
Surface
⚫ Sixteen vectors
A set of boundary conditions is
⚫ Four position vectors for associated with a rectangular patch
the four corner points
⚫ Eight tangent vectors (two
at each corner)
⚫ Four twist vectors at the 2
corner points
and
⚫ Four boundary curves
⚫ Described by holding one
parametric variable fixed
at one of its limiting
values and allowing the
other to change freely
(u/v=0; u/v=1)
22
Boundary Conditions
of a Surface
⚫ To generate curves on a
p(0,1)
surface patch:
⚫ Fix the value of one of the
p(1,1)
parametric variables to obtain
a curve in terms of the other v p(u, v)
variable
⚫ Continue this process first for
one variable and then for the p(0,0) u
other using a certain set of y p(1,0)
arbitrary values in the
permissible domain, a network
x
of two parametric families of z
curves is generated
⚫ Positive sense: where non Only one curve of each family passes
fixed parameter increases through any point P(u,v) on the surface
23
Tangent Vectors
∂p/ ∂u p01
∂p/ ∂v p01
Two tangent
Tangent vector p(0,1) vectors;
at point P on p(1,1) tangent to
the surface: each of the
Hold one v intersecting
parameter curves
constant and passing
differentiate the u
p(0,0) through the
surface p(1,0) points
equation w.r.t
the other pu(u,v)= ∂p/ ∂u, umin ≤ u ≤ umax, vmin ≤ v ≤vmax
pv(u,v)= ∂p/ ∂v, umin ≤ u ≤ umax, vmin ≤ v ≤vmax
24
Twist and Normal Vectors
N
∂p/ ∂u p01
∂p/ ∂v p01
p(0,1)
The surface
Twist vector
p(1,1) normal at a
at point P on ∂2p/ ∂u ∂v p01 point is a
the surface: v vector which
Rate of is
change at u perpendicular
the tangent p(0,0)
p(1,0) to both
vector pu tangent
w.r.t v or pv vectors at the
w.r.t u i.e. n(u,v)= ∂p/ ∂u x ∂p/ ∂v point
∂2p/∂u∂v 25
Analytic Surfaces
Plane Surface
⚫ Parametric equation of a plane can take different forms
depending on the given data
⚫ Case 1: Plane surface defined by 3 points
Point P0 defines u = 0 and v = 0
n̂
27
Analytic Surfaces
28
Analytic Surfaces
Sphere
⚫x = xo + r.cosu.cosv
⚫ y = yo + r.cosu.sinv
⚫ z = zo + r.sinu
⚫ u [- /2, /2]
⚫ v [0, 2 ]
29
Analytic Surfaces
Ellipsoid
⚫x = xo + a.cosu.cosv
⚫ y = yo + b.cosu.sinv
⚫ z = zo + c.sinu
⚫ u [- /2, /2]
⚫ v [0, 2 ]
30
Analytic Surfaces
Lofted Surface
⚫ Linear lofted surface: p(u,v) = (1-v).p(u,0) + v.p(u,1)
Z
Y
Linear Lofting
p(u,0)
p(u,1)
X 31
v
Analytic Surfaces
u=0 P(u,v)
v u=1
u
G(u) v=0
⚫ Parametric equation
p(u , v ) = (1 − v ).G(u ) + v.Q(u ), 0 u 1,0 v 1
u: distance moved by ruler
v: distance along ruler
32
Analytic Surfaces
Ruled (Lofted) Surface (Contd.)
⚫ Closer the value of v to 0:
⚫ greater the influence of G(u) on the surface shape,
⚫ and less the influence of Q(u) on the shape Q(u)
v P(u,v)
P(u, v) = (1 − v).G (u ) + v.Q(u ), 0 u 1,0 v 1 u=1
u
u=0 v=0
G(u)
⚫ Linear in one direction: allows curvature in u direction
only, curvature in v direction is zero
33
Analytic Surfaces
Surface of Revolution
⚫ Rotation of a planar curve about an angle v about an
axis of rotation
⚫ If v = 3600, it creates a circle for each point on the
curve whose center lies on the axis of rotation and
whose radius rz(u) is variable
⚫ Planar curve and axis of rotation form the plane of
zero angle (v = 0) Curve profile
G(u)
rz(u)
Meridians
Tabulated Cylinder
⚫ Translating a space Directrix
planar curve along a
given direction
⚫ It can also be defined as n̂ v
a surface generated by v
moving a straight line
(generatrix) along a u
given planar curve
(directrix) Generatrix P(u,v)
General Surface
p q
p(u , v ) = aij u i v j u , v [0,1]
i =0 j =0
39
Synthetic Surfaces
U = u3 T
where u2 u 1 V= v 3
v 2 v 1
a33 a 32 a 31 a 30
A is the algebraic
and A= a 23 a 22 a 21 a 20
coefficients matrix that
a13 a12 a11 a10
determine shape, size &
a 03 a 02 a 01 a 00 position in space 41
Synthetic Surfaces
Hermite Bicubic Surfaces
⚫ Geometric Form: Apply boundary conditions to
determine A
⚫ Solving for the coefficients, and rearranging (16 vectors)
2 −2 1 1 p p p v
p v01
00
− 3 3 − 2 − 1 00 01
v v
p10 p11 p10 p11
MH = B=
0 0 1 0 u u uv uv
00
p p 01 p 00 p 01
1 0 0 0 p10
u u uv uv
p 11 p10 p11 42
Synthetic Surfaces
B MH
P u (u, v) = U MH
u T
VT , u,v [0, 1]
V,
P v (u, v) = U MH B MH
vT
u,v [0, 1]
P (u, v) = U MH B MH V, u,v [0, 1]
uv u vT
43
Synthetic Surfaces
Hermite Bicubic Surfaces
0 0 0 0
6 −6 3 3
M H u or v =
− 6 6 − 4 − 2
0 0 1 0
44
Synthetic Surfaces
45
Reparametrization
v = vj
pjl
p p p v
pilv q q q t
qilt
ik ik
ik il ik il
p jk p jl p vjk v
p jl q jk q jl q tjk t
q jl u = ui
u
u uv uv s s st st pvik
ik
p p il p ik pil ik
q qil q ik qil
u = uj
pu pu puv puv q s q s q st q stjl
jk jl jk jl jk jl jk puik
• Where pik v = vi
qik = pik u j − ui
(u j − u i ).(v l − v k ) uv
s
q = .p u
qil = pil s j − si
st
=
qjk = pjk
qjl = pjl
t
q =
vl − v k v
tl − tk
.p
q
(s j − si ).(t l − t k ) .p
46
Synthetic Surfaces
Sixteen Point Form
− 9 2 27 2 − 27 2 9 2
9 − 45 2 18 − 9 2
MH = Same as for 4 point curve
− 11 2 9 −9 2 1
1 0 0 0
47
Synthetic Surfaces
Cylindrical Surface as Bicubic Surface
p0 p2 p 2 − p 0 p 2 − p 0
p p +p −p p −p p −p
B = u1 1 2 0 2 0 2 0
p 0 p 0u 0 0 p2
u u
p1 p1 0 0
p1
p0
48
Synthetic Surfaces
u p1
p0
49
Synthetic Surfaces
Hyperbolic Paraboloid –
Bilinear Surface
Special class of ruled surface
Both families of parametric curves pui and pvj
straight lines
p10
p01
p00
p11 50
Synthetic Surfaces
Hyperbolic Paraboloid
– Bilinear Surface
Examples
51
Synthetic Surfaces
Hyperbolic Paraboloid –
Bilinear Surface
p 00 p 01 (1 − v )
p(u , v ) = (1 − u ) u
p10 p11 v
= (1 − u )(1 − v )p 00 + (1 − u )vp 01
+ u(1 − v )p10 + uvp11
p 00 p 01 p 01 − p 00 p 01 − p 00
− −
p p p p p p
B= 10 11 11 10 11 10
p10 − p 00 p11 − p 01 0 0
− −
p10 p 00 p11 p 01 0 0
52
Synthetic Surfaces
Bézier Surface
n m
p(u , v ) = p ij Bi , n (u ) B j , m (v ), u, v [0, 1]
i =0 j =0
U = u3 u 2 u 1
p 00 p 01 p 02 p 03 ⚫ Characteristics
p p13
p11 p12 Polyhedron
B = 10
p 20 p 21 p 22 p 23
p30 p31 p32 p33
53
Synthetic Surfaces
Bézier Surface
n m
P(u , v ) = p ij Bi,n (u ) B j,m (v ), u , v [0, 1]
i =0 j =0
Bézier Surface
⚫ Degree is tied to the number of control points
⚫ Surfaces requiring great design flexibility-need a
large control point array-have a high polynomial
degree
⚫ Design flexibility + manageable surface degree =
joining together smaller surface patches of lower
degrees
⚫ Keeps the overall degree of the surface low but
requires special attention to ensure that
appropriate continuity is maintained across patch
boundaries
56
Synthetic Surfaces
Bézier Surface
⚫ Composite Bézier surface can have C0 and/or
C1 continuity
⚫ Positional Continuity
⚫ Twopatches requires that the common boundary
curve between the two patches must have a
common boundary polygon between the two
characteristic polyhedrons
⚫ Tangent Continuity
⚫ Thesegments, attached to the common boundary
polygon, of one patch polyhedron must be collinear
with the corresponding segments of the other patch
polyhedron (tangent planes of the patches at the
common boundary curve are coincident) 57
Synthetic Surfaces
B-Spline Surface
⚫ A rectangular set of control points
⚫ Characteristics Polyhedron
⚫ Can approximate or interpolate the vertices
of the polyhedron
⚫ Degree is independent of the number of
control points
⚫ Continuity is automatically maintained
throughout the surface by virtue of the form
of blending functions
⚫ Surface intersections can easily be managed
58
Synthetic Surfaces
B-Spline Surface
n m 0 u u max
p(u , v ) = p ij N i , k (u ) N j ,l (v )
i =0 j =0 0 v v max
Any point on Control Points
the surface
B-Spline Surface
60
Synthetic Surfaces
Coons Surface
⚫ Previous surface generating methods require a
finite number of data points
⚫ Coons surface patch: a form of “transfinite
interpolation”
⚫ Interpolates an infinite number of data points
Coons Surface
⚫ This surface p3(u,v) can be defined by linear
interpolation in v direction as
p3(u,v) = (1-v)[(1-u)p(0,0) + up(1,0)] +
v[(1-u)p(0,1)+up(1,1)]
⚫ p3(u,v): Correction Surface
Coons Surface
⚫ Eq. (2) gives the Bilinear Coons Patch
connecting the four boundary curves
⚫ Matrix form
- p(0,0) - p(0,1) p(0, v ) 1 − v
p(u , v ) = (1 − u ) u 1 - p(1,0) - p(1,1) p(1, v ) v
p(u ,0) p(u ,1) 0 1
⚫ The left column and the upper row of the
matrix represents p1(u,v) and p2(u,v)
respectively, while the lower right block
represent correction surface p3(u,v)
⚫ The functions 1-u, u, 1-v, v and 1 are the
blending functions 65
Synthetic Surfaces
Coons Surface
⚫ They blend together four separate boundary
curves to give one surface
⚫ The main drawback of the bilinearly blended
Coons patch is that it only provides C0
continuity (position continuity) between
adjacent patches even if their boundary
curves form a C1 continuity network
⚫ Continuity of cross-boundary derivatives
pu(1,v) and pu(0,v) of the two patches
cannot be made equal
66
Synthetic Surfaces
Blending Surface
⚫ Surface that connects two adjacent / nonadjacent
surfaces or patches
⚫ Usually created to manifest C0 and C1 continuity
with the two given patches
⚫ The fillet surface shown in figure is the special
case of a blending surface
67
Synthetic Surfaces
Blending Surface
⚫ A bicubic surface can be
Patch2
used to blend Patch1 and v
Patch2 with both C0 and C1 u P3
continuity P4
Blending
⚫ The corner points P1, P2, P3, v surface
and P4 of the blending u
P2
surface and their related P1
tangent and twist vectors Patch1
are readily available from v
the two patches u
⚫ So, the B matrix of the A bicubic blending surface
blending surface can be is suitable to blend cubic
evaluated patches 68
Synthetic Surfaces
Offset Surface
Distance d(u,v) permits
Offset generating uniform or
direction tapered thickness;
surfaces depending
upon d(u,v)
Direction of - is constant
unit normal - varies linearly in
u or v or both
⚫ Given original patch and offset direction
p(u, v)offset = p(u, v) + n̂(u, v) d (u, v), 0 u umax,0 v vmax
Unit normal vector Offset distance at
Original point (u,v) on the
at point (u,v) on the
surface original surface
original surface 69
Synthetic Surfaces
Triangular Patches
⚫ Useful if
⚫ the data points of a surface form a triangle
⚫ The surface cannot be modeled by rectangular patches
only and may require at least one triangular patch
⚫ In triangulation techniques
⚫ Three parameters u, v, and w are used
⚫ Parametric domain is defined by a symmetric unit
triangle of 0 ≤ u ≤ 1, 0 ≤ v ≤ 1, and 0 ≤ w ≤ 1
P(0, 1, 0) v v
w
w=0 (0, 1, 0)
u=0 u=0
P(ui, vj, wk) w=0
v
u v=0 w ui vj wk (1, 0, 0) u
P(0, 0, 1) P(1, 0, 0) (0, 0, 1) v=0 u 70
Synthetic Surfaces
Triangular Patches
⚫ Coordinates u, v, and w : Barycentric Coordinates
⚫ Coordinate w is not independent of u and v
⚫ For any point in the domain u + v + w = 1
⚫ It is introduced to emphasize the symmetry properties
of the barycentric coordinate system
⚫ A triangular Bézier patch
p(u , v, w) = pijk Bi,j , k , n (u , v, w), u , v, w [0, 1]
i,j,k
Summary
⚫ Piecewise cubic curves and bicubic surfaces
⚫ permit multiple values for a single x or y
⚫ space efficient
72