0% found this document useful (0 votes)
23 views76 pages

Chapter 3 Geometric Modeling

Chapter 3 of the document discusses geometric modeling, which is essential for CAD tools and various engineering applications like mass property calculations and finite-element modeling. It covers different modeling techniques including 2D projection, wireframe modeling, surface modeling, and solid modeling, highlighting their characteristics and uses. Additionally, it explains the importance of curves in representing irregular surfaces and introduces methods such as parametric equations, splines, and Bezier curves for smooth curve representation.

Uploaded by

phandongnghi1810
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views76 pages

Chapter 3 Geometric Modeling

Chapter 3 of the document discusses geometric modeling, which is essential for CAD tools and various engineering applications like mass property calculations and finite-element modeling. It covers different modeling techniques including 2D projection, wireframe modeling, surface modeling, and solid modeling, highlighting their characteristics and uses. Additionally, it explains the importance of curves in representing irregular surfaces and introduces methods such as parametric equations, splines, and Bezier curves for smooth curve representation.

Uploaded by

phandongnghi1810
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 76

Geometric Modeling

Chapter 3
I. INTRODUCTION TO GEOMETRIC
MODELING
• Geometric modelling refers to a set of techniques
concerned mainly with developing efficient
representations of geometric aspects of a design.
Therefore, geometric modelling is a fundamental part
of all CAD tools.
• Geometric modeling is the basic of many applications
such as:
- Mass property calculations.
- Mechanism analysis.
- Finite-element modelling.
- NC programming
1.1 The Role of Geometric Modeling in a CAD
System
1.2 General Requirements

• Complete part representation including topological


and geometrical data
– Geometry: shape and dimensions
– Topology: the connectivity and associativity
of the object entities; it determines the relational
information between object entities
Able to transfer data directly from CAD to
CAE and CAM.
• Support various engineering applications, such as
mass properties, mechanism analysis, FEA/FEM
and tool path creation for CNC,…
1.3 Basic Geometric Modeling Techniques
2D Projection
-Training is necessary to understand the drawing
-Mistakes often occur
-Does not support subsequent applications such as finite element analysis
(FEA) or NC part programming

