Professional Documents
Culture Documents
Cad Surfaces PDF
Cad Surfaces PDF
CHAPTER 5
SURFACES
5.1 Introduction
Wire frame models are unable to represent complex surfaces of objects like car, ship,
airplane wing, castings etc. A surface model can be used to represent the surface profile
of these objects. Also, surface model can be used for calculating mass properties,
interference between parts, generating cross-sectioned views, generating finite element
mesh, and generating NC tool paths for continuous path machining. Additionally, surface
model can be used to fit experimental data, discretized solutions of differential equations,
construction of pressure surface, construction of stress distribution etc.
Surface creation on a CAD system usually requires wire frame entities: lines, curves,
points, etc. All analytical and synthetic curves can be used to generate surfaces.
In order to visualize surfaces on a graphic display, a mesh, say m x n in size is usually
displayed; the mesh size is controlled by the user. Most CAD systems provide options to
set the mesh size.
A surface of an object is more complete and less ambiguous representation than its wire
frame model; it is an extension of a wire frame model with additional information.
A wire frame model can be extracted from a surface model by deleting all surface entities
(not the wireframe entities point, lines, or curves!). Databases of surface models are
centralized and associative, manipulation of surface entities in one view is automatically
reflected in the other views. Surface models can be shaded and represented with hidden
lines.
Chapter 5 - Surfaces
Boundary Curve
Curve
axis of
symmetry
5-2
Chapter 5 - Surfaces
P2
P3
P4
P1
Edge 2
Edge1
Edge 3
Edge 4
5-3
Chapter 5 - Surfaces
5-4
Chapter 5 - Surfaces
P (1,0)
u
Bilinear Patch
P (0,1)
v
P (0,0)
P(0,0)
P(1,0)
P(0,1)
P(1,1)
5-5
Chapter 5 - Surfaces
P(1,v)
P (1,1)
P (1,0)
P(u,1)
u
P(u,0)
Coons Patch
P (0,1)
P (0,0)
P(0,v)
The above equation gives wrong values at the corners (u,v = 0 and 1). For example,
substituting the values of u and v we get,
Q(0,0) = P(0,0) + P(0,0) = 2P(0,0)
Q(1,0) = 2P(1,0), etc.
Which are obviously wrong values. Therefore, The coons patch is created by
modification of the interpolation equation, where the corners are subtracted. The
modified interpolation equation is given as,
P(u,v)
5-6
Chapter 5 - Surfaces
P(u,v) = [(1 v)
- [(1 u)(1 v)
u(1 v)
(1 u) ]
(1 u)v
P(u,0)
P(1,v)
P(u,1)
P(0,v)
uv]
P(0,0)
P(1,0)
P(0,1)
P(1,1)
End-points (coordinates)
Which gives,
Q(u,v) = [(1 u)
1]
(1 -v)
v
1
5-7
Chapter 5 - Surfaces
L
t=0
t=1
y(t)
z(t)]
Here, only one parametric variable or one degree of freedom is needed. Whereas, a
surface representation requires two parametric variables, and the equation is given as:
Q(s,t) = [x(s,t) y(s,t) z(s,t)]
Tracing a point in the s and t directions, as shown in the figure on the next page,
generates a surface. One parameter variable is kept constant while varying the other one.
A series of curves is created along the s and t directions. For example, constraining the
parameters s and t between zero and 1, the set of curves generated along the s direction is,
P(0,t), P(0.1,t), P(0.2, t).P(1, t)
and the other set of curves along the t direction is,
5-8
Chapter 5 - Surfaces
P (s,1)
P(0,t)
t
P (1,t)
s
P (s,0)
Thus, creation of a surface requires creation of the multiple curves that constitute it. This
concept can be applied to both, the surface that has an analytical formulation (conic
sections) and to a free-form surface (Bezier, B-spline).
5-9
Chapter 5 - Surfaces
x
B
angle of 2 radians, generating a cylinder. A line or curve when revolved can generate all kinds
of surfaces, based on the condition of rotation. Any point on the surface is a function of two
parameters t and . Here, t describes the entity to be rotated and represents the angle of
rotation. In general, a point on line AB (lying in the xz-plane) is represented by [x(t), 0, z(t)]
and, when rotated by radians, it becomes [x(t)cos, x(t)sin, z(t)].
In general, the point matrix gives a point on the surface of revolution obtained by rotation
around the z-axis,
P(t, ) = [x(t) cos x(t) sin z(t)]
In matrix form the equation can be written as,
x
X sin
x cos
Lecture notes by R. B. Agarwal Computer Aided Design in Mechanical Engineering
5-10
Chapter 5 - Surfaces
cos
0
0
0
sin
1
0
0
0
0
1
0
0
0
0
1
Note: The above rotation matrix is equivalent to the rotational transformation matrix
studied earlier, which is,
cos
0
0
0
sin
1
0
0
0
0
1
0
0
0
0
1
cos
- sin
0
0
sin
cos
0
0
0
0
1
0
0
0
0
1
Thus, the generated surface is a rotational transformation of a line (or curve), except is
not constant, but has values, 0 2.
Example
Generate the conical surface obtained by rotation of the line segment AB around the zaxis with,
A = ( 1,0,1) and B = ( 7,0,7).
Solution
Line AB can be represented in parametric form as:
P (t) = [x(t) y(t) z(t)], and the parametric equation of a line is,
P (t) = A + (B-A) t
based on this equation, the coordinates of a of point on the line are given as,
x(t) = 1 + (7-1) t = 1+ 6t,
y(t) = 0
5-11
Chapter 5 - Surfaces
z(t) = 1 + (7-1) t = 1 + 6t
The equation of the surface as given above is,
P(t, ) = [x(t) cos x(t)sin z(t)] or
= [(1+6t) cos (1+6t) sin (1+6t)]
Any point on the surface can be located by substituting t and values in the above
equation, e.g.: at t = 0.4 and = /2 radians
P(0.4, /2) = [1+6(.4)cos (/2) 1+ 6(.4) sin (/2) 1 + 6(.4) ]
= [0 3.4 3.4],
Example
Generate a Torus by rotating a circle of radius r and the center at (a,0,0) about the z-axis.
Solution
Rotating a circle contained in the x z plane around the z-axis can generate a torus. The
center of the circle has coordinates (a,0,0) and equation of the circle in parametric form is
given as;
P () = [(a + r cos, 0, r sin]
The torus is represented by,
Q(, ) = {[(a + r cos) cos], [(a + rcos) sin], rsin} equation of the torus
In this case, the parameters are and .
5-12
Chapter 5 - Surfaces
Example:
A cubic Bezier curve is defined by the control points: P1 (1,0,2), P2 (3,0,4), P3 (2,0,6),
P4 (5,0,7). Find the surface of revolution obtained by revolving the curve about the z-axis
and calculate the point on the surface at t = 0.5, = /4 rad.
Solution
The cubic Bezier curve is given by the equation,
P (t) =
=
[t][m][v]
-1
3
-3
1
[t3 t2 t 1]
3
-6
3
0
-3
3
0
0
1
0
0
0
v0
v1
v2
v3
1
0
0
0
1
3
2
5
0
0
0
0
P (t) = [t3 t2 t 1]
-1
3
-3
1
3
-6
3
0
-3
3
0
0
2
4
6
7
1
1
1
1
5-13
Chapter 5 - Surfaces
Q (t, ) = [t3 t2
-1 3 -3 1
3 -6 3 0
t 1] -3 3 0 0
1 0 0 0
1
3
2
5
0
0
0
0
2
4
6
7
1
1
1
1
cos
0
0
0
sin
0
0
0
0
0
1
0
0
0
0
1
0 2n
0n1
Q (t, ) = [(.5)3
= [1.86
-1 3 -3 1
3 -6 3 0
2
(.5) (.5) 1] -3 3 0 0
1 0 0 0
1.86
4.86
1
3
2
5
0
0
0
0
2 1
4 1
6 1
7 1
cos(/4)
0
0
0
sin(/4)
0
0
0
0
0
1
0
1]
5-14
0
0
0
1
Chapter 5 - Surfaces
T(s) =
1
0
0
as
0
1
0
bs
0
0
1
cs
0
0
0
1
Q (t, s) = [t3 t2 t 1]
-1 3 -3
3 -6 3
-3 3 0
1 0 0
1
0
0
0
0
3
2
5
5
4
0
0
0
0
0
0
1
1
1
1
1
0
0
0
0
1
0
0
0 0
0 0
1 0
5s 1
Substituting the value of s and solving the matrices can calculate any point on the surface.
5-15
Chapter 5 - Surfaces
2
5
-2
2
7
-5
0
0
0
1
1
1
1
0
0
0
0
cos2n
- sin2n
0
0
sin2n
cos2n
0
0
0
0
1
5-16
Chapter 5 - Surfaces
= [t3
t2 t 1]
2
-3
0
1
-2
3
0
0
1
-2
1
0
1
-1
0
0
P(0)
P(1)
P(0)
P(1)
geometry matrix
Using a procedure similar to the one carried out in the derivation of the cubic curve, we
can derive the geometric coefficient matrix for the surface, which is given as,
[G]H =
P(0,0)
P(1,0)
Ps(0,0)
Ps(1,0)
P(0,1)
P(1,1)
Ps(0,1)
Ps(1,1)
Pt(0,0)
Pt(1,0)
Pst (0,0)
Pst(1,0)
Pt(0,1)
Pt(1,1)
Pst(0,1)
Pst (1,1)
5-17
Chapter 5 - Surfaces
Twist vectors, not shown here, are the partial derivatives: dPs/dt & dPt/ds. These vectors
control the internal shape of the surface.
With the geometric coefficient matrix defined, the equation of the surface can be written
as,
P(s.t) = [s] [M]H [G]H [MH]T [t]T
Where:
[s] = [s3 s2 s 1]
[M]H = [Constant matrix for n = 3 ]
[MH]T = Transpose of [M]H
[G]H = Geometry matrix as defined by the 16 points, and
t3
[t]T = t2
t
1
Example:
Given: A parametric cubic surface is defined by its Cartesian components as follows:
x(s,t) =
y(s,t) =
z(s,t) =
[s3 s2 s 1]
3
1
2
0
0
0
1
2
1
0
1
-1
1
1
1
0
t3
t2
t
1
[s3 s2 s 1]
1
1
2
1
1
0
3
2
1
0
0
0
1
0
0
2
t3
t2
t
1
[s3 s2 s 1]
0
1
3
1
1
0
1
0
2
2
2
1
3
0
1
1
t3
t2
t
1
5-18
Chapter 5 - Surfaces
x(s,t) =
xs(s,t) =
xt(s,t) =
&
Pt = P/dt
[s3 s2 s 1]
3
1
2
0
0
0
1
2
1
0
1
-1
1
1
1
0
[3s2 2s 1 0]
3
1
2
0
0
0
1
2
1
0
1
-1
1
1
1
0
[s3 s2 s 1]
3
1
2
0
0
0
1
2
1
0
1
-1
1
1
1
0
t3
t2
t
1
t3
t2
t
1
3t2
2t
1
0
5-19
Chapter 5 - Surfaces
xs(s,t) = 4.5313
xt(s,t) = 3.3438
similarly, we can evaluate ys(s,t), yt(s,t), zs(s,t) and zt(s,t)
ys (s,t) = 2.5313
yt (s,t) = 5.5313
zs (s,t) = 6.9375
zt (s,t) = 5.4375
And,
n = Ps(0.5,0.5) x Pt(0.5,0.5) =
=
i
4.5313
3.3438
j
2.5313
5.5313
k
6.9375
5.4375
5-20
Chapter 5 - Surfaces
BEZIER S URF AC ES
P 24
P 34
P 14
P 44
P 74
P1 3
P 54
P 43
P 64
P 42
P 12
P 11
P 21
P 73
P 72
P 31
P 41
P 51
P 61
P 71
In Bezier surface:
o The surface takes the general shape of the control points.
o The surface is contained within the convex hull of the control points.
o The corner of the surface and the corner control points are coincident.
General Equation of the Bezier surface is given as,
Q(s,t) = Vi,j Bi,n(s) Bj,m(t)
0 s,t 1
Vi,j defines the control points
Lecture notes by R. B. Agarwal Computer Aided Design in Mechanical Engineering
5-21
Chapter 5 - Surfaces
Bi,n(s) & Bj,m(t) are the Bernstein blending functions in the s and t directions.
In matrix form, the Bezier surface can be represented by,
Q(s,t) = [S] [M]B [V]B [([M)T]B [t]T
For a cubic surface this equation reduces to:
Q(s,t) = [s3 s2 s 1]
1
3
-3
1
-1 3 -3
-3 -6 3
3
3 0
1
0 0
3
-6
3
0
-3
3
0
0
1
0
0
0
1
0
0
0
v0,0
v1,0
v2,0
v3,0
v0,1
v1,1
v2,1
v3,1
v0,2
v1,2
v2,2
v3,2
v0,3
v1,3
v2,3
v3,3
t3
t2
t
1
Note that, to represent a cubic Bezier surface, 16 control points must be specified, and
several Bezier surfaces can be combined to create a complex surface.
5-22