1
Computer Aided Design
CAD course
Master in Aerospace and Mechanical Engineering
2
Computer Aided Design
Service...
Eric Béchet (it's me !) Engineering studies in Nancy (Fr.) Ph.D in Montréal (Can.) Academic career in Nantes as Post-doc then ass. Prof. in
Metz (Fr.)then Liège...
Christophe Leblanc Assistant ( Ph.D. student ) at our university
Website http://www.cgeo.ulg.ac.be/CAO
Contacts : [email protected]
3
Computer Aided Design
Procedures
12 Ex-Cathedra lectures (~2h except for the 1st) Practical sessions
On the NX CAD software (5 4h-sessions) Programming (8 2h-sessions)
Practical assessment : practical works (pw) are rated.
Final test about theory (tt) – Jan./Sept. The practical sessions, the project and the final
test are all mandatory, with over 8/20 to pass. The final mark m=pw/3 + 2tt/3, over 10 to pass & get the credits for the course.
4
Computer Aided Design
Procedures Lectures are given on Tuesday, 2 PM – Lecture
room is O1 ( B37 bldg.) Begins today (exceptionally lasts 4h !), then
Sept. 26, Oct. 3, 10, 17, 24; Nov. 7, 14, 21, 28, Dec. 5, 14, 19
Practical work begins Sept. 26th after the course (check website for more dates & info) It is organized by groups of around 20 students
formed in accordance with availabilities. Any question : I am available mostly Fridays,
appointment via email or phone : 04-366-9165Office : Bldg B52 +2/438
5
Computer Aided Design
Outline (1st few classes)
Introduction Brief history Some basics about solid modeling
Parametric forms Curves Surfaces
Implicit forms Plane curves et surfaces Implicit volume modeling
6
Computer Aided Design
Outline (whole course)
Interpolation and polynomial approximation Cubic splines Bézier curves B-Splines Curves and rational surfaces In-depth B-REP models
7
Computer Aided Design
Introduction
CAD/CAM – Computer Aided Design / Computer Aided Manufacturing Development since the 1950s-1960s
Iso Schoenberg (at U-Wisconsin) – splines (40's) First « interactive » CAD graphic engine at the MIT
(I. Sutherland, Sketchpad) – 60's James Ferguson (at Boeing) – splines (60's) Paul De Casteljau (at Citroën) – Bézier curves (50's) Pierre Bézier (at Renault) – '' '' Carl De Boor (at GM / U-Wisconsin) – B-Splines (70's)
Catia, Unigraphics (now Siemens NX) date back to the mid-70’s, emergence of 3d modeling kernels on mainframes.
Huge expansion in the 80’s with cheap personal computers becoming ubiquitous.
8
Computer Aided Design
Introduction
Sketchpad (Ivan Sutherland) – 1963
9
Computer Aided Design
Introduction
Old mathematical and theoretical bases Practical framework has been developed
because of industrial needs. In return, it has contributed at the theoretical
level.
10
Computer Aided Design
Basics
11
Computer Aided Design
Solid modeling
Many types of CAD systems First systems (such as Sutherland's) were aides for
drafting in 2D With the evolution of computers, 3D capabilities
were added Wireframe representation Surface modeling Then, real 3D modelers came over.
Today, most CAD system incorporate all capabilities.
One can start with surface design, from which a 3D model can be built, which yields at the end the 2D technical drawings that may be printed on paper.
12
Computer Aided Design
Solid modeling
More generally, what are the geometric queries that a solid modeler is expected to respond to ?
Eg. « Is a given point inside or outside a volume, on a
face or an edge, or even on an existing vertex ? » « Generate a set of points located on the boundary
of the solid » « Compute the union of two solids » « Build one solid from a set of intersecting
surfaces »
...
13
Computer Aided Design
Solid modeling
3D modelers, many types of representation for volumes Two families
Volumetric models By construction
Half spaces (level-sets) Composition of primitive objects (CSG)
By decomposition Exhaustive enumeration
and structured meshes Models defined by boundaries
Definition of the volume by the enumeration of its boundariesB-Rep
14
Computer Aided Design
Solid modelling
Fundamental properties of solid models Power of expression
Degree in the capability to represent all real solids, without approximation.
ValidityAmong the possible representations within the model, are some representations invalid ?
15
Computer Aided Design
Solid modelling
Fundamental properties of solid models Non-ambiguity and uniqueness
Does a representation in the model correspond to one or several real solids ? / Can a real solid be represented in different ways ?
ConcisionTo represent a particular solid, do we need many primitives or operations ?
The wireframerepresentationis ambiguous
16
Computer Aided Design
Solid modelling
Fundamental properties of solid models Is the set of operations closed or open with respect to the
model ?During the application of an operation onto a model, can we obtain a non-valid solid, (are every operations valid ?) or a solid that is non representable ?
Calculation cost and applicabilityIs the construction of a solid within the selected model costly ?
Does the selected model address the issue raised by the user ?
17
Computer Aided Design
CSG model
Description of a solid with the help of simpler primitives and elementary operations is ubiquitous in CAD modeling : CSG model (Constructive Solid Geometry) Internal representation
is in the form of a binary tree Leaves are geometric primitives Nodes are operations
« union », « difference »,« intersection »
Possible to :« move », « complement », « change scale » etc...
Wik
iped
ia
18
Computer Aided Design
Solid modeling
Characteristics of the modeling by half-spaces / CSG
Power of expression: depends on the set of available half-spaces (planes, quadratic surfaces, etc.) or primitivesIt is not possible to represent a single surface limited by 4 curves (a patch) , for example.
Validity : The half spaces are infinite (limited by planes for example). A combination can give an infinite volume i.e. not acceptable under the assumption that solids are finite and “closed” volumes.
Ambiguity/uniqueness : each valid combination of half-spaces determines an unique solid → non ambiguous.A given solid can be represented by several different combination of half-spaces (non uniqueness)
19
Computer Aided Design
Solid modeling
Concision : the model by half-spaces is relatively concise.
Closedness of the set of operations : we focus here on boolean operations of union and intersection, these always give a valid description → closed set of operations
Calculation cost and applicability
The operation of modeling itself is not costly (update of a tree). The extraction of useful information can be much more difficult e.g. calculation of surfaces... or very simple such as collision detection (inside / outside test for a point)
20
Computer Aided Design
Solid modeling CSG models
User-friendliness Widely used in the interface shown by the CAD software
to the user In general many CAD software
integrate some sort of history of the constructionof the model (cf model tree in Catia)
21
Computer Aided Design
Solid modeling
Modeling by spatial decomposition Division in regular cells Exhaustive enumeration of non empty cells
M. M
änty
lä
22
Computer Aided Design
Solid modeling
Modeling by spatial decomposition Cells of variable size Recursive division of a cell containing the whole
solid in smaller cells located along the boundary of the solid, until a prescribed error is reached.
23
Computer Aided Design
Solid modeling
Modelling by spatial decomposition Quadtree (2D)
Each node has 4 children. Each children has a different representation in function of
the “filling” of the area
1 2
3 4
24
Computer Aided Design
Solid modeling
Modelling by spatial decomposition Quadtree (2D)
Each node has 4 children. Each children has a different representation in function of
the “filling” of the area
1
2.1
4
2.2
2.3 2.4
3.1 3.2
3.3 3.4
25
Computer Aided Design
Solid modeling
Modelling by spatial decomposition Boolean operations : union, complement,
difference, intersection
U =
U =
U =
U =
U =
U =
Union
U
=
=
=
=
=
=
Intersection
U
U
U
U
U
=
=
=
=
=
=
difference
\
\
\
\
\
\
=\
=
=
=
complement
_
_
_=\
26
Computer Aided Design
Solid modeling
Modelling by spatial decomposition Octree (3D) – analogy : voxels
Each node has 8 children. Often used in medical images as means of efficient
storage Effective means of geometric
location in 3D space
27
Computer Aided Design
Solid modeling
Characteristics of the modelling by spatial decomposition
Power of expression: By definition, it's an approximation as soon as the boundaries of the object are not aligned with the cells
Validity : always valid Ambiguity/uniqueness
Every description corresponds to an unique solid → non ambiguous.
A given solid is represented by a single way for the same root cell (uniqueness)
→ However, since the representation is approximative, we can consider that many real solids can lead to the same representation.
28
Computer Aided Design
Solid modeling
Concision : For a precise representation, the model can become very heavy thus it is not very concise
Closedness of the set of operations : we speak here about boolean operations of union and intersection, that systematically give a valid description → closed set of operations
Calculation cost and applicability
Such models are easy to manipulate but with a limited applicability due to high calculation costs (large quantity of data). However some operations are efficient , collision (inside/outside) test for instance.
29
Computer Aided Design
Solid modeling
Description by meshes It is a variant of the exhaustive decomposition that
is respecting to a certain extent the boundaries of the object
Cells are not regularly organized anymore Used mainly for scientific computations
30
Computer Aided Design
Solid modeling
B-Rep model « Boundary representation » Model based on the representation of surfaces Model of exchange (STEP format) and definition The “natural” set of operators is richer than for CSG
Extrusion, chamfer etc ... Does not inherently carry the history of construction
of the model (whereas CSG usually does)
31
Computer Aided Design
Solid modeling
B-Rep model Consists of two type of information
GeometricGeometric information is used for defining the spatial position, the curvatures, etc...
That's what we will see in the next couple of lectures – Nurbs curves and surfaces
TopologicalThis allows to make links between geometrical entities.
Two types of entities Geometric entities: surface, curve, point Topological entities : volume, face, edge, vertex
A topological entity “lies on” a geometric entity, which is its geometrical support
32
Computer Aided Design
Solid modeling
B-Rep model Simplified hierarchical model vertex-edge-face-
volume
ff
f
v
ev v
33
Computer Aided Design
Solid modeling
B-Rep model Simplified hierarchic model vertex-edge-face-volume
v1
v2
v3
v4
a1
v8
v5
v6
v7
e2
e3
e4 f
1
f1 e
1 e
2 e
3 e
4
f2 … … … ...
f3 … … … ...
...
e1 v
1 v
2
e2 v
2 v
3
e3 v
3 v
4
e4 v
4 v
1
...
v1 x
1 y
1 z
1
v2 x
2 y
2 z
2
v3 x
3 y
3 z
3
...
Composed of
Composed of
Volume 1
Composed of
34
Computer Aided Design
Solid modeling
B-Rep model Complete hierarchical structure found in most solid
modelers
Volume « shells » Boundary Face
face « loops » Boundaryedge
edge Boundary
vertex
vertex G.S. Expressed inparametric coordinates u,v or t
If it exists, the geometric support (G.S.) is expressed in cartesian coordinates x,y,z
« Composed of »
« is related to »
1:n 1:n
1:{1 if manifold , 2 otherwise }
1:n 1:n
1:{2 if manifold, n otherwise }
1:2
1:n
35
Computer Aided Design
Solid modeling
Characteristics of the B-REP modelling Power of expression: Allows to represent any solid if we
dispose of appropriate surfaces/curves (NURBS) Validity : Every B-REP is not necessarily valid
Topological validity (see the Euler Poincaré relations in the sequel)
Geometric validity Ambiguity/uniqueness : Every valid B-REP represents an
unique solid → non ambiguous.There are many different ways to represent a given solid (non uniqueness)
36
Computer Aided Design
Solid modeling
Concision : Generally concise Closedness of the set of operations : In general,
operations made on B-REPs do not necessarily yield regular models of real solids (in particular for boolean operations)
Euler operators do maintain the topological validity, but not necessary the geometric validity
Calculation cost and applicability
boolean operators are costly, but other modelling operators may be easier to implement using a B-REP representation. In general, modelling operators are more rich than for CSG
37
Computer Aided Design
Solid modeling
Validity of the model The boundary of a face is made up of edges that are not
allowed to intersect each other
invalid
38
Computer Aided Design
Solid modeling
Validity of the model The faces of a model can only intersect in common
edges or vertices.
Invalid
Pyramid on base
39
Computer Aided Design
Solid modeling
How to represent individual entities ? CSG
Primitives (Leaves of the CSG tree) → equations ??? Operators (Nodes " " " ) → How ?
B-REP Vertices → trivial (coordinates) Edges → straight line or ??? Faces → Planar or ??? Volumes → Indirectly Need to define a geometric support.
40
Computer Aided Design
Point
Point Defined in an euclidean space (2D or 3D)
Notion of distance between two points is trivial. Sometimes defined in a non euclidean space (e.g.
parametric space, in 1D = curve or 2D=surface ) Ex : points of a curve localized on a parametric surface. Notion of distance between two points is not trivial on a
curve or a surface. Sometimes, use of homogeneous coordinates (4th
coordinate) 4 dimensions + one equivalence relation → 3D Perspective division to come back to euclidean 3D space. Rational curves and surfaces.
41
Computer Aided Design
Point
Homogeneous coordinates and class of equivalence Coordinates x, y, z and w (weight) All points (4D) located on a line passing through the
origin O(0,0,0,0) are equivalent. Particularly, a point located on the plane w=1.
Change from homogeneous coordinates to euclidean coordinates by perspective division:
(xyzw)≡(
x /wy /wz /w
1)≡(
x /wy /wz /w )
42
Computer Aided Design
Curve
Curve : 1D manifold in a space of higher dimension Plane curves (2D)
Position, tangent, curvature Skew curves (3D)
Position, tangent, curvature, torsion
43
Computer Aided Design
Curve
Meaning of curvature k Deviation rate of the curve in comparison with a
straight line. Radius of curvature is the inverse of the curvature We can define a vector n that is normal at the
tangent and point to the center of curvature : it is the normal vector
n
t
44
Computer Aided Design
Curve
Meaning of torsion t Deviation of the curve in comparison with a plane
formed by the tangent and the normal vector... For a plane curve, torsion is zero. We can define a vector normal to normal vector and
also to the tangent : it is the binormal vector b b points to the torsion center
nt
b
45
Computer Aided Design
Continuity
Geometrical continuity : Given two « independent » curves : They are discontinuous
of continuity G0 (position p)
of continuity G1 (p+tangent t)
of continuity G2 (p+t+curvatures)
... G
46
Computer Aided Design
Surfaces
2D manifold in 3D space Tangent plane (defined by two linearly independent
vectors tangent to the surface) Normal vector Several curvatures may be defined
Gaussian (or total) curvature and average curvature Principal curvatures
47
Computer Aided Design
Different representations of curves and surfaces
48
Computer Aided Design
Modes of representation
There are many Parametric form Explicit form Implicit form Etc. (eg. solution of partial differential equations –
PDEs … )
49
Computer Aided Design
Parametric representation
50
Computer Aided Design
Parametric representation
Use of scalar parameters to “walk” on the curve/surface The number of those scalars determine the dimension
of the entity and the mapping from one space (the parametric space to the other (usually cartesian) space.
0 – Point , 1 (u) – Curve , 2 (u,v) – Surface
3 (u,v,w) – Volume ( transformation used for finite elements) We associate to those scalars some function for each
of the space coordinates ( x,y in the plane; x,y,z in 3D)
P⃗ (u)={x= f (u)y=g (u)z=h(u)
or P⃗ (u , v)={x= f (u , v)y=g (u , v)z=h(u , v)
51
Computer Aided Design
Parametric representation
Parametric curves
52
Computer Aided Design
Parametric representation
For a curve, the representation takes the following form:
u is a real parameter. We obtain all the points of the curve by varying u. The parametrization is not unique ! The parameter u can be limited (limits of the curve)
P u={x= f uy=g uz=h u x
y0
1
2 3 4
5
67
8
53
Computer Aided Design
Parametric representation
Continuity of the parametrization A parametric curve is said to be C
k if the
parametrization P(u) is Ck (i.e. the kth derivative is
continuous) However : a parametric curve of class C
may have an
angular point... (i.e. some continuity of the parametrization does not necessarily involve the same geometric continuity of the resulting curve !)
P u={x=u3
y=u2
x
y
P 'u=0 ={00
54
Computer Aided Design
Parametric representation
Regularity of the parametrization A parametric curve P(u) is regular if the first
derivative P'(u) does not vanish at any place on all the interval of definition.
On the contrary, points where P'(u) vanishes, are called singular points.
A given curve can admit two parametric forms such that one is regular and the other one isn't...
Example : curve y=x2 with two parametric forms P(u) and Q(v)
P u={ x=uy=u2
Q v={x=v3
y=v6P 'u=0 ={10 Q '
v=0 ={00
55
Computer Aided Design
Parametric representation
Regularity and continuity of the parametrization A curve of geometric continuity G
k can be described by
a parametrization that is non- Ck
A curve of parametrization Ck may not be G
k
A curve admitting singular points can be Gk and/or C
k.
A regular curve is not necessary Ck and/or G
k.
To conclude : Parametric continuity, geometric continuity, and
regularity are all relatively independent notions!
56
Computer Aided Design
Parametric representation
Ck -equivalent parametric forms
Two parametric forms P(u) and Q(v) of the same curve are C
k - equivalents if there is a bijective
function j of class Ck whose reciprocal is also of
class Ck and such that:
v=u P u=Q u
57
Computer Aided Design
Parametric representation
Length of a regular curve It is a measure that is independent of the
parametrization (provided that those are C1-
equivalent)
L=∫a
b
∣P 'u∣du= ∫
c=a
d=b
∣Q 'v∣dv
58
Computer Aided Design
Parametric representation
Natural parametrization It is a parametrization s such that :
s is also named curvilinear abscissa along the curve.
It can be built from any regular parametrization u of the curve :
L AB=s B−sA x
yA
s=0.1
B
su =∫A
u
∣P ' t ∣dt
59
Computer Aided Design
Parametric representation
Parametrization of a circle in the plane :
Natural parametrization of the same circle...
r{x=r cos uy=r sin u
, u∈[0, 2 [
{x=r cos
sr
y=r sinsr
, s∈[0, 2 r [ s=r u
60
Computer Aided Design
Parametric representation
Differential geometry for parametric curves Position P :
Tangent vector T :
Normal vector N :
Binormal vector B :
T u=dPds
=dPdu
⋅duds
=P '
∣P '∣
P u=x u y u z u P '
=dPdu
P ''=
d 2 P
du2
N (u)=Norm(u)
∣Norm(u)∣ with Norm(u)=P ''
−( P ''⋅T )T
B u=T u×N u
x
y
TN
z B
(It is not defined when Norm(u) = 0 !)
61
Computer Aided Design
Parametric representation
Frenet's frame and equations
2D
3D [d T s
dsd N s
dsd Bs
ds]=[
0 s 0−s 0 s
0 −s 0 ]⋅[T sN sBs ]
T s
N s
B s
s
[d T s
dsd N s
ds]=[ 0 s
− s 0 ]⋅[T sN s]
Works only with s : the curvilinear abscissa !
62
Computer Aided Design
Parametric representation
Curvature k :
Torsion t:
= d 2 T
ds2 ,dTds
,T
2 = P ''' , P '' , P '
∣P '×P ''∣
2
|k|=|dTds |=
|P '×P ''|
|P '|3
u=T 'u⋅N u
∣P 'u ∣
u=N '
u⋅B u
∣P 'u∣
Curvature vector
=N u u
63
Computer Aided Design
Parametric representation
Parametric surfaces
64
Computer Aided Design
Parametric representation
A parametric surface is represented as :
u,v are two real parameters All the points of the surface can be
obtained by varying u and v. Again, the parametrization is not unique ! The interval of definition is limited (limits the
surface)
P u , v ={x= f u , v y=g u , v z=hu , v
x
y z
u,v
u=cst
v=cst
65
Computer Aided Design
Parametric representation
A curve can be defined on the surfaceParametric space « Ambient » space
The equations seen for parametric curves are valid in this particular case. x
y z
t
u=cst
v=cst
P u , v : {x= f u , v y=g u , v z=hu , v
t :{x= f u t , v t y=g u t , v t z=hu t , v t
uvt : {u=u t
v=v t
66
Computer Aided Design
Parametric representation
Regularity and continuity of the parametrization A parametric surface is of class C
k if the mapping
P(u,v) onto R3 is of class Ck.
A parametrization is regular if and only if (iff)
The points on the parametric space for which it is not the case are called singular points.
Ck–equivalent parametric forms follow the same
definitions as for curves
∂ P∂u
u0 , v0×∂ P∂ v
u0 , v0≠0 ∀u0 , v0∈D⊂ℝ2
67
Computer Aided Design
Parametric representation
Differential geometry for parametric surfaces
Position P :
Unit tangent vectors T u and T v :
These vectors are, in general, not orthogonal ! Tangent plane (parametric form)
or
T uu , v=
∂ P∂u
⋅∣∂ P∂ u ∣
−1
=P u
∣P u∣T v
u , v =∂ P∂ v
⋅∣∂ P∂ v ∣
−1
=Pv
∣Pv∣
P u , v=[x u , vy u , v z u , v ] Pu
=∂ P∂ u
Puv=
∂2 P
∂u∂v⋯
Pt u0 , v0a ,b=P u0 , v0a⋅T u
u0 , v0b⋅T vu0 , v0
a ,b∈ℝ2
P⃗t(u0 , v0)(a ,b)=P⃗ (u0 , v0)+a⋅P⃗u
(u0 , v0)+b⋅P⃗v(u0 , v0)
68
Computer Aided Design
Parametric representation
Normal vector N :
N (u , v)=Norm(u , v)
|Norm(u , v)| with Norm(u , v)=T u
×T v or Pu×P v
u ,v
u=cst
v=cst
T u
T v
N
69
Computer Aided Design
Parametric representation
Area of a surface
1st fundamental form Other notation of the area of a surface
du P u
dv P v
dS
A=∬Ω
dS
dS=∣du⋅Pu×dv⋅Pv
∣=∣Pu×P v
∣dudv
∣a×b∣2=a⋅a⋅b⋅b−a⋅b2
A=∬D
eg− f 2dudv
Lagrange's identity
dS=√(e g− f 2)dudv with e=Pu
⋅Pu , f =Pu⋅Pv , g=Pv
⋅Pv
70
Computer Aided Design
Parametric representation
Length of a curve on a surface
Γ⃗uv(t): {u=u(t )
v=v (t )Γ⃗(t ):{
x= f (u(t ) , v (t ))y=g (u(t ) , v (t ))z=h(u(t) , v (t ))
Γ'=
dP (u(t ) , v (t ))dt
P u , v : {x= f u , v y=g u , v z=hu , v
Pu=∂ P u , v
∂u
Pv=∂ P u , v
∂ v
't =u'
t Puu t , v t v '
t Pvut , v t
Γ'=∂ P (u(t ) , v (t ))
∂ududt
+∂ P (u(t) , v (t ))
∂ vdvdt
Derivative of the curve expressed in the parametric space of the surface Derivative of the surface (in 3D)
71
Computer Aided Design
Parametric representation
L=∫a
b
∣ ' t ∣dt=∫
a
b
∣ 't ∣
2
dt
't =u'
t Puu t , v t v '
t Pvut , v t
∣'t ∣2
=e u' t 22 f u '
t v 't g v '
t 2
with e=Pu⋅Pu , f =Pu
⋅Pv , g=P v⋅Pv
72
Computer Aided Design
Parametric representation
If we set
that is equivalent to :
( we have )
, we get a quadratic form :
ds=√e u'(t )2
+2 f u'(t )v '
(t)+g v '(t)2 dt
L=∫sa
s b
ds=sb −sa
ds=√e du2+2 f dudv+g dv2
e u't 2
2 f u't v '
t g v 't 2=u'
t v ' t e f
f g u't
v 't
L=∫a
b
u't v '
t e ff g u
't
v 't dt
73
Computer Aided Design
Parametric representation
Angle between two curves ...
cosα=
(u1'(t 1) v1
'(t1))( e f
f g )(u2
'(t 2)
v2'(t 2))
√(u1'(t1) v1
'(t1))( e f
f g )(u1
'(t1)
v1'(t1))(u2
'(t 2) v2
'(t 2))( e f
f g )(u2
'(t2)
v2'(t 2))
Γ1'(t1)⋅Γ2
'(t 2)=∣Γ1
'(t1)∣∣Γ2
'(t 2)∣cosα=(u1
'(t 1) v1
'(t 1))( e f
f g )(u2
'(t 2)
v2'(t 2))
74
Computer Aided Design
Parametric representation
The first fundamental form is the application :
It is a symmetric bilinear form that allows to measure real distances from variations in the parametric space...
The matrix M1 is a representation of the metric tensor,
often noted
M1 also is related to the Jacobian matrix
of the transformation (u,v) → (x,y,z) (it is JTJ ).
j1(d Γ1uv , d Γ2
uv)=(du1 dv1)( e f
f g )(du2
dv2)=(du1 dv1 ) M1(
du2
dv2)
L=∫a
b
√j(d Γuv , d Γ
uv)dt cosα=
j(d Γ1uv , d Γ2
uv)
√j(d Γ1uv , d Γ1
uv)j(d Γ2
uv , d Γ2uv)
A=∬D√det M1 dudv ( =∬
D
det J dudv under some conditions)
with e=Pu⋅Pu , f =Pu
⋅P v , g=P v⋅Pv
J=(∂ x /∂u ∂ x /∂ v∂ y /∂u ∂ y /∂ v∂ z /∂ u ∂ z /∂ v )
g ij , i , j=u , v
75
Computer Aided Design
Parametric representation
Curvatures...
Normal curvature :
Geodesic curvatureor relative curvature w/r to the surface :
Simple or total curvature of the 3D curve :
kn
kg
k
76
Computer Aided Design
Parametric representation
Curvature vectors
Necessarily, we do have :
Differentiating yields :
N
P(u,v)
n
k
kn
kg
T
k=d Tds
=k⋅n=kn+k g
Center of curvature
(e.g. from Frenet's relations)
N⋅T=0
d Tds
⋅N +T⋅d Nds
=0
kn=d Tds
⋅N=−T⋅d Nds
=−d P (u , v)
ds⋅
d Nds
=−d P⋅d N
ds2 =l du2
+2 mdudv+n dv2
e du2+2 f dudv+g dv2
l=−dPdu
⋅d Ndu
m=−12(
dPdu
⋅d Ndv
+dPdv
⋅d Ndu
) n=−dPdv
⋅d Ndv
with
G=N×Tkn=kn⋅N k g=kg⋅G
(kg=d Tds
⋅G ) (ds=
√e du2+2 f dudv+g dv2)
77
Computer Aided Design
Parametric representation
This can be rewritten by noting that
and
, and integrating by parts
where e.g. for l :
l=−dPdu
⋅d Ndu
m=−12(
dPdu
⋅d Ndv
+dPdv
⋅d Ndu
) n=−dPdv
⋅d Ndv
dPdu
⋅N=0dPdv
⋅N=0
l=d 2 P
du2 ⋅N m=d 2 Pdu dv
⋅N n=d 2 P
dv2 ⋅N
UV=∫U dV +∫V dU
U=dPdu
dV=dNdu
⋅du
78
Computer Aided Design
Parametric representation
Curvatures and the second fundamental form The second fundamental form is the application
Normal curvature of a curve on a surface :
Geodesic curvature (curvature in the tangent plane) Measures the deviation of the curve in comparison with a
geodesic
j2(d Γ1uv , d Γ2
uv)=(du1 dv1)( l m
m n )(du2
dv2)=(du1 dv1 ) M2(
du2
dv2)
with l=N⋅Puu , n=N⋅Pvv , m=N⋅Puv
kn=j2(d Γ
uv , d Γuv)
j1(d Γuv , d Γ
uv)
kn=j2(d Γ
uv , d Γuv)
ds2
79
Computer Aided Design
Parametric representation
Definition of the geodesic It is a curve with a minimal length on a surface.
In the plane, those are lines On a sphere, great circles By definition, the geodesic has no geodesic curvature.
Relations between « simple » curvature, geodesic curvature and normal curvature is obtained from the curvature vectors
The geodesic curvature is therefore readily obtained from the others (except for the sign, which is same as )
k2=kn
2+kg
2
kg2=k
2−kn
2
k=kn+k g kn=kn⋅N k=k⋅n k g=kg⋅(N×T )=kg⋅G
d Tdu
⋅G
80
Computer Aided Design
Parametric representation
A circle of radius R in the plane
Curvature k = 1/R
Geodesic curvature kg= 1/R
Normal curvature kn= 0
A big circle on a sphere or radius RCurvature k
= 1/R
Geodesic curvature kg= 0
Normal curvature kn= 1/R
In the previous slides, k is the curvature of the curve in 3D (not in the parametric space !!!)
81
Computer Aided Design
Parametric representation
Curvatures of the surface
The normal curvature kn at a point only depends on the
local orientation of Γ on the surface. If we sweep through all the orientations, this curvature passes by a minimum k
min then a maximum k
max for two perpendicular directions.
These directions and the particular values of kn are
respectively called principal directions and principal curvatures of the surface. They do not depend on the parametrization of the surface...
They are the solution of an eigenvalue problem. The Shape operator (also called Weingarten Map)
plays a key role here, see what follows.
kn=j2(d Γ
uv , d Γuv)
j1(d Γuv , d Γ
uv)
82
Computer Aided Design
Parametric representation
Shape operator
Here, N is the normal to the surface, p is a point on the surface, w is a tangent vector to the surface at p. is a directional derivative along a unit vector w (in the surface) :
it is equal to .This operator gives back a vector in the tangent plane.
If one works in an orthonormal basis, eigenvectors are easy to compute as the operator is symmetric...
Let's build such an orthonormal basis from the natural one :
W p(w )=−∇w⋅N
∇w
P u=∂ P∂u
P v=∂ P∂ v
N=N (u , v )=P u
×Pv
‖P u×Pv‖
t1=Pu
‖Pu‖
t 2=N×t1=P v
−(Pv⋅t 1)t1
‖P v−(Pv
⋅t 1)t1‖
wu∂∂u
+w v∂∂ v
w=wu⋅Pu+wv⋅Pv
83
Computer Aided Design
Parametric representation
It is easy to show that one can switch from one basis to the other using coefficients of the 1st fundamental form …
One can also switch the other way back, working on coefficients rather than on vectors e.g. for any vector
One gets
t1=Pu
‖Pu‖=
Pu
√et 2=
e P v− f Pu
√e √eg− f 2=
e Pv− f P u
√e √h
[ t1
t 2]=1
√e√h [ √h 0− f e ][P
u
P v]
w⃗=w1 t1+w2 t 2=wu P u+wv Pv
[wu
wv]=
1
√e √h [√h − f0 e ][w1
w2]=Φ [w1
w2]
84
Computer Aided Design
Parametric representation
Now back to the shape operator : we will start with a vector expressed in the orthonormal frame (w
1,w
2) , convert it to the parametric basis (w
u,w
v),
take the directional derivative of the
normal n and then project back to the orthonormal frame.
Here, is precisely the matrix of the
coefficients of the second fundamental form...
wu∂∂u
+w v∂∂ v
W p(w )=−[ t1
t 2][nu nv]Φ [w1
w2]=−Φ
T [Pu
P v][nu nv]Φ [w1
w2]−[P
u
P v ][nu nv ]
85
Computer Aided Design
Parametric representation
In the orthonormal basis
In the original basis
(Weingarten Equation)
W p(w)=ΦT [ l m
m n ]Φ[w1
w2]=
1e h [ √h 0
− f e ][l mm n ][√h − f
0 e ][w1
w2]
=1eh [ h l (e m− f l)√h
(e m− f l )√h f 2 l+e2 n−2e f m][w1
w2]
~W p(w)=ΦW p(w)Φ−1 [wu
wv]=Φ(Φ
T [ l mm n ]Φ)Φ
−1[wu
wv]
=ΦΦT [ l m
m n ][wu
wv ]=1h [
g − f− f e ][ l m
m n ][wu
wv ]=[ e ff g ]
−1
⋅[ l mm n ][wu
wv ]
86
Computer Aided Design
Parametric representation
Eigenvalues and eigenvectors of the shape operator
The shape operator gives the normal curvature for a given orientation (i.e. the derivative of the unit normal vector with respect to a small increment along that orientation on the surface)
One can work either in the original frame (non orthonormal)
Or the orthonormal frame, for which the matrix is symmetric and the 2D eigenvectors are orthogonal
(L−k I )(dudv)=(00) with L=M 1
−1 M 2=~W p(w ) det (L−k I )=0
(W p(w)−k I )(dt1
dt 2)=(00) det (W p(w)−k I )=0
87
Computer Aided Design
Parametric representation
The eigenvectors are obtained using any of the relations:
Just use the other relation if the basis contains a null vector for one of the values of :
(dudv )⋅(
l−k em−k f )=0 (du
dv )=α⋅(m−k fk e−l ) , α>0: du2
+dv2=1
(dudv )⋅(
m−k fl−k g )=0 (du
dv )=α⋅( l−k gk f −m) , α>0: du2
+dv2=1
k
(M 2−k M 1)(dudv )=(00) ( l−k e m−k f
m−k f n−k g )(dudv)=(00)
88
Computer Aided Design
Parametric representation
ExampleP u , v=
uv
cos uPu
u , v=10
−sin u Pvu , v=
010
N (u , v)=Pu
×P v
∣Pu×P v∣
=(−sin u
01 )⋅ 1
√1+sin2 u
Puuu , v=
00
−cos uPvv
u , v =000
Puvu ,v=
000
89
Computer Aided Design
M1=Pu⋅Pu Pu
⋅Pv
Pu⋅Pv Pv
⋅P v=1sin2 u 00 1
(L−k I )(dudv)=(00) with L=M 1
−1 M 2
M2=(N⋅Puu N⋅Puv
N⋅Puv N⋅Pvv)=(−cos u
√1+sin2 u0
0 0)
Parametric representation
90
Computer Aided Design
Parametric representation
Numerical application : u=0 and v=0
M1−1=1 0
0 1
L=M 1−1 M 2=−1 0
0 0
M1=1sin2 u 00 1=1 0
0 1
M2=(−cos u
√1+sin2 u0
0 0)=(−1 00 0)
1=−1 c1=102=0 c2=01
c1
c2
o
C13D=(Pu , Pv)⋅(10)
C 23D=(Pu , Pv)⋅(01)
91
Computer Aided Design
Parametric representation
Umbilical points Points whose normal curvature k
n is independent of
the orientation of Γ . Locally, the surface looks like a plane or a sphere.
In this case, the following relations hold for the matrices M
1 and M
2 :
le=
mf=
ng
if f ≠0
le=
ng
if f =0 and m=0
kn=le=kmin=kmax= const.
Principal directions are arbitrary.
92
Computer Aided Design
Parametric representation
Gaussian curvature and average curvature Invariants (do not depend on the parametrization)
M=minmax
2=
12
trace L=12
e ng l−2 f m
e g− f 2
kT=kminkmax=det (L)=det (M 2)
det (M 1)=
l n−m2
e g− f 2
L=M 1−1 M 2
93
Computer Aided Design
Parametric representation
Local nature of the surface k
T>0 the surface is locally an ellipsoid – elliptic point
kT<0 : hyperbolic paraboloid – saddle point –
hyperbolic point
kT=0 and k
M<>0 : parabolic cylinder – parabolic
point
kT=0 and k
M=0 : no information – locally plane
94
Computer Aided Design
Christoffel symbols
Complete developments. Christoffel symbols Expression of the first derivatives along a
curve...
Lets differentiate that expression again...
Γ ' (t )=u ' Pu+v ' P v
u'=
du(t )dtPu=
∂ P (u , v)∂u
Pv=∂ P (u , v)
∂ vv '=
dv (t)dt
95
Computer Aided Design
Christoffel symbols
The terms are in the tangent plane The terms can be expressed as
linear combinations of tangential and normal components :
The are the Christoffel symbols (often written in textbooks ) and the are the coefficients of the second fundamental form.
(Γ ' (t)=u ' Pu+v ' P v) '
Γ" (t )=u" Pu+u ' (u ' Puu+v ' Puv)+v " Pv+v ' (u ' P vu+v ' P vv)
=u" Pu+v " Pv+u ' 2 Puu+u ' v ' Puv+u ' v ' P vu+v ' 2 P vv
u" Pu+v " P v
P ij , i , j={u , v }
P ij=C iju Pu+C ij
v P v+Lij N
C ijk
Lij
Gauss formula
Γijk
96
Computer Aided Design
Christoffel symbols
Using Einstein's notation (summation over repeated indices ):
How to compute and ? Multiply by
P ij=C ijk P k+Lij N , i , j , k=u , v
C ijk Lij
P l , l=u , v
P ij⋅P l=C ijk P k⋅P l+Lij N⋅P l
0
Coefficients of the 1st fundamental form = = metric tensorg kl
P ij⋅P l⋅(g kl )−1=C ij
k g kl⋅g kl−1
C ijk=P ij⋅P l⋅g lkC ij
k=P ij⋅P l⋅(g kl )
−1
Conventional notation of the inverse of the metric tensor
97
Computer Aided Design
Christoffel symbols
Now, multiply by
One recovers the formula seen before:
P ij=C ijk P k+Lij N
N
P ij⋅N=C ijk P k⋅N +Lij N⋅N
0
1
Lij=P ij⋅N
Lij≡M 2 M2=(N⋅Puu N⋅Puv
N⋅Puv N⋅Pvv)
98
Computer Aided Design
Christoffel symbols
Use of Christoffel symbols and the second fundamental form Let us return to the expression
Now replace by and use the Einstein notation again :
Now substitute
Γ" (t )=u" Pu+v " Pv+u ' 2 Puu+u ' v ' Puv+u ' v ' P vu+v ' 2 P vv
u , v ui , i=1,2
Γ" (t )=(ui)
" P i+(ui)
'⋅(u j
)' P ij
P ij=C ijk P k+Lij N
Γ" (t )=((uk)"+C ij
k(ui
)'⋅(u j
)')P k+(u
i)
'⋅(u j
)' Lij N
Total tangential component Normal component
99
Computer Aided Design
Christoffel symbols
Used to express curvatures (or second derivatives) in the 3D euclidean space from curvatures (or second derivatives) expressed in the parametric space.
Normal curvature: based on the normal component
If we have an arc-length parametrization :
if not : need to adjust
One recovers the formula :
kn=Lij(u
i)
'(u j
)'
ds2 =Lij(u
i)'(u j
)'
g kl (uk)'(ul
)'
kn=Γ"⋅N =Lij(ui)'(u j
)'
( =j2(d Γuv , d Γ
uv))
(ui)
'⋅(u j
)' Lij N
kN=j2(d Γ
uv , d Γuv)
j1(d Γuv , d Γ
uv)
100
Computer Aided Design
Christoffel symbols
Geodesic curvature : based on the tangential components
If the curve is parametrized by arc-length :
Therefore, the tangential component of is orthogonal to and to N as well. There is a proportionality factor between and .This factor is the geodesic curvature
((uk)
"+C ij
k(ui
)'⋅(u j
)')P k
Γ"⋅Γ '=0=((uk)
"+C ij
k(ui
)'⋅(u j
)')P k⋅Γ '+(ui
)'⋅(u j
)' Lij N⋅Γ '
Γ '⋅Γ '=1 Γ '⋅Γ"=0=0
Γ"Γ '
Γt "
Γt " N×Γ '
101
Computer Aided Design
Christoffel symbols
Therefore, , valid only if the parametrization of is normal (arc-length)
If not, need to adjust ...
Some developments* leads to the following identity :
Again, this expression makes only use of derivatives in the parametric space...
kg=[N ,Γ ' ,Γ" ]Γ
kg=√det (M 1)[−C11
2 u ' 3+C 22
1 v ' 3−(2C12
2−C 11
1)u ' 2 v '+(2C12
1−C22
2)u ' v ' 2
+u " v '−v " u ' ]
((u ' v ' )M1(u 'v ' ))
3/2
Γt "=kg (N ×Γ ' ) Γt "⋅(N×Γ ' )=kg(N×Γ ' )⋅(N×Γ ' )
kg=(N×Γ ' )⋅Γt "=(N×Γ ' )⋅Γ"
kg=[N ,Γ ' ,Γ" ]
ds3 =[N ,Γ ' ,Γ " ]
(g kl (uk)
'(ul
)' )
3/2
* see e.g.“Modern Differential Geometry of Curves and Surfaces with Mathematica”, 2nd ed. Boca Raton, FL: CRC Press, pp. 501-518, 1997.
102
Computer Aided Design
Christoffel symbols
Equations of a geodesic
Need to set that the geodesic curvature is equal to zero.
One obtains a set of differential equations May be used to actually compute an approximation
of the geodesic since it is usually impossible to solve that coupled system of ODEs algebraically.
103
Computer Aided Design
Parametric representation
Darboux frame and equations
s is the curvilinear abscissa
T s={∂ x s∂ s
,∂ y s∂ s
,∂ z s∂ s }
Su , v
s
uvs:{u=u s
v=v s s: {
x s= f u s , v sy s=g u s , v sz s=hu s , v s
P⃗ (u , v): {x= f (u , v)y=g (u , v)z=h(u , v)
N s= N u s , v s
G⃗ (s)=N⃗×T⃗
Darboux frame
T s
G s N s
104
Computer Aided Design
Parametric representation
Darboux frame and equations
[d T s
dsd G s
dsd N s
ds]=[
0 g s n s−g s 0 − g s−n s g s 0 ]⋅[
T sG sN s]
S u , v
s
Darboux frame
T s
G sN s
Geodesic torsion (or relative torsion)
105
Computer Aided Design
Parametric representation
Geodesic torsion
is identically zero iff the curve is along a direction of principal curvature (line of curvature)
Geodesic curvature
is identically zero iff the curve is a geodesic
106
Computer Aided Design
Parametric representation
In an euclidean space: The shortest line between two points has simple
curvature k equal to zero (= straight line) The minimal surface carried by a curve is of
average curvature kM equal to 0 everywhere
In a non euclidean space (on a surface): The (or one of the) shortest line between two points
on the surface has a geodesic curvature kg equal to
zero (it's a geodesic)
107
Computer Aided Design
Parametric representation
A good reference on « shape interrogation » Shape interrogation is the ability to get information
from geometric models
N. M. Patrikalakis and T. Maekawa, Shape Interrogation for Computer Aided Design and Manufacturing, Springer Verlag, February 2002. ISBN 3-540-42454-7
(Available as a PDF electronic copy at the library)
108
Computer Aided Design
Parametric representation
Some results of differential geometry
Gauss-Bonnet's theorem
is Euler's characteristic of surface S
∫S
kT dA+∫∂S
kg ds=2π χ(S )
S
=2 =0=−2
=−4=1
109
Computer Aided Design
Parametric representation
Application of Gauss-Bonnet's theorem For a polyhedron, we have (Euler's formula) :
We want to approximate a sphere with hexagons ( H ) and pentagons ( P ).
Each pentagon (hexagon) has 5 (6) nodes, shared by 3 faces Each pentagon (hexagon) has 5 (6) edges, shared by 2 faces So the total number of nodes N is ( 5P+6H )/3 Total number of edges E is ( 5P+6H )/2, total number of faces F
is P+H
The sphere is compact and its gaussian curvature is 1/R2
so P=12 … 12 pentagons are necessary and as many hexagons as we want to make soccer ball.
S =N−EF
S =N−EF=5P6H /3−5P6H /2PH=P /6
∫S
T dA∫∂ S
G ds=1
R2∫S
dA=4=2 S
110
Computer Aided Design
Parametric representation
111
Computer Aided Design
Explicit curves and surfaces
112
Computer Aided Design
Explicit forms
Curve as a function
We can swap x, y and z according to needs
y= f x z= f x , y
xOK !
y= f x
y
x
y
xOK !
x= f y
y
KO !
113
Computer Aided Design
Explicit forms
Polar coordinates Sometimes used. Circle is readily represented :
r =1
114
Computer Aided Design
Explicit forms
Definition of an explicit surface Depend on reference axis No multiple definitions i.e. unique value of z for a
position (x,y) For a given axes system, only one definition No closed curves /surfaces in one time
Unit circle – we must split it up at least in :
and y=1−x2 y=−1−x2
115
Computer Aided Design
Implicit representation
116
Computer Aided Design
Implicit forms
Ex. Unit circle : Infinity of representations of a
given curve Invariance by the multiplication by a constant
We can take absolute value too
... but the form is then not differentiable etc...
f x , y=0
x2 y2
−1=0
k⋅ f x , y=0 ⇔ f x , y=0 ∀ k≠0
∣ f x , y ∣=0 ⇔ f x , y =0
f =0
117
Computer Aided Design
Implicit forms
Advantages of an implicit form
For a point we know : If it is on the curve : If it is not on the curve : In some cases, we may know if it is inside or
outside the volume delimited by the curve:
If , P is inside the circle
But : has no meaning Multiplication by negative k : interior exterior
P [ x p , y p]
f x p , y p=0f x p , y p≠0
f ( x p , y p)<0 or f ( x p , y p)>0
x p2 y p
2−10
∣x p2 y p
2−1∣0
118
Computer Aided Design
Implicit forms
Normal forms / Contour line / level sets Particular case of implicit forms such that :
, is the signed distance to the curve In this case, for a point ,
is the distance from the point to the curve. d<0 means usually that the point is inside.
Case of the unit circle :is the distance to the circle.
Unique representation !(except the sign of the distance function – but it indicateswhere is the interior)
x , y =d dx p , y pP [ x p , y p]
x , y= x2 y2
−1
0
0
=0
119
Computer Aided Design
Implicit forms
Normal forms A normal form is a distance function, we have :
For the circle :
∣∇∣=∣∂
∂ x∂
∂ y∂
∂ z∣=∣
2 x
2 x2 y2
2 y
2 x2 y2
0∣= x2
x2 y2
y2
x2 y2
=1
∣∇ x , y ∣=1
120
Computer Aided Design
Implicit forms
Normal forms Ellipse ? We can « flatten » a circle :
Set
x* , y*= x*2
y*2−1
y*=2 y ; x*
=x
x , y= x22 y 2−1
0
0
=0
∣∇e∣=∣x
x24 y2
4y
x24 y2
0∣= x2
16 y2
x24 y2 ≠1
121
Computer Aided Design
Implicit forms
The normal form associated with a curve (or a surface in 3D) is usually nontrivial.
To get it nevertheless: Use of a numerical approximation (spatial discretization) We know the position of the curve or the surface: The normal form is reconstructed in the considered
domain by solving the « Eikonal » equation (from greek « image »):
{|⃗∇ j|=1 in Ωj=0 on Γ
j=0 on Γ
int
ext
122
Computer Aided Design
Implicit forms
Resolution of the Eikonal equation It is a non-linear, hyperbolic equation « Fast Marching » method
Cf . J.A. Sethian, Fast Marching Methods, SIAM Review (41) 2, pp 199-235, 1999
Consist in a step-by-step construction of the distance field, from the initial front where d = 0.
J.A
. S
etia
n
123
Computer Aided Design
Implicit forms
Resolution algorithm at first order on a regular grid
Known value in a point = 0 a) Calculation of test points J.A
. S
etia
n
124
Computer Aided Design
Implicit forms
First order resolution algorithm on a regular grid
b) Among test points, wechoose the one of lowest value
c) We fix it and (re)calculate new test points
J.A
. S
etia
n
125
Computer Aided Design
Implicit forms
Resolution algorithm at first order on a regular grid
c) We fix it and we recalculate... Here a test point has been computedtwice : we keep the lowest value
b) Among test points, wechoose the one of lowest value
J.A
. S
etia
n
126
Computer Aided Design
Implicit forms
The former procedure is repeated until all grid points have been fixed.
The result is a (possibly signed) distance field known at each grid point. Interpolation inside square patches makes it continuous.
One can extract an iso-value (e.g. for 0) and consider it as the surface of interest
Also, one may actually modify the field (with transport equations for instance) to change the shape and position of the surface.
127
Computer Aided Design
Implicit forms
There are algorithms of order 2 or higher It is also possible to solve that equation efficiently
on non regular grids ( unstructured meshes) Example : mesh
128
Computer Aided Design
Implicit forms
There are algorithms of order 2 or higher It is also possible to solve that equation efficiently
on non regular grids ( unstructured meshes) Example : iso-distance curves
129
Computer Aided Design
Implicit forms
There are high-performance algorithms to update discretized level-sets Resolution of partial differential equations
cf. J.A. Sethian « Level-Sets Methods and Fast Marching Methods, Evolving interfaces in computational geometry ... », Cambridge University Press, 1999.
Alternative representation of the geometry really useful for real objects (i.e. non perfect)
eg. Medical imaging, « historical » artifacts , etc... But also evolving interfaces (fluid surface, cracks in
solids)
130
Computer Aided Design
Implicit forms
Transport equation of a level-set
We solve that using explicit time-stepping Normal speed is given (known) Below, the speed is depending on the density ...
∂j
∂ t+V n⋅∇ j⋅⃗n=0
N.
Par
agio
s
131
Computer Aided Design
Implicit forms
Example of geometries based on « level-sets »
132
Computer Aided Design
Implicit forms
Example of geometries based on « level-sets »
M.Y
. W
ang
133
Computer Aided Design
Implicit forms
Some words on differential geometry...
134
Computer Aided Design
Implicit forms
Normal (ext.) to the curve / surface We use the gradient
Tangent vector for a planar implicit curve Use of a permutation
of the gradient
∇=[∂x , y , z
∂ x∂x , y , z
∂ y⋮
]N =
∇
∣∇∣
is equal to 1 if j is a signed distance ( a normal form )
T =Tan
∣∇∣
Tan =[−∂x , y , z
∂ y∂x , y , z
∂ x]
135
Computer Aided Design
Implicit forms
Curvature of a planar implicit curve Use of the Hessian matrix
Alternative
notation
H =[∂
2
∂ x2
∂2
∂ x∂ y
∂2
∂ y∂ x∂
2
∂ y2 ]=−T
T∗H ∗T
∣∇∣=
1Ro
=0
Ro
Osculating circle
=−Tan
T∗∇ Tan ×Tan ⋅n3
∣Tan ∣3
Basis vector (along z)
136
Computer Aided Design
Implicit forms
Demonstration of the equation of the curvature From Frenet equations :
we have :
and so :
now,
=−d N s
ds⋅T s [
d T sds
d N sds
]=[ 0 s−s 0 ]⋅[T s
N s]
=−∂N s∂ x
dxds
∂N s∂ y
dyds ⋅T s
∇ N=[∂Nx
∂ x∂N y
∂ x∂Nx
∂ y
∂N y
∂ y] T s =[
dxdsdyds
]=−T sT
∗∇ N s∗T s
137
Computer Aided Design
Implicit forms
We have :
Quod Erat Demonstrandum, QED
=−T sT∗∇ N s∗T s=−T
T∗H ∗T
∣∇∣
∇ N=∇ ∇
∣∇∣=∣∇∣∇ ∇ −∇ ∣∇∣∇
∣∇∣2
∇ ∇ =H ∇⋅T=∣∇∣⋅N⋅T=0
138
Computer Aided Design
Implicit forms
Curvature of a surface There are 2 curvatures :
Gaussian curvature ( = total curvature ) kT
Average curvature kM .
These are related to principal curvatures kmin
and
kmax
(curvature measured along principal
directions) :
Along principal directions T1 and T
2 , curvatures are
extrema ( kmin
or kmax
)
min ,max=M±M2−T M=
minmax
2T=minmax
143
Computer Aided Design
Implicit forms
Direct expression of principal directions Complicated but explicit formulas exist
Cf.Erich Hartmann, On the curvature of curves and surfaces defined by
normalforms, Computer Aided Geometric Design 16, pp. 355-376, 1999.
Numerical expression of the curvatures Cf. sequel...
144
Computer Aided Design
Implicit forms
Numerical expression of the curvatures Conjugate transpose Hessian matrix (matrix of the
cofactors) :
H =[∂
2
∂ x2
∂2
∂ x∂ y∂
2
∂ x∂ z
∂2
∂ y∂ x∂
2
∂ y2
∂2
∂ y∂ z
∂2
∂ z ∂ x∂
2
∂ z ∂ y∂
2
∂ z2]=[
, xx , xy , xz
, yx , yy , yz
, zx , zy , zz]
H*=[
, yy , zz− , zy , yz , yz , zx− , yx , zz , yx , zy− , yy , zx
, xz , zy− , xy , zz xx , zz− , xz , zx , xy , zx− , xx , zy
, xy , yz− , xz , yy , yx , xz− , xx , yz , xx , yy− , xy , yx]
145
Computer Aided Design
Implicit forms
Expression of curvatures of an implicit surface
T=∇
T∗H*
∗∇
∣∇∣4
M=∇
T∗H ∗∇−∣∇∣
2
⋅traceH
2∣∇∣3
146
Computer Aided Design
Implicit forms
Implicit curves in 3D
147
Computer Aided Design
Implicit forms
Curve in 3D Intersection of two implicit surfaces
TN
B
{ x , y , z =0 } ∩ { x , y , z =0 }
148
Computer Aided Design
Implicit forms
Tangent
Curvature For planar curves : By substituting ... (we must take the norm , because
that vector is not along n3 anymore)
Tan ,=∇ x , y , z ×∇ x , y , z
T ,=Tan ,∣Tan ,∣
=1 if we deal with two normal forms that are “orthogonal”
=∣Tan ,T∗∇ Tan , ×Tan ,∣
∣Tan ,∣3
=− Tan
T∗∇ Tan ×Tan ⋅n3
∣Tan ∣3
149
Computer Aided Design
Implicit forms
Torsion The formulas are obtained from the definition of the
torsion for the parametric curves We set :
Note : the curvature, written with the same kind of notation, is :
T *=Tan ,=∇x , y , z ×∇ x , y , z
T **=T *
∗∇ T *
T ***=T *
∗∇ ∇ T * ∗T * TT *
∗∇ T *∗∇ T *
=T * ,T ** ,T ***
∣T *×T **∣
2
=∣T *
×T **∣
∣T *∣3
150
Computer Aided Design
Implicit forms
Volume operations on contour lines (level-sets) We can represent a volume as the set of points
such as
Manipulations of volumes Union, intersection, etc...
≤0
151
Computer Aided Design
Implicit forms
Compounds of level-sets Union
Intersection
Complement
Difference
u=1∪2
i=1∩2
d=1∖2=1∩2
u x , y =min [1 x , y ,2 x , y]
i x , y=max [1 x , y ,2 x , y]
d x , y=max [1 x , y ,−2 x , y]
c=
c x , y =−x , y
152
Computer Aided Design
Implicit forms
Disc
Square 4 half planes !
d x , y= x2 y2
−1
1
2
3 4
c1 x , y= y
2 x , y =− y2
3 x , y=−x0.2
4 x , y =x−1.8
Region of interest
153
Computer Aided Design
Implicit forms
1
2
3 4
c
Region of interest
Use of intersections for the square :
Finally, difference between and
sq=1∩2∩3∩4
d x , y= x2 y2
−1
sq x , y=max [1,2,3,4]
dsq
f x , y=max [sq ,−d ]
f=sq∖d
f x , y =max [1,2,3,4,−d ]
154
Computer Aided Design
Implicit forms
Disadvantges of an implicit representation Obtaining points on the curve/surface :
Resolution of a set of non-linear equations Not very robust, and slow No parametrization , no « explicit » orientation
Discretization of the curve/surface(« rasterization ») From a point, use of specific algorithms (“marching
cubes”) Not always possible and/or robust