Wireframe Modeling
•Model consists entirely of points, lines, arcs and circles, conics, and curves
•In 3D wireframe model, an object is not recorded as a solid. Instead, the
vertices that define the boundary of the object, or the intersections of the edges
of the object boundary are recorded as a collection of points and their
connectivity
• Represent a shape by its characteristic lines and end
points.
• The visual model;
– Wireframe drawing of the shape,
– Mathematical description
* Curve equations
* Coordinates of points
* Connectivity information
• Simple user input to create a shape
• Easy to develop systems
• Not include information about the inside and outside
boundary surfaces
* Impossible to calculate mass properties,
* tool paths,
* finite-Elements meshes
Surface Modeling
•A surface model is a set of faces. It consists of
wireframe entities that form the basis to create surface
entities.
•In general, a wireframe model can be extracted from a
surface model by deleting or blanking all surface
entities.
•Shape design and representation of complex objects
such as car, ship, and airplane bodies as well as
castings.
•Used to be separated, shape model are now
incorporated into solid models.
• Surface models define only the geometry, no
topology.
• Shading is possible
• The mathematical description corresponding to a
visual model includes surface information in addition
to the information about the characteristic lines and
their end points.
• Used to create models with complex surfaces for two
purposes;
– Evaluate model aesthetics
– Mathematical description is used to generate NC
tool paths
• Three method to create a surface;
– Interpolating the input points
– Interpolating the curve nets specified
– Translating or revolving a specified curve
Solid Modeling
•The solid modeling technique is based upon the "half-space“
concept.
•The boundary of the model separates the interior and exterior of
the modeled object
•The object is defined by the volume space contained within the
defined boundary of the object.
•store both geometric and topological information; can verify
whether two objects occupy the same space.
•improves the quality of design, improves visualization, and has
potential for functional automation and integration.
•Used to model a shape having a closed volume
•The mathematical description contains information that
determines whether any location is inside, outside or on the
closed volume
•Application program can be written to generate automatically:
– Finite-elements of a solid
– NC tool path
1.4 Why Solid Modeling?
Solid Modeling Support
•Using volume information
– weight or volume calculation, centroids, moments
of inertia calculation,
– stress analysis (finite elements analysis), heat
conduction calculations, dynamic analysis,
– system dynamics analysis
•Using volume and boundary information
– generation of CNC codes, and robotic and
assembly simulation
•The solid modeling technique is based upon the
"half-space“ concept.
•The boundary of the model separates the interior
and exterior of the modeled object
•The object is defined by the volume space contained
within the defined boundary of the object.
II. REPRESENTING CURVES
Representing Curves - A number of small line-segments joined
•Interpolation
•Parametric equations
•Types of curve - Natural Cubic Splines and Bezier Curves
• Derivation
• Implementation
Computers can’t draw curves
The more points/line segments that are used, the smoother the
curve.
Why have curves ?
•Representation of “irregular surfaces”
•Example: Auto industry (car body design)
Curve representation
•How to represent a curve easily and efficiently
• Storing a curve as many small straight-line
segments
– doesn’t work well when scaled
– inconvenient to have to specify so many points
– need lots of points to make the curve look
smooth
• Working out the equation that represents the curve
– difficult for complex curves
– moving an individual point requires re-
calculation of the entire curve
Solution - Interpolation
• Define a small number of points
• Use a technique called “interpolation”
to invent the extra points.
• Join the points with a series of (short)
straight lines
The need for smoothness
• So far, mostly polygons
• Can approximate any geometry, but
- Only approximate
- Need lots of polygons to hide discontinuities
- Storage problems
- Math problems: Normal direction, Texture
coordinates
- Not very convenient as modeling tool
• Gets even worse in animation
- Almost always need smooth motion
Requirements
• Want mathematical smoothness
– Some number of continuous derivatives
• Local control
– Local data changes have local effect
• Continuous with respect to the data
– No wiggling if data changes slightly
• Low computational effort
A solution
- Use SEVERAL polynomials
- Complete curve consists of several pieces
-All pieces are of low order
-Third order is the most common
- Pieces join smoothly
- This is the idea of spline curves or just “splines”
2.1 Parametric Equations - linear
P1 x1,y1 Walk from P0 to P1 at a constant
(13,8) speed.
Start from P0 at t=0
(7.5,4) dy Arrive at P1 at t=1
P0 dx = x1 - x0
x0 ,y0
dx dy = y1 - y0
(2,3) Where are you at a general time
t?
x(t) = x0 + t.dx
Equation(s) of a straight line as a
y(t) = y0 + t.dy
function of an arbitrary parameter t.
Why use parametric equations?
* One, two, three or n-dimensional representation is possible
* Can handle “infinite slope” of tangents
* Can represent multi-valued functions
• We need smooth curves in many applications: model real
world objects, computer-aided design (CAD), high quality
fonts, data plots, artists sketches
• Parametric polynomial curves:
– point on 3D curve = (x(t), y(t), z(t))
– x(t), y(t), and z(t) are polynomials
– usually cubic: cubic curves
Parametric cubic curves
• Polylines and polygons:
– large amounts of data to achieve good accuracy
– interactive manipulation of the data is tedious
• Higher-order curves:
– more compact (use less storage)
– easier to manipulate interactively
• Possible representations of curves:
– explicit, implicit, and parametric
• Explicit functions: y = f(x), z = g(x)
– impossible to get multiple values for a single x
• break curves like circles and ellipses into segments
– not invariant with rotation
• rotation might require further segment breaking
– problem with curves with vertical tangents
• infinite slope is difficult to represent
• Implicit equations: f(x,y,z) = 0
– Equation may have more solutions than we want
• circle: x² + y² = 1, half circle: ?
– Problem to join curve segments together
• difficult to determine if their tangent directions agree at
their joint point
• Parametric representation: x = x(t), y = y(t), z = z(t)
– Overcomes problems with explicit and implicit forms
– No geometric slopes (which may be infinite)
– Parametric tangent vectors instead (never infinite)
– A curve is approximated by a piecewise polynomial curve
2.2. Splines
• Define the “knots”
(x0,y0) (x3,y3)
spline
• Calculate all other points
knots
Continuity
Parametric continuity Cx
- Only P is continuous: C0
Positional continuity
- P and first derivative dP/du are
continuous: C1
Tangential continuity
- P + first + second: C2
Curvature continuity
Geometric continuity Gx
Only directions have to match
Order of continuity
Wiggling effect
• Example:
– Four data points
– Third degree polynomial
– Might look something like:
• This the ONLY third-degree
polynomial which fits the data
• Wiggling gets much worse with higher
degree
• A natural cubic spline defines a curve, in which the points
P(u) that define each segment of the spline are represented as a
cubic P(u) = a0 + a1u + a2u2 + a3u3
• Where u is between 0 and 1 and a0, a1, a2 and a3 are (as yet)
undetermined parameters.
• We assume that the positions of n+1 control points Pk, where
k = 0, 1,…, n are given, and the 1st and 2nd derivatives of P(u)
are continuous at each interior control point.
Why cubic?
Interpolation versus Approximation

