Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
Geometry Design Tutorial 1Instituto Tecnológico de Veracruz 21-25 January 2008
Fathi El-YafiSenior Product Engineer
Product Department of EXA Corporation
An Introduction to Geometry Design An Introduction to Geometry Design AlgorithmsAlgorithms
Geometry Design Tutorial 2Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Overview
• Geometry BasicsDefinitionsDataSemantic
• TopologyMathematicsHierarchy
• CSG Approach• BREP Approach
CurvesSurfaces
Geometry Design Tutorial 3Instituto Tecnológico de Veracruz 21-25 January 2008
vertices:x,y,z location
Geometry: Concept Basics
Geometry Design Tutorial 4Instituto Tecnológico de Veracruz 21-25 January 2008
vertices:x,y,z location
Geometry: Concept Basics
curves: bounded by two vertices
Geometry Design Tutorial 5Instituto Tecnológico de Veracruz 21-25 January 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 January 2008
vertices:x,y,z location
volumes: closed set of surfaces
Geometry: Concept Basics
surfaces: closed set of curves
curves: bounded by two vertices
Geometry Design Tutorial 7Instituto Tecnológico de Veracruz 21-25 January 2008
body: collection of volumes
vertices:x,y,z location
volumes: closed set of surfaces
Geometry: Concept Basics
surfaces: closed set of curves
curves: bounded by two vertices
Geometry Design Tutorial 8Instituto Tecnológico de Veracruz 21-25 January 2008
body: collection of volumes
vertices:x,y,z location
volumes: closed set of surfaces
loops: ordered set of curves on surface
Geometry: Concept Basics
surfaces: closed set of curves
curves: bounded by two vertices
Geometry Design Tutorial 9Instituto Tecnológico de Veracruz 21-25 January 2008
body: collection of volumes
vertices:x,y,z location
volumes: closed set of surfaces
loops: ordered set of curves on surface
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 10Instituto Tecnológico de Veracruz 21-25 January 2008
body: collection of volumes
vertices:x,y,z location
loops: ordered set of curves on surface
coedges: orientation of curve w.r.t. loop
shell: oriented set of surfaces comprising a volume
Geometry: Concept Basics
volumes: closed set of surfaces (shells)
curves: bounded by two vertices
surfaces: closed set of curves (loops)
Geometry Design Tutorial 11Instituto Tecnológico de Veracruz 21-25 January 2008
body: collection of volumes
vertices:x,y,z location
volumes: closed set of surfaces (shells)
surfaces: closed set of curves (loops)
loops: ordered set of curves on surface
coedges: orientation of curve w.r.t. loop
shell: oriented set of surfaces comprising a volume
curves: bounded by two vertices
Geometry: Concept Basics
Geometry Design Tutorial 12Instituto Tecnológico de Veracruz 21-25 January 2008
body: collection of volumes
vertices:x,y,z location
loops: ordered set of curves on surface
coedges: orientation of curve w.r.t. loop
shell: oriented set of surfaces comprising a volume
coface: oriented surface w.r.t. shell
Geometry: Concept Basics
volumes: closed set of surfaces (shells)
surfaces: closed set of curves (loops)
curves: bounded by two vertices
Geometry Design Tutorial 13Instituto Tecnológico de Veracruz 21-25 January 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 1
Volume 2
Surface 11
Surface 7
Manifold Geometry: Each volume maintains its own set of unique surfaces
Geometry: Concept Basics
Geometry Design Tutorial 14Instituto Tecnológico de Veracruz 21-25 January 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 1
Volume 2
Surface 7
Non-Manifold Geometry: Volumes share matching surfaces
Geometry: Concept Basics
Geometry Design Tutorial 15Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Data
• Model– Wireframe– Surface– Volume
• Geometrical Data Separated from Attributes• Attributes
– Colors– Parameters– Etc.
• Graphical Objects• Visible Parts
Geometry Design Tutorial 16Instituto Tecnológico de Veracruz 21-25 January 2008
Semantic: Surface-Volume-Deflection-Defects
Geometry Design Tutorial 17Instituto Tecnológico de Veracruz 21-25 January 2008
Semantic: Surfaces and Features
Geometry Design Tutorial 18Instituto Tecnológico de Veracruz 21-25 January 2008
Semantic: Detail
Geometry Design Tutorial 19Instituto Tecnológico de Veracruz 21-25 January 2008
Semantic: Detail-Mesh–Bounding Box
Geometry Design Tutorial 20Instituto Tecnológico de Veracruz 21-25 January 2008
Semantic: Decomposition–CurvatureMesh STL-Mesh FEM
Geometry Design Tutorial 21Instituto Tecnológico de Veracruz 21-25 January 2008
Wireframe Model: Limits
Geometry Design Tutorial 22Instituto Tecnológico de Veracruz 21-25 January 2008
Basics of Topology
Topology??
•Concept of interior and exterior
•Orientation
•Reliable calculation of basic parameters:volume, center of gravity, axis of inertia …
•Contour = oriented surface and limited area
•Tree construction
Geometry Design Tutorial 23Instituto Tecnológico de Veracruz 21-25 January 2008
Relations: (Geometry, Topology)
Volume
Surface
Curve
Vertex
Solid
face
Contour
TopologyGeometry
EdgePoint
Geometry Design Tutorial 24Instituto Tecnológico de Veracruz 21-25 January 2008
A contour “grips" to its interior
Either S is a Set of R3
Adhesion : A(S)
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
Geometry Design Tutorial 25Instituto Tecnológico de Veracruz 21-25 January 2008
Topology: Mathematics
Open : S = A(S)
Closed : S = I(S)
Regular SolidS = A(I(S)) : adhesion of its interior = R(S)
Geometry Design Tutorial 26Instituto Tecnológico de Veracruz 21-25 January 2008
Topology: Mathematics
A ∩ B = R(A∩B)A ∪ B = R(A∪B)A - B = R(A-B)C(A) = R(C(A))
A
B
A ∩ B
R(A ∩ B)A
A - B
R(A – B)
Operator of Regularization
Geometry Design Tutorial 27Instituto Tecnológico de Veracruz 21-25 January 2008
Topology: Mathematics
A B
A ∪ B
A B
C(A)/B
R(C(A)/B)
Operator of Regularization
Geometry Design Tutorial 28Instituto Tecnológico de Veracruz 21-25 January 2008
Topology: Mathematics
Euler Formula: V+F = E+2
F = number of faces, V = number of vertices E = number of edges
Polyhedron Type of Faces F V E
Tetrahedron Equilateral Triangles 4 4 6
Octahedron Equilateral Triangles 8 6 12
Cube Squares 6 8 12
Dodecahedron Pentagons 12 20 30
Icosahedrons Equilateral Triangles 20 12 30
Geometry Design Tutorial 29Instituto Tecnológico de Veracruz 21-25 January 2008
Topology: Mathematics
Cauchy Proof (1789-1857)
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!!
Geometry Design Tutorial 30Instituto Tecnológico de Veracruz 21-25 January 2008
Topology: Mathematics
Mesh Examples
F = 3844V = 1924E = V + F –2 = 5766
F = 47566V = 23793E = S + F –2 = 71357
Geometry Design Tutorial 31Instituto Tecnológico de Veracruz 21-25 January 2008
Topology : Hierarchy
Geometry Design Tutorial 32Instituto Tecnológico de Veracruz 21-25 January 2008
Constructive RepresentationParametric Volume PrimitivesTransformationsBoolean Operators:
Union, common, subtract
Concept of GraphAdvantage :
Simple DescriptionSimulation of Object « Manufacturing »
CSG : Constructive Solid Geometry
Geometry Design Tutorial 33Instituto Tecnológico de Veracruz 21-25 January 2008
CSG: Primitive Components
Geometry Design Tutorial 34Instituto Tecnológico de Veracruz 21-25 January 2008
U
CSG: Boolean Operators
Union
Geometry Design Tutorial 35Instituto Tecnológico de Veracruz 21-25 January 2008
Union
CSG: Boolean Operators
U
Geometry Design Tutorial 36Instituto Tecnológico de Veracruz 21-25 January 2008
U
-
Subtract
CSG: Boolean Operators
Geometry Design Tutorial 37Instituto Tecnológico de Veracruz 21-25 January 2008
∩
Common
CSG: Boolean Operators
Geometry Design Tutorial 38Instituto Tecnológico de Veracruz 21-25 January 2008
CSG: Boolean Operators
Fillet
Geometry Design Tutorial 39Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Curves
Lap back point
Multiple point
Arc length, abscissa curvilinear
0
2 2 2 2
2 2 2
ds = dx + dy + dz
( )u
u
dx dy dzs u dudu du du
= + + ∫
u
u=u0
s(u)
τ(s) τ(s+ds)
x, y, z function of u, continuous first order
Geometry Design Tutorial 40Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Curvature
Geometry Design Tutorial 41Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Curvature
Geometry Design Tutorial 42Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Curvature
O
M
n
Ray ofOsculator Circle
=Curvature Ray
nOMρ
=
Parametric curve:
For the curve with the equation y = f(x):
Geometry Design Tutorial 43Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Vector and TangentialFrenet Reference
2
2
2 2
2 2
2
2
( ) et n( )
d xdxdsds
dOM dy d OM d yu uds ds ds ds
dz d zds ds
τ
= =
n = Principal normal
t
OM(s+dh1)
OM(s+dh2)
OM(s)
Geometry Design Tutorial 44Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Torsion
M(s)
M(s+ds)
Osculator Plane at M(s)
Osculator Plane at M(s+ds)Torsion
Geometry Design Tutorial 45Instituto Tecnológico de Veracruz 21-25 January 2008
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 sy = R s in , = R c o s , = -R s inz = p
= p = 0
a in s i e t d o n c s =
R = - s in
R =
d xd xdd
d y d yd dd z d zd d
d s d x d y d z R p R p
d xd s R pd yd s R
θθ θθθθ θ θ
θ θθ
θ θ
θ
θ
τ
= + + = + + ×
+
2
2 2 2
2
2 2 2 2 22 2
2
22 2
2 2
2 22 2
2 2
R = - c o s
R Rc o s e t = - s in a v e c =
p = 0 =
p s in
-p p c o s e t d o n c
R
d xd s R p
d d yd s d s R p R pp
d zd zd sd s R p
R pd bb n T Td s R pR p
R p
θ
τθ θ ρ
θ
τ θ
+
+ ++ +
+
= × = =++
+
Geometry Design Tutorial 46Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Propeller Circular
-1 -0.5 0 0.5 1
-1-0.5
00.5
1
0
1
2
3-1
-0.500.5
1 -1 -0.5 0 0.5 1
-1-0.5
00.5
1
0
1
2
3-1
-0.50
0.51
Discretizing
Geometry Design Tutorial 47Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Frenet - SerretReference, Equations, Curvature, Torsion
Frenet Equations:
Frenet Reference:
For any parametric function f(t), the expression of the curvature and the torsion are the following:
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 48Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: CurvatureGaussian, Average
Gaussian Curvature
Average Curvature
Curvature Cmap
Geometry Design Tutorial 49Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: CurvatureGaussian, Average
Gaussian Curvature = 21
R
Average Curvature = 1_R
Sphere
Geometry Design Tutorial 50Instituto Tecnológico de Veracruz 21-25 January 2008
Gaussian Average
Geometry: CurvatureGaussian, Average
Torus
Geometry Design Tutorial 51Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Curvature
Torus
Geometry Design Tutorial 52Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Surfaces of Revolution
-1 -0.5 0 0.5 1
-1-0.5
00.5
1
0
1
2
3
4-1-0.5
00.5
1
-4-2
02
4 -4
-2
0
2
4
-1-0.500.51
-4-2
02
4
-1-0.5
00.5
1
-1-0.5
00.5
1
-1
-0.5
0
0.5
1
-1-0.5
00.5
1
-1-0.5
00.5
1
Geometry Design Tutorial 53Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Particular Surfaces
-250
2550
-40
-200
2040
-100
10
-250
2550
Mobius Strip: 'Endless Ribbon'
Geometry Design Tutorial 54Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Particular Surfaces
The Klein Bottle
Geometry Design Tutorial 55Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Particular Surfaces
The Klein Bottle
Geometry Design Tutorial 56Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Particular Surfaces
The Klein Bottle: Curvature
Geometry Design Tutorial 57Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Particular Surfaces
The Kuen Surfaces
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 Design Tutorial 58Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Particular Surfaces
The Dini Surfaces
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 Design Tutorial 59Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Particular Surfaces
Asteroid
x= pow (a*cos(u)*cos(v),3) y= pow (b*sin(u)*cos(v),3) z= pow (c*sin(v),3)
Geometry Design Tutorial 60Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Particular Surfaces
The «Derviche»
Geometry Design Tutorial 61Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Curves
Lagrange Interpolating Polynomial
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 Design Tutorial 62Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Curves
Lagrange Interpolating Polynomial
Where:
Written explicitly:
Geometry Design Tutorial 63Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Curves
Cubic Spline Interpolating Polynomial
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 Design Tutorial 64Instituto Tecnológico de Veracruz 21-25 January 2008
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
Rearranging all these equations,leads to the following beautifullysymmetric tridiagonal system:
If the curve is instead closed, the system becomes
Cubic Spline Interpolating Polynomial
Geometry Design Tutorial 65Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Curves
Cubic Spline/Lagrange
1 2 3 4 5 6 7
-3
-2
-1
1
2
1 2 3 4 5 6 7
-5-4
-3-2
-1
1
2
Geometry Design Tutorial 66Instituto Tecnológico de Veracruz 21-25 January 2008
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:
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 Design Tutorial 67Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Curves
Bézier:Properties
The Bézier curve always passes through the first and last control points.
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 Design Tutorial 68Instituto Tecnológico de Veracruz 21-25 January 2008
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.
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 Design Tutorial 69Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Curves
Bézier: Bernstein Polynomials
Bin(t) = Cn
i (t-1)n-iti , Cni = n! / i!(n-i)!
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)
Bi j(t) = (1-t)Bi
j-1(t) + t Bi-1j-1(t)
Geometry Design Tutorial 70Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Curves
Bézier: Bernstein Polynomials
•Unit Partition: Σi=0,n Bin(t) = 1
•0<=Bin(t)<= 1
•Bin(0) = 0 et Bi
n(1) = 0
•B0n(0) = 1
•Bnn(1) = 1
Bi j(t) = (1-t)Bi
j-1(t) + t Bi-1j-1(t)
Geometry Design Tutorial 71Instituto Tecnológico de Veracruz 21-25 January 2008
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},
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 Design Tutorial 72Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Curves
B-Spline
Define the basis functions as:
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 Design Tutorial 73Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Curves
NURBS-Curve
A non uniform rational B-spline curve defined by:
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 Design Tutorial 74Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Curves
Conics
Parabola w=1
Hyperbole w=4 Ellipse w=1/4
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
(0,0,0,1,1,1)
Geometry Design Tutorial 75Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Curves
•NURBS of degree 2•Control points (Isosceles triangle)•Knot vector (0,0,0,1,1,1)
Arcs
Geometry Design Tutorial 76Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Curves
Circles
(0, 0, 0, 1/3, 1/3, 2/3, 2/3, 1, 1, 1)
(0, 0, 0, 1/4, 1/4, 1/2, 1/2, 3/4, 3/4, 1, 1, 1)
Geometry Design Tutorial 77Instituto Tecnológico de Veracruz 21-25 January 2008
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:
is a Bernstein polynomial, and
is the binomial coefficient.
Geometry Design Tutorial 78Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Surfaces
S(u,v) = Σi=0,nΣj=0,m Bin(u) Bj
m(v) Pij
(n+1)(n+1) points Pij
Pi(v) = Σj=0,m Bjm(v)Pij
Bézier
Geometry Design Tutorial 79Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Surfaces
NURBS
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 Design Tutorial 80Instituto Tecnológico de Veracruz 21-25 January 2008
Geometry: Surfaces
NURBS: Properties
They are generalizations of non-rational B-Splines and non-rational and rational Béziercurves and surfaces.
NURBS 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.
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.