Post on 22-Mar-2020
An Introduction to Geometry Design An Introduction to Geometry Design AlgorithmsAlgorithms
Geometry Design Tutorial 1Instituto Tecnológico de Veracruz 21-25 April 2008
Fathi El-YafiProject and Software Development Manager
Engineering Simulation
Geometry: Overview
• Geometry Basics� Definitions
� Data
� Semantic
• Topology� Mathematics
Geometry Design Tutorial 2Instituto Tecnológico de Veracruz 21-25 April 2008
� Mathematics� Hierarchy
• CSG Approach• BREP Approach
� Curves
� Surfaces
vertices:x,y,z location
Geometry: Concept Basics
Geometry Design Tutorial 3Instituto Tecnológico de Veracruz 21-25 April 2008
vertices:x,y,z location
Geometry: Concept Basics
curves:bounded by two vertices
Geometry Design Tutorial 4Instituto Tecnológico de Veracruz 21-25 April 2008
vertices:x,y,z location
Geometry: Concept Basics
surfaces:closed set of curves
curves:bounded by two vertices
Geometry Design Tutorial 5Instituto Tecnológico de Veracruz 21-25 April 2008
vertices:x,y,z location
Geometry: Concept Basics
surfaces:closed set of curves
curves:bounded by two vertices
Geometry Design Tutorial 6Instituto Tecnológico de Veracruz 21-25 April 2008
volumes: closed set of surfaces
vertices:x,y,z location
Geometry: Concept Basics
surfaces:closed set of curves
curves:bounded by two vertices
Geometry Design Tutorial 7Instituto Tecnológico de Veracruz 21-25 April 2008
body: collection of volumesvolumes: closed
set of surfaces
vertices:x,y,z location
Geometry: Concept Basics
surfaces:closed set of curves
curves:bounded by two vertices
Geometry Design Tutorial 8Instituto Tecnológico de Veracruz 21-25 April 2008
body: collection of volumesvolumes: closed
set of surfaces
loops: ordered set of curves on surface
vertices:x,y,z location
coedges: orientation of curve w.r.t. loop
Geometry: Concept Basics
surfaces:closed set of curves (loops)
curves:bounded by two vertices
Geometry Design Tutorial 9Instituto Tecnológico de Veracruz 21-25 April 2008
body: collection of volumesvolumes: closed
set of surfaces
loops: ordered set of curves on surface
vertices:x,y,z location
coedges: orientation of curve w.r.t. loop
Geometry: Concept Basics
curves:bounded by two vertices
surfaces:closed set of curves (loops)
Geometry Design Tutorial 10Instituto Tecnológico de Veracruz 21-25 April 2008
body: collection of volumes
loops: ordered set of curves on surface
shell: oriented set of surfaces comprising a volume volumes: closed set
of surfaces (shells)
vertices:x,y,z location
surfaces:closed set of curves (loops)
coedges: orientation of curve w.r.t. loop
curves:bounded by two vertices
Geometry: Concept Basics
Geometry Design Tutorial 11Instituto Tecnológico de Veracruz 21-25 April 2008
body: collection of volumesvolumes: closed set
of surfaces (shells)
loops: ordered set of curves on surface
shell: oriented set of surfaces comprising a volume
vertices:x,y,z location
coedges: orientation of curve w.r.t. loop
coface: oriented
Geometry: Concept Basics
surfaces:closed set of curves (loops)
curves:bounded by two vertices
Geometry Design Tutorial 12Instituto Tecnológico de Veracruz 21-25 April 2008
body: collection of volumes
loops: ordered set of curves on surface
shell: oriented set of surfaces comprising a volume
oriented surface w.r.t. shell
volumes: closed set of surfaces (shells)
Volume 1
Surface 11
Manifold Geometry: Each volume maintains its own set of unique surfaces
Geometry: Concept Basics
Geometry Design Tutorial 13Instituto Tecnológico de Veracruz 21-25 April 2008
Volume 1
Surface 1 Surface 2 Surface 3 Surface 4 Surface 5 Surface 6
Volume 2
Surface 8 Surface 9 Surface 10 Surface 11
Surface 7
Volume 2
Surface 7
surfaces
Volume 1
Non-Manifold Geometry: Volumes share matching surfaces
Geometry: Concept Basics
Geometry Design Tutorial 14Instituto Tecnológico de Veracruz 21-25 April 2008
Volume 1
Surface 1 Surface 2 Surface 3 Surface 4 Surface 5 Surface 6
Volume 2
Surface 8 Surface 9 Surface 10
Surface 7
Volume 2
Surface 7
Geometry: Data
• Model– Wireframe– Surface– Volume
• Geometrical Data Separated from Attributes
Geometry Design Tutorial 15Instituto Tecnológico de Veracruz 21-25 April 2008
• Geometrical Data Separated from Attributes• Attributes
– Colors– Parameters– Etc.
• Graphical Objects• Visible Parts
Semantic: Surface-Volume-Deflection- Defects
Geometry Design Tutorial 16Instituto Tecnológico de Veracruz 21-25 April 2008
Semantic: Surfaces and Features
Geometry Design Tutorial 17Instituto Tecnológico de Veracruz 21-25 April 2008
Semantic: Detail-Mesh–Bounding Box
Geometry Design Tutorial 19Instituto Tecnológico de Veracruz 21-25 April 2008
Semantic: Decomposition–CurvatureMesh STL-Mesh FEM
Geometry Design Tutorial 20Instituto Tecnológico de Veracruz 21-25 April 2008
Wireframe Model: Limits
Geometry Design Tutorial 21Instituto Tecnológico de Veracruz 21-25 April 2008
Basics of Topology
Topology??
•Concept of interior and exterior
•Orientation
Geometry Design Tutorial 22Instituto Tecnológico de Veracruz 21-25 April 2008
•Reliable calculation of basic parameters:volume, center of gravity, axis of inertia …
•Contour = oriented surface and limited area
•Tree construction
Relations: (Geometry, Topology)
Volume Solid
TopologyGeometry
Geometry Design Tutorial 23Instituto Tecnológico de Veracruz 21-25 April 2008
Surface
Curve
Vertex
face
Contour
Edge
Point
A contour “grips" to its interior
Either S is a Setof R3
Adhesion : A(S)
P ∈ A( S) : any neighborhood of P contains a point of S
Topology: Mathematics
Geometry Design Tutorial 24Instituto Tecnológico de Veracruz 21-25 April 2008
P ∈ A( S) : any neighborhood of P contains a point of S
Interior : I(S)
P ∈ I( S) if ∃ V(P) ⊂ S
Boundary : B(S)
P ∈ B( S) if P ∈ A( S) and P ∈ A( C(S)) where C(S) refers to the complementary of S in R3
Topology: Mathematics
Open : S = A(S)
Closed : S = I(S)
Geometry Design Tutorial 25Instituto Tecnológico de Veracruz 21-25 April 2008
Regular SolidS = A(I(S)) : adhesion of its interior = R(S)
Topology: Mathematics
A ∩∩∩∩ B = R(A∩B)A ∪∪∪∪ B = R(A∪B)A - B = R(A-B)C(A) = R(C(A))
Operator of Regularization
Geometry Design Tutorial 26Instituto Tecnológico de Veracruz 21-25 April 2008
A
B
A ∩∩∩∩ B
R(A ∩∩∩∩ B)A
A - B
R(A – B)
Topology: Mathematics
A B
Operator of Regularization
Geometry Design Tutorial 27Instituto Tecnológico de Veracruz 21-25 April 2008
A ∪∪∪∪ B
A B
C(A)/B
R(C(A)/B)
Topology: Mathematics
Euler Formula: V+F = E+2
Polyhedron Type of Faces F V E
Tetrahedron Equilateral Triangles 4 4 6
Octahedron Equilateral Triangles 8 6 12
Geometry Design Tutorial 28Instituto Tecnológico de Veracruz 21-25 April 2008
F = number of faces, V = number of vertices E = number of edges
Cube Squares 6 8 12
Dodecahedron Pentagons 12 20 30
Icosahedrons Equilateral Triangles 20 12 30
Topology: Mathematics
Cauchy Proof (1789-1857)
V+F=E+2 V+F=E+1 V+F+1=(E+1)+1 V+F=E+1
Geometry Design Tutorial 29Instituto Tecnológico de Veracruz 21-25 April 2008
V+F=E+2 V+F=E+1 V+F+1=(E+1)+1 V+F=E+1
V+F=E+1 V+F=E+1 (V-2)+F=(E-2)+1 V+F=E+1
3+1=3+1!!
Topology: Mathematics
Mesh Examples
F = 3844V = 1924E = V + F –2 = 5766
Geometry Design Tutorial 30Instituto Tecnológico de Veracruz 21-25 April 2008
F = 47566V = 23793E = S + F –2 = 71357
Constructive RepresentationParametric Volume PrimitivesTransformationsBoolean Operators:
Union, common, subtract
CSG : Constructive Solid Geometry
Geometry Design Tutorial 32Instituto Tecnológico de Veracruz 21-25 April 2008
Concept of GraphAdvantage :
Simple DescriptionSimulation of Object « Manufacturing »
CSG: Primitive Components
Geometry Design Tutorial 33Instituto Tecnológico de Veracruz 21-25 April 2008
U
CSG: Boolean Operators
Union
Geometry Design Tutorial 34Instituto Tecnológico de Veracruz 21-25 April 2008
U
Union
CSG: Boolean Operators
U
Geometry Design Tutorial 35Instituto Tecnológico de Veracruz 21-25 April 2008
U
Subtract
CSG: Boolean Operators
Geometry Design Tutorial 36Instituto Tecnológico de Veracruz 21-25 April 2008
U
-
∩
Common
CSG: Boolean Operators
Geometry Design Tutorial 37Instituto Tecnológico de Veracruz 21-25 April 2008
CSG: Boolean Operators
Fillet
Geometry Design Tutorial 38Instituto Tecnológico de Veracruz 21-25 April 2008
Geometry: Curves
Lap back point
us(u)
x, y, z function of u, continuous first order
Geometry Design Tutorial 39Instituto Tecnológico de Veracruz 21-25 April 2008
Multiple point
Arc length, abscissa curvilinear
0
2 2 2 2
2 2 2
ds = dx + dy + dz
( )u
u
dx dy dzs u du
du du du = + +
∫
u
u=u0
s(u)
τ(s) τ(s+ds)
Geometry: Curvature
O
n
Ray ofOsculator Circle
=Curvature Ray
nOM
ρ=
Geometry Design Tutorial 42Instituto Tecnológico de Veracruz 21-25 April 2008
M
ρ
Parametric curve:
For the curve with the equation y = f(x):
Geometry: Vector and TangentialFrenet Reference
2
2
2 2
2 2
2
2
( ) et n( )
d xdxdsds
dOM dy d OM d yu u
ds ds ds dsdz d zds ds
τ
= =
Geometry Design Tutorial 43Instituto Tecnológico de Veracruz 21-25 April 2008
n = Principal normal
t
OM(s+dh1)
OM(s+dh2)
OM(s)
Geometry: Torsion
M(s)
M(s+ds)
Geometry Design Tutorial 44Instituto Tecnológico de Veracruz 21-25 April 2008
Osculator Plane at M(s)
Torsion
Geometry: Propeller Circular
2
2
2
2
2
2
2 2 2 2 2 2 2 2
2 2
= -R c o s = -R s inx = R c o s
y = R s in , = R c o s , = -R s in
z = p = p = 0
a in s i e t d o n c s =
R = - s in
d xd xdd
d y d y
d dd z d zd d
d s d x d y d z R p R p
d x
d s R p
θθ θθθθ θ θ
θ θθ
θ θ
θ
θ
= + + = + + ×
+
2
2 2 2
R = - c o s
d x
d s R pθ
+
Geometry Design Tutorial 45Instituto Tecnológico de Veracruz 21-25 April 2008
2 2
R =
d s R p
d y
d s Rτ
+ 2 2 2
2
2 2 2 2 22 2
2
22 2
2 2
2 22 2
2 2
= - c o s
R Rco s e t = - s in a v ec =
p = 0 =
ps in
-p p c o s e t d o n c
R
d s R p
d d y
d s d s R p R pp
d zd z
d sd s R p
R p
d bb n T T
d s R pR p
R p
τθ θ ρ
θ
τ θ
+
+ ++ +
+= × = =
++ +
Geometry: Propeller Circular
-1-0.5
00.5
1
-1-0.5
00.5
1
3-1
-0.500.5
1 -1-0.5
00.5
1
-1
-0.5
00.5
1
3
-1
-0.5
00.5
1
Discretizing
Geometry Design Tutorial 46Instituto Tecnológico de Veracruz 21-25 April 2008
0
1
2
0
1
2
Geometry: Frenet - SerretReference, Equations, Curvature, Torsion
Frenet Reference:
The Frenet - Serret equations are a convenient framework for analyzing curvature. T(s) is the unit tangent to the curve as a function of path length s.N(s) is the unit normal to the curve B(s) is the unit binormal; the vector cross product of T(s) and N(s).
Geometry Design Tutorial 47Instituto Tecnológico de Veracruz 21-25 April 2008
Frenet Equations:
Frenet Reference:
For any parametric function f(t), the expression of the curvature and the torsion are the following:
Geometry: CurvatureGaussian, Average
Gaussian Curvature
Geometry Design Tutorial 48Instituto Tecnológico de Veracruz 21-25 April 2008
Average Curvature
Curvature Cmap
Geometry: CurvatureGaussian, Average
Gaussian Curvature = 2
1
R
Sphere
Geometry Design Tutorial 49Instituto Tecnológico de Veracruz 21-25 April 2008
R
Average Curvature = 1
_R
Geometry: CurvatureGaussian, Average
Torus
Geometry Design Tutorial 50Instituto Tecnológico de Veracruz 21-25 April 2008
Gaussian Average
Geometry: Curvature
Torus
Geometry Design Tutorial 51Instituto Tecnológico de Veracruz 21-25 April 2008
Geometry: Surfaces of Revolution
-1-0.5
00.5
1
-1-0.5
00.5
1
2
3
4-1-0.5
00.5
1
2
4
-1-0.5
00.51
Geometry Design Tutorial 52Instituto Tecnológico de Veracruz 21-25 April 2008
0
1 -4
-2
0
2
4-4
-2
0-1
-0.5
-4
-2
0
2
4
-1-0.5
0
0.5
1
-1
-0.5
0
0.5
1
-1
-0.5
0
0.5
1
-1-0.5
0
0.5
1
-1
-0.5
0
0.5
1
Geometry: Particular Surfaces
20
40
-100
10
Mobius Strip: 'Endless Ribbon'
Geometry Design Tutorial 53Instituto Tecnológico de Veracruz 21-25 April 2008
-25
0
25
50
-40
-20
0
20-10
-25
0
25
50
Geometry: Particular Surfaces
The Klein Bottle
Geometry Design Tutorial 54Instituto Tecnológico de Veracruz 21-25 April 2008
Geometry: Particular Surfaces
The Klein Bottle
Geometry Design Tutorial 55Instituto Tecnológico de Veracruz 21-25 April 2008
Geometry: Particular Surfaces
The Klein Bottle: Curvature
Geometry Design Tutorial 56Instituto Tecnológico de Veracruz 21-25 April 2008
Geometry: Particular Surfaces
The Kuen Surfaces
Geometry Design Tutorial 57Instituto Tecnológico de Veracruz 21-25 April 2008
x=2*(cos(u)+u*sin(u))*sin(v)/(1+u*u*sin(v)*sin(v))
y=2*(sin(u)-u*cos(u))*sin(v)/(1+u*u*sin(v)*sin(v))
z=log(tan(v/2))+2*cos(v)/(1+u*u*sin(v)*sin(v))
Geometry: Particular Surfaces
The Dini Surfaces
Geometry Design Tutorial 58Instituto Tecnológico de Veracruz 21-25 April 2008
x=a*cos(u)*sin(v)y=a*sin(u)*sin(v) z=a*(cos(v)+log(tan((v/2))))+b*ua=1,b=0.2,u={ 0,4*pi},v={0.001,2}
Geometry: Particular Surfaces
Asteroid
Geometry Design Tutorial 59Instituto Tecnológico de Veracruz 21-25 April 2008
x= pow (a*cos(u)*cos(v),3) y= pow (b*sin(u)*cos(v),3) z= pow (c*sin(v),3)
Geometry: Particular Surfaces
The «Derviche»
Geometry Design Tutorial 60Instituto Tecnológico de Veracruz 21-25 April 2008
Geometry: Curves
Lagrange Interpolating Polynomial
Geometry Design Tutorial 61Instituto Tecnológico de Veracruz 21-25 April 2008
The Lagrange interpolating polynomial is the polynomial P(x) of degree <= (n-1)that passes through the n points (x1,y1= f(x1)), x2,y2= f(x2)), ..., xn,yn= f(xn)),and is given by:
Geometry: Curves
Lagrange Interpolating Polynomial
Where:
Geometry Design Tutorial 62Instituto Tecnológico de Veracruz 21-25 April 2008
Written explicitly:
Geometry: Curves
Cubic Spline Interpolating Polynomial
Geometry Design Tutorial 63Instituto Tecnológico de Veracruz 21-25 April 2008
A cubic spline is a spline constructed of piecewisethird-order polynomials which pass through a set of m control points. The second derivative of each polynomial is commonly set to zero at the endpoints, since this provides a boundary condition that completes the system of m -2 equations.This produces a so-called "natural" cubic spline and leads to a simple tridiagonal systemwhich can be solved easily to give the coefficients of the polynomials.However, this choice is not the only one possible, and other boundary conditions can be used instead.
Geometry: Curves
Consider 1-dimensional spline for a set of n+1 points (y1, y2, .., yn),let the ith piece of the spline be represented by:
Where t is a parameter and i = 0, …, n-1 then
Cubic Spline Interpolating Polynomial
Geometry Design Tutorial 64Instituto Tecnológico de Veracruz 21-25 April 2008
Rearranging all these equations,leads to the following beautifullysymmetric tridiagonal system:
If the curve is instead closed, the system becomes
Geometry: Curves
Cubic Spline/Lagrange
1
2
1
2
Geometry Design Tutorial 65Instituto Tecnológico de Veracruz 21-25 April 2008
1 2 3 4 5 6 7
-3
-2
-1
1 2 3 4 5 6 7
-5
-4
-3
-2
-1
Geometry: Curves
Bézier
Given a set of n + 1 control points P0, P1, .., Pn, the corresponding Bèzier curve (or Bernstein- Bèzier curve) is given by:
Geometry Design Tutorial 66Instituto Tecnológico de Veracruz 21-25 April 2008
Where Bi,n(t) is a Bernstein polynomial and .
A "rational" Bézier curve is defined by:
where p is the order, Bi,p are the Bernstein polynomials,Pi are control points, and the weight Wi of Pi is the last ordinate of the homogeneousPoint Pi
w. These curves are closed under perspective transformations, and can representconic sections exactly.
Geometry: Curves
Bézier:Properties
� The Bézier curve always passes through the first and last control points.
Geometry Design Tutorial 67Instituto Tecnológico de Veracruz 21-25 April 2008
� The curve is tangent to P1–P0 and Pn–Pn-1 at the endpoints.
� The curve lies within the convex hull of the control points.
Geometry: Curves
Bézier:Properties
� A desirable property is that the curve can be translated and rotated by performing these Operations on the control points.
Geometry Design Tutorial 68Instituto Tecnológico de Veracruz 21-25 April 2008
� Undesirable properties of Bézier curves are their numerical instability for large numbers of control points, and the fact that moving a single
control point changes the global shape of the curve .
Geometry: Curves
Bézier: Bernstein Polynomials
Bin(t) = Cn
i (t-1)n-iti , Cni = n! / i!(n-i)!
Bi j(t) = (1-t)Bi
j-1(t) + t Bi-1j-1(t)
Geometry Design Tutorial 69Instituto Tecnológico de Veracruz 21-25 April 2008
B0 1(t) = (1-t)B0
0(t) + t B-10(t)
B1 1(t) = (1-t)B1
0(t) + t B00(t)
B0 2(t) = (1-t)B0
1(t) + t B-11(t)
Geometry: Curves
Bézier: Bernstein Polynomials
•Unit Partition: Σi=0,n Bin(t) = 1
Bi j(t) = (1-t)Bi
j-1(t) + t Bi-1j-1(t)
Geometry Design Tutorial 70Instituto Tecnológico de Veracruz 21-25 April 2008
•0<=Bin(t)<= 1
•Bin(0) = 0 et Bi
n(1) = 0
•B0n(0) = 1
•Bnn(1) = 1
Geometry: Curves
B-Spline
A B-Spline is a generalization of the Bézier curve.Let a vector known as the knot vector be defined
T = {t0, t1, …, tm},
Geometry Design Tutorial 71Instituto Tecnológico de Veracruz 21-25 April 2008
where T is a no decreasing sequence with ,and define control points P0, ..., Pn.Define the degree as: p = m-n-1
The "knots“ tp+1, ..., tm-p-1 are called internal knots.
Geometry: Curves
B-Spline
�Define the basis functions as:
Geometry Design Tutorial 72Instituto Tecnológico de Veracruz 21-25 April 2008
�Then the curve defined by: is a B-spline.
�Specific types include the non periodic B-spline(first p+1 knots equal 0 and last p+1 equal to 1; illustrated above)and uniform B-spline (internal knots are equally spaced).
�A curve is p - k times differentiable at a point where k duplicate knot values occur.
�A B-spline with no internal knots is a Bézier curve.
Geometry: Curves
NURBS-Curve
A non uniform rational B-spline curve defined by:
Geometry Design Tutorial 73Instituto Tecnológico de Veracruz 21-25 April 2008
where p is the order, Ni,p are the B-Spline basis functions, Pi are control points,and the weight Wi of Pi is the last ordinate of the homogeneous point Pi
w.These curves are closed under perspective transformations, and can representconic sections exactly.
Geometry: Curves
Conics
P(t) = w N t P t
w N t
i i i
i
i
i i
i
i
×
=
=
×
=
=
∑
∑
,
,
( ) ( )
( )
2
0
3
2
0
3
Geometry Design Tutorial 74Instituto Tecnológico de Veracruz 21-25 April 2008
Parabola w=1
Hyperbole w=4 Ellipse w=1/4
i =0
(0,0,0,1,1,1)
Geometry: Curves
•NURBS of degree 2•Control points (Isosceles triangle)•Knot vector (0,0,0,1,1,1)
Arcs
Geometry Design Tutorial 75Instituto Tecnológico de Veracruz 21-25 April 2008
Geometry: Curves
Circles
(0, 0, 0, 1/3, 1/3, 2/3, 2/3, 1, 1, 1)
Geometry Design Tutorial 76Instituto Tecnológico de Veracruz 21-25 April 2008
(0, 0, 0, 1/4, 1/4, 1/2, 1/2, 3/4, 3/4, 1, 1, 1)
Geometry: Surfaces
A given Bézier surface of order (n, m) is defined bya set of (n + 1)(m + 1) control points ki,j.
Bézier
evaluated over the unit square, where:
Geometry Design Tutorial 77Instituto Tecnológico de Veracruz 21-25 April 2008
evaluated over the unit square, where:
is a Bernstein polynomial, and
is the binomial coefficient.
Geometry: Surfaces
S(u,v) = Σi=0,nΣj=0,m Bin(u) Bj
m(v) Pij
(n+1)(n+1) points Pij
Bézier
Geometry Design Tutorial 78Instituto Tecnológico de Veracruz 21-25 April 2008
Pi(v) = Σj=0,m Bjm(v)Pij
Geometry: Surfaces
NURBS
Geometry Design Tutorial 79Instituto Tecnológico de Veracruz 21-25 April 2008
NURBS are nearly ubiquitous for computer-aided design (CAD), manufacturing (CAM), and engineering (CAE)and are part of numerous industry wide used standards,such as IGES, STEP, ACIS, Parasolid.
Geometry: Surfaces
NURBS: PropertiesNURBS curves and surfaces are useful for a number of reasons:
�They are invariant under affine as well as perspective transformations.
�They offer one common mathematical form for both standard analytical shapes(e.g., conics) and free-form shapes.
Geometry Design Tutorial 80Instituto Tecnológico de Veracruz 21-25 April 2008
�They are generalizations of non-rational B-Splines and non-rational and rational Béziercurves and surfaces.
(e.g., conics) and free-form shapes.
�They provide the flexibility to design a large variety of shapes.
�They reduce the memory consumption when storing shapes (compared to simpler methods).
�They can be evaluated reasonably quickly by numerically stable and accurate algorithms.