V0 V6
V1 V5

Interpolation
V3

V2 V4

Approximation
V3 V4

V0

V6
V2 V5
V1
Hermite Interpolation
Y5 (u )
y6
Y0 (u ) Y (u ) y y5
y0 3
y1
y2 y4


  u
u 0 1 2 3 4 5 u 6

Yi (u ) ai  bi u  ci u 2  d i u 3
0 u 1 i 0,...,5

 Yi (0) ai ≡ yi ai  yi

 Yi (1) ai  bi  ci  d i ≡ yi 1 bi Di
 Yi (1) (0) bi ≡ Di ci 3( yi 1  yi )  2 Di  Di 1

 Y (1) (1) b  2c  3d ≡ D d i 2( yi  yi 1 )  Di  Di 1
 i i i i i 1
Hermite Spline
• Say the user provides x0 , x1 , x0, x1
• A cubic spline has degree
3
3, and
2
is of the form:
x at  bt  ct  d
– For some constants a, b, c and d derived from the
control points, but how?
• We have constraints:
– The curve must pass through x0 when t=0
– The derivative must be x’0 when t=0
– The curve must pass through x1 when t=1
– The derivative must be x’1 when t=1
A Hermite spline is a curve for which the user provides:
- The endpoints of the curve
- The parametric derivatives of the curve at the
endpoints
The parametric derivatives are dx/dt, dy/dt, dz/dt
- That is enough to define a cubic Hermite spline,
more derivatives are required for higher order
curves
• Solving for the unknowns gives:
a  2 x1  2 x0  x1  x0
b 3x1  3x0  x1  2 x0
c  x0
d  x0

• Rearranging gives:
3
x  x1 (  2t  3t )2
or  2 3 0 0  t 3 
 2 3 0  
 x0 ( 2t 3  3t 2  1) 1  t 2 
x x1 x0 x1 x0  
 x1(t 3  t 2 )  1 1 0 0  t 
  
 x0(t 3  2t 2  t )  1  2 1 0  1 
Hermite and Cubic Spline Interpolation
V0 V6
V1 V5

V3

V2 V4

An interpolating cubic spline

Qi (u ) ( xi (u ), yi (u ))
Vi ( xi , y i )
Spline Interpolation
C ( 2 ) continuity at joints (knots) Ym 1 (u )
 ym
Y0 (u ) Y (u ) yi
y0
y1 Y (u )
1
yi 1
y2
Yi  1 (1)  yi
Yi (0)  yi
4m  4
Yi (11) (1) Yi (1) (0)
Yi ( 21) (1) Yi ( 2 ) (0) 1 i m  1

need two more Eq’s to determine all coefficients


Y0 (0)  y0 2 note : Yi (u ) ai  bi u  ci u 2  d i u 3 0 i m  1
Ym  1 (1)  ym
Y0( 2 ) (0) 0
Ym( 2 1) (1) 0

Natural Spline
Bezier Curves
M. Bezier was a French mathematician who worked for
the Renault motor car company. He invented his curves
to allow his firm’s computers to describe the shape of car
bodies.
• Typically, cubic polynomials
• Like Hermite interpolation
– Special way of specifying end tangents
•Requires special set of coefficients
• Need four points
– Two at the ends of a segment
– Two control tangent vectors
Bezier Approximation
Bezier curves/splines developed by
- Paul de Casteljau at Citroen (1959)
- Pierre Bezier at Renault (1963)
For free-form parts in automotive design

How to provide R1 and R4 ? P2 P3

R1 R4

P4 P4
P1 P1

Instead of providing R1 and R4, provide two


additional control points
P2 and P3 - Approximation
• Control polygon: control points connected to each
other

• Easy to generalize to higher order


– Insert more control points
– Hermite – third order only
Bezier spline continuity
• Rules for Bezier spline continuity:
De Casteljau algorithm
A better way is the de Casteljau algorithm. It is fast and robust,
gives insight into Bézier curve behavior and leads to important
operations on the curves, such as:
•Computing derivatives (curve derivative gives the tangent vector
at a point.)
•Subdividing the curve. It is sometimes necessary to take a single
Bézier curve and produce two separate curve segments that
together are identical to the original. To accomplish this, it is
necessary to find two sets of control points for the two new
curves. The de Casteljau algorithm can be regarded as repeated
linear interpolation.
•Degree 1 “linear” Bezier,
use standard linear interpolation:
De Casteljau algorithm

Third order, u=0.75


De Casteljau algorithm
De Casteljau algorithm
De Casteljau algorithm
P1 1 t t P2
t 1 t
t 1 t 1 t t
t

1 t

P3
P0

P0
1 t

(1 t ) P0  tP1 1 t
t (1 t ) 2 P0  2(1 t )tP1 (1 t ) 3 P0
1 t
P1 1 t t 2 P 2  3(1 t ) 2 tP1
t
(1 t ) P1  tP2 t  3(1 t )t 2 P2
1 t
t (1 t ) 2 P1  2(1 t )tP2 t 3 P 3
P2 1 t t t 2 P 3
3
 3
t
(1 t ) P2  tP3   
i 
i 0 
(1 t ) i 3 i
t

P3
Bezier Polynomial Function

n! i n i
Bin (t )  .t .(1  t )
i!(n  i )!
• Parametric equations for x(t),y(t)
n
x(t )  xi .Bin (t )
i 0
n
y (t )  yi .Bin (t )
i 0
Some Bezier Curves
Major types of curves

– Hermit
• defined by two endpoints and two tangent vectors
– Bezier
• defined by two endpoints and two other points that
control the endpoint tangent vectors
– Splines
• several kinds, each defined by four points
• uniform B-splines, non-uniform B-splines, ß-
splines
Curve Representations
• Function : y= f(x)
• Implicit : f(x, y) = 0
• Parametric : x = f(u); y = f(u)
• Example: a circle with radius r centered at origin: x
= r cos u ; y = r sin u
• A parametric polynomial curve is described:

• Advantages of polynomial curves: easy to compute,


infinitely differentiable
III. SURFACE REPRESENTATIONS
• Function: z = f(x, y)
• Implicit: f(x, y, z) = 0; Example: plane
ax + by + cz + d = 0

Example: quadric
f(x,y,z)=ax2+by2+cz2+2dxy+2eyz+2fxz+2gx+2hy+2jz+
k
Common quadric surfaces: ellipsoid
• Parametric surfaces: Boundary defined by
parametric function: x = f(u, v); y = f(u, v); z = f(u, v)
Example (sphere):

• Subdivision Surfaces
Coarse mesh & subdivision rule: define smooth surface
as limit of sequence of refinements
Surface Modeling
Parametric Surfaces
• Parametric surfaces :
f(u,v) = ( x(u,v), y(u,v), z(u,v) )
• Assume both u and v are in the range of 0 and 1.
• Parametric surfaces or more precisely parametric
surface patches are not used individually.
• Many parametric surface patches are joined together
side-by-side to form a more complicated shape

Patch
Parametric Surface Patch
• Each patch is defined by control points net (Control
Polyhedron).
• A parametric surface patch can be considered as a union of
(infinite number) of curves.
• Given a parametric surface f(u,v), if u is fixed to a value, and
let v vary, this generates a curve on the surface whose u
coordinate is a constant. This is the isoparametric curve in
the v direction.
• Similarly, fixing v to a value and letting u vary, we obtain an
isoparametric curve whose v direction is a constant.
• Point Q(u,v) on the patch is the tensor product of
parametric curves defined by the control points.
B-Spline Surface
• A set of m+1 rows and n+1 control points pi,j, where 0 <= i <=
m and 0 <= j <= n;
• A knot vector of h + 1 knots in the u-direction, U = { u0, u1, ....,
uh };
• A knot vector of k + 1 knots in the v-direction, V = { v0, v1, ....,
vk };
• The degree p in the u-direction; The degree q in the v-direction

m n
P (u , v)  p i , j N i , p (u ) N j ,q (v)
i 0 j 0
 B-Spline Surface patch is confined to the region
nearer the central four control points (do not
interpolate their control points).

Bézier Surface B-Spline Surface


Clamped B-Spline Surface:
 If a B-spline is clamped in both directions, then this surface
passes though control points p0,0, pm,0, p0,n and pm,n and is
tangent to the eight legs of the control net at these four
control points.
Closed B-Spline Surface
• If a B-spline surface is closed in one direction, then all
isoparametric curves in this direction are closed curves and the
surface becomes a tube
Open B-Spline Surface
• If a B-spline surface is open in both directions, then the
surface does not pass through control points p0,0, pm,0, p0,n and
pm,n.
• Three B-spline surfaces clamped, closed and open in both
directions. All three surfaces are defined on the same set of
control points; but, as in B-spline curves, their knot vectors are
different
Properties Of B-Spline Surface
•Nonnegativity: Ni,p(u) Nj,q(v) is nonnegative for all p, q, i, j and u
and v in the range of 0 and 1.
•Partition of Unity: The sum of all Ni,p(u) Nj,q(v) is 1 for all u and
v in the range of 0 and 1.
•Strong Convex Hull Property
•Local Modification Scheme
•p(u,v) is Cp-s (resp., Cq-t) continuous in the u (resp., v) direction if
u (resp., v) is a knot of multiplicity s (resp., t).
•Affine Invariance
Bézier Surface Patch
• A Bézier surface is defined by a two-dimensional set
of control points pj,k, where j is in the range of 0 and
m, and k is in the range of 0 and n.
m n
P (u , v)   p B (v) B (u )
j ,k j ,m k ,n
j 0 k 0
• Example: a Bézier surface defined by 3 rows and 3
columns (i.e., 9) control points and hence is a Bézier
surface of degree (2,2).
• The effect of “lifting” one of he control points of a
Bézier patch
• Two-dimensional basis functions are the product of two one-
dimensional Bézier basis functions.
• The basis functions for a Bézier surface are parametric surfaces of
two variables u and v defined on the unit square.

• The basis functions for control points p0,0 (left) and p1,1 (right), respectively. For
control point p0,0, its basis function is the product of two one-dimensional Bézier basis
functions B2,0(u) in the u direction and B2,0(v) in the v direction. In the left figure, both
B2,0(u) and B2,0(v) are shown along with their product (shown in wireframe). The right
figure shows the basis function for p1,1, which is the product of B2,1(u) in the u
Joining Bézier Surface Patches
• C0 continuity requires aligning boundary curves.
Q(1, v) R (0, v) for 0 v 1
• C1 continuity requires aligning boundary curves and
derivatives

(Q 3i  Q 2i ) k (R 1i  R 0i ) i 0,,3
Properties Of Bézier Surface Patches
• p(u,v) passes through the control points at the four corners of the control
net: p0,0, pm,0, pm,n and p0,n.
• Nonnegativity: Bm,i(u) Bn,j(v) is nonnegative for all m, n, i, j and u and v
in the range of 0 and 1.
• Partition of Unity: The sum of all Bm,i(u) Bn,j(v) is 1 for all u and v in the
range of 0 and 1.
• Convex Hull Property: a Bézier surface p(u,v) lies in the convex hull
defined by its control net.
• Affine Invariance

You might also like