Sunteți pe pagina 1din 150

Computer Aided Design

CAD course

Master in
Aerospace and Mechanical Engineering

1
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 :
cleblanc@ulg.ac.be
2
Computer Aided Design
Procedures
st

12 Ex-Cathedra lectures (~2h except for the 1 )

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. 3
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-9165
Office : Bldg B52 +2/438 4
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

5
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

6
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. 7
Computer Aided Design
Introduction

Sketchpad (Ivan Sutherland) – 1963

8
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.

9
Computer Aided Design

Basics

10
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.
11
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 »
...
12
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 boundaries
B-Rep

13
Computer Aided Design
Solid modelling

Fundamental properties of solid models

Power of expression
Degree in the capability to represent all real solids, without
approximation.

Validity
Among the possible representations within the model, are some
representations invalid ?

14
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 ?

The wireframe
representation
is ambiguous


Concision
To represent a particular solid, do we need many primitives or
operations ?

15
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 applicability
Is the construction of a solid within the selected model costly ?
Does the selected model address the issue raised by the user ?

16
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 »,

Wikipedia
« intersection »

Possible to :
« move », « complement »,
« change scale » etc...
17
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
primitives
It 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)
18
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)

19
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 construction
of the model
(cf model tree in Catia)

20
Computer Aided Design
Solid modeling

Modeling by spatial decomposition

Division in regular cells

Exhaustive enumeration of non empty cells
M. Mäntylä

21
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.

22
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

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

2.1 2.2
1
2.3 2.4

3.1 3.2
4
3.3 3.4

24
Computer Aided Design
Solid modeling

Modelling by spatial decomposition

Boolean operations : union, complement,
difference, intersection
\ =
_
U
U = = \ = =
_
U
U = = \ = =
_
U
U = = \ = =
U
U = = \ =
U
U = = \ =
U
U = = \ =

\ =

Union Intersection difference 25


complement
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

26
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.

27
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.

28
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

29
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)

30
Computer Aided Design
Solid modeling

B-Rep model

Consists of two type of information

Geometric
Geometric 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

Topological
This 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 31
Computer Aided Design
Solid modeling

B-Rep model

Simplified hierarchical model vertex-edge-face-
volume

v e v

v f
f

32
Computer Aided Design
Solid modeling

B-Rep model

Simplified hierarchic model vertex-edge-face-volume

e1 v 1 v2
Composed of e2 v 2 v3
v7 v6 e3 v 3 v4
v8 v5 f1 e 1 e2 e3 e4
e4 v 4 v1
f2 … … … ...
...
f3 … … … ...
...
v4 e3 Composed of
e4 v3
f1
e2 Composed of
v1 a1 v2 v1 x 1 y1 z 1
v2 x 2 y2 z 2
Volume 1
v3 x 3 y3 z 3
...
33
Computer Aided Design
Solid modeling

B-Rep model

Complete hierarchical structure found in most solid
modelers
Volume
1:n
« shells »
1:n Boundary
Face

1:{1 if manifold , 2 otherwise }

1:n 1:n Boundary


face « loops »
edge

1:{2 if manifold, n otherwise }

« Composed of » 1:2 Boundary


edge vertex
1:n
« is related to »

If it exists, the geometric


vertex support (G.S.) G.S. Expressed in
is expressed in cartesian parametric coordinates 34
coordinates x,y,z u,v or t
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)

35
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

36
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

37
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

38
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.

39
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. 40
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:
x x/w

()( )(
y ≡ y /w ≡
z
w
z/w
1
x/w
y /w
z/w )
41
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

42
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

t 43
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

t
b n

44
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

45
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

46
Computer Aided Design

Different representations of curves and


surfaces

47
Computer Aided Design
Modes of representation

There are many

Parametric form

Explicit form

Implicit form

Etc. (eg. solution of partial differential equations –
PDEs … )

48
Computer Aided Design

Parametric representation

49
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)
x= f (u) x= f (u , v)
P
{
⃗ (u)= y=g (u)
z=h(u)
or P
{
⃗ (u , v)= y=g (u , v)
z=h(u , v) 50
Computer Aided Design
Parametric representation

Parametric curves

51
Computer Aided Design
Parametric representation
For a curve, the representation takes the
following form: 8 y

x= f u 0

{
7 6
P u= y=g u
 1 5

z=hu 2 3 4 x

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)

52
Computer Aided Design
Parametric representation
Continuity of the parametrization
 A parametric curve is said to be Ck 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 !)
y

3
x=u
 u=
P {
y=u
2

x
0
 '
P u=0=
0 { 53
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)
3
 v= x=v 6
P u=
 x=u
{
y=u
2
 ' u=0= 1
P {
0
Q {
y=v
 ' v=0= 0
Q {
0
54
Computer Aided Design
Parametric representation
Regularity and continuity of the parametrization
 A curve of geometric continuity Gk can be described by
a parametrization that is non- Ck
 A curve of parametrization Ck may not be Gk
 A curve admitting singular points can be Gk and/or Ck.
 A regular curve is not necessary Ck and/or Gk.
To conclude :

Parametric continuity, geometric continuity, and
regularity are all relatively independent notions!

55
Computer Aided Design
Parametric representation
Ck -equivalent parametric forms

Two parametric forms P(u) and Q(v) of the same
curve are Ck - 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
 u= Q

56
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)

b d = b

L=∫∣P
 ' u∣du= ∣  v∣dv
'
∫ Q
a c= a

57
Computer Aided Design
Parametric representation
Natural parametrization

It is a parametrization s such that : B y
A

s=0.1
L  AB=s  B−s A x


s is also named curvilinear abscissa along the
curve.

It can be built from any regular parametrization u of
the curve :
u
 t ∣dt
su=∫∣P
'

A
58
Computer Aided Design
Parametric representation

Parametrization of a circle in the plane :

x=r cos u , u∈ [ 0, 2 [
{ y=r sin u
r


Natural parametrization of the same circle...
s

{ x=r cos

y=r sin
r
s
r
, s∈ [ 0, 2  r [ s=r u

59
Computer Aided Design
Parametric representation
Differential geometry for parametric curves
Position P : x u

 

' dP d2 P
''
P u= y u P= P= 2
du du
z u
y

Tangent vector T :
'
dP dP du P
T u= = ⋅ = ' N T
ds du ds ∣P ∣
x

Normal vector N :
z B
Norm(u) '' ''
N (u)= with Norm(u)= P −( P ⋅T ) T
∣ Norm(u)∣ (It is not defined when Norm(u) = 0 !)

Binormal vector B :
B u=T u× N u
60
Computer Aided Design
Parametric representation
Frenet's frame and equations B s

d T  s

[ ]
T  s
ds = 0  s T s

2D
d N s [
− s 0

][ ]
N  s N  s
ds

d T  s


3D
[]ds
d N s
ds
d Bs
ds
[
0
= − s
0
 s
0
− s
0 T  s

][ ]
  s ⋅ N s
0 Bs
s

Works only with s : the curvilinear abscissa ! 61


Computer Aided Design
Parametric representation

Curvature k : |P ' × P ''|
dT
'
T u⋅N u
k=
| |
| |
ds
=
|P |'3

 u=
∣P ' u∣
Curvature vector

Torsion t: = N u u
d 2 T dT

 u=
'
N u⋅B u
=
 ds ds
2
, ,T
 =
 P ''' , P '' , P ' 
'
∣P u∣ 2 '
∣P × P ∣ '' 2

62
Computer Aided Design
Parametric representation

Parametric surfaces

63
Computer Aided Design
Parametric representation
A parametric surface is represented as :
u=cst
x= f u , v

{
P u , v = y=g u , v
z=hu , v
u,v

u,v are two real parameters


v=cst

All the points of the surface can be y z
obtained by varying u and v.
x

Again, the parametrization is not unique !

The interval of definition is limited (limits the
surface) 64
Computer Aided Design
Parametric representation
A curve can be defined on the surface
Parametric space « Ambient » space
u=cst
x= f u , v 
 uv
 t :
u=u t 
{
v=v t  {
P u , v : y= g u , v

z=hu , v
t
x= f u t  , v t 



{
 t : y=g u t  , v t 
z=hu t  , v t
The equations seen for parametric
y z
v=cst

curves are valid in this particular case. x

65
Computer Aided Design
Parametric representation
Regularity and continuity of the parametrization
 A parametric surface is of class Ck if the mapping
P(u,v) onto R3 is of class Ck.

A parametrization is regular if and only if (iff)
∂
P 
∂P
u 0 , v0 × 0 ∀ u 0 , v 0 ∈ D⊂ℝ 2
u 0 , v 0 ≠ 
∂u ∂v

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
66
Computer Aided Design
Parametric representation
Differential geometry for parametric surfaces
x u , v


Position P : P
 u , v= y u , v 
z u , v
Unit tangent vectors T u and T v :
[ ] P
u
 = ∂
∂u
P

P
 =uv∂ P

∂u∂v

2

−1 u −1 v
∂P ∂P P ∂P ∂P P
u
T u , v=
 ⋅
∂u ∂u ∣ ∣ = u
∣P ∣
v
T u , v =
 ⋅
∂v ∂v ∣ ∣ = v
∣P ∣

These vectors are, in general, not orthogonal !

Tangent plane (parametric form)
u v
Pt u

0 , v  a ,b= P u 0 , v 0 a⋅T u 0 , v 0 b⋅T u 0 , v 0 
0
  
or a , b∈ℝ
2

u v
Pt (u , v ) (a , b)= P (u 0 , v0 )+a⋅P (u 0 , v 0 )+b⋅P (u 0 , v0 )

0 0
⃗ ⃗ ⃗
67
Computer Aided Design
Parametric representation

Normal vector N :

Norm(u , v) u v u v
N (u , v)= with Norm(u , v)=T ×T or P ×P
|Norm(u , v)|
u=cst
Tv

Tu
u ,v
N

v=cst

68
Computer Aided Design
Parametric representation
dS

Area of a surface
A=∬ dS dv P v
Ω
u v u v
dS=∣du⋅P ×dv⋅P ∣=∣P ×P ∣dudv du P u

1st fundamental form



Other notation of the area of a surface
2 2
∣a ×b∣ =
a⋅a ⋅ b⋅b−a⋅b Lagrange's identity

dS =√(e g− f 2 )dudv with e= P u⋅P u , f =P u⋅P v , g= P v⋅P v


2
A=∬  eg− f dudv
D

69
Computer Aided Design
Parametric representation

Length of a curve on a surface
∂ P u , v u
x= f u , v  P =
P u , v : y= g u , v

z=hu , v { v
P =
∂u
∂ P u , v
∂v
x= f (u(t ) , v (t ))
⃗ uv
Γ (t ):
u=u(t ) ⃗
{
v=v (t ) {
Γ (t ): y= g (u(t ) , v (t ))
z=h(u(t) , v (t ))
'
Γ=
dP (u(t ) , v (t ))
dt

' ∂ P (u(t ) , v (t )) du ∂ P (u(t) , v (t )) dv


Γ= +
Derivative of the curve expressed
∂u dt ∂v dt
in the parametric space of the surface Derivative of the surface (in 3D)

' ' u ' v


 t =u t  P ut  , v t v t  P ut  , v t  70
Computer Aided Design
Parametric representation

b b 2
 t ∣dt=
L=∫∣
a
'

a
∣ t ∣ dt
'

' ' u ' v


 t =u t  P ut  , v t v t  P ut  , v t 

∣ ' t ∣2=e u' t 2 2 f u ' t v ' t  g v ' t 2


u u u v v v
with e= P ⋅P , f = P ⋅P , g= P ⋅P

71
Computer Aided Design
Parametric representation

If we set
ds= √ e u ' (t )2 + 2 f u ' (t ) v ' (t )+ g v ' (t )2 dt
that is equivalent to : ds= √ e du 2 + 2 f dudv+ g dv 2
s b

( we have L= ∫ ds=sb−sa )
s a 

, we get a quadratic form :


'
' 2 ' ' ' 2
e u t  2 f u t  v t  g v t  = u t  v t  
e
f
' '
  
f u t 
g v ' t 
b


'
L=∫
a
 u' t    
v ' t   e
f
f u t  dt
g v ' t 
72
Computer Aided Design
Parametric representation

Angle between two curves ...
'
Γ (t 1 )⋅Γ (t 2 )=∣Γ (t 1 )∣∣Γ (t 2 )∣cos α=( u (t 1) v (t 1) ) e f u (t 2 )
'
1
'
2
'
1
'
2
f
'
1
'
1 ( )( 2
g v (t 2 )
'
2
)
'
e f u 2 (t 2 )
u '
( 1 1 1 1) f
(t ) v '
(t ) ( )(
g v '2 (t 2 ) )
cos α=

√ '
1
'
(e
( u (t 1 ) v (t 1)) f
1
f
)( u 1' (t 1 )
g v 1 (t 1 )
' ( '
) '
u 2 (t 2 ) v 2 (t 2 ) ) e
f ( f
)( u '2 (t 2 )
g v '2 (t 2 ) )

73
Computer Aided Design
Parametric representation

The first fundamental form is the application :
e f du 2 du 2
uv
1
uv
j1 (d Γ , d Γ )= ( du 1 dv 1 )
2 ( f )( )
g dv 2
=( du 1 dv 1 ) M1
dv 2 ( )
with e=P u⋅P u , f = P u⋅P v , g=P v⋅P v

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 g ij , i , j=u , v ∂ x/∂ u ∂ x /∂ v
 M1 also is related to the Jacobian matrix
(
J = ∂ y /∂ u ∂ y /∂ v
of the transformation (u,v) → (x,y,z) (it is JTJ ).
∂ z /∂ u ∂ z /∂ v )
b
uv uv j(d Γ uv
1 , d Γ uv
2 )
L=∫ √ j(d Γ , d Γ ) dt cos α= uv uv uv uv
a √ j(d Γ 1 , d Γ1 )j(d Γ 2 , d Γ 2 )

A=∬ √ det M 1 dudv =∬ det J dudv under some conditions


D ( D ) 74
Computer Aided Design
Parametric representation

Curvatures...

Geodesic curvature
or relative curvature
w/r to the surface :
kg

Simple or total curvature


of the 3D curve : k
Normal curvature :
kn

75
Computer Aided Design
Parametric representation

Curvature vectors N
dT
k= =k⋅n=k n + k g (e.g. from Frenet's
ds relations) P(u,v)
k n =k n⋅N k g =k g⋅G T
G =N ×T
kn
n

Necessarily, we do
have : N⋅T =0

Differentiating yields : kg
k
dT dN
⋅N +T⋅ =0
ds ds
dT ds=
dT dN
kn=
ds
⋅N =−T⋅
ds (
kg=
ds )(
⋅G √ e du 2 +2 f dudv + g dv 2 )
d P (u , v) d N d P⋅d N l du2 +2 m dudv +n dv 2
=− ⋅ =− = Center o
ds ds ds
2 2
e du + 2 f dudv+ g dv
2
with curvatur
dP d N 1 dP d N dP d N dP d N
l=− ⋅ m=− ( ⋅ + ⋅ ) n=− ⋅
du du 2 du dv dv du dv dv 76
Computer Aided Design
Parametric representation

dP d N 1 dP d N dP d N dP d N
l=− ⋅ m=− ( ⋅ + ⋅ ) n=− ⋅
du du 2 du dv dv du dv dv

This can be rewritten by noting that
dP and dP
⋅N =0 ⋅N =0
du dv
, and integrating by parts UV =∫ U dV +∫ V dU

where e.g. for l : U = dP dN


dV = ⋅du
du du

d2 P d2 P d2 P
l= 2 ⋅N m= ⋅N n= 2 ⋅N
du du dv dv

77
Computer Aided Design
Parametric representation
Curvatures and the second fundamental form

The second fundamental form is the application
l m du 2 du2
uv uv
j2 (d Γ , d Γ )= ( du1 dv 1 )
1 2 ( )( )
m n dv 2
=( du 1 dv 1 ) M 2
dv 2 ( )
uu vv uv
with l= N⋅P , n=N⋅P , m= N⋅P

Normal curvature of a curve on a surface :
uv uv
uv
j2 (d Γ , d Γ ) uv
j2 (d Γ , d Γ )
kn= kn= uv uv
ds
2
j1 (d Γ , d Γ )

Geodesic curvature (curvature in the tangent plane)

Measures the deviation of the curve in comparison with a
geodesic
78
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
k=k n + k g k n =k n⋅N k=k⋅n k g =k g⋅( N ×T )=k g⋅G
k 2 =k 2n + k 2g
The geodesic curvature is therefore readily obtained from
the others (except for the sign, which is same as d T ⋅G )
2 2 2 du
k g =k −k n
79
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 R
Curvature 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 !!!)
80
Computer Aided Design
Parametric representation
uv uv
j 2 (d Γ , d Γ )

Curvatures of the surface k n=
j1 (d Γ uv , d Γ uv )
 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
kmin then a maximum kmax 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.

81
Computer Aided Design
Parametric representation

Shape operator
W p (w )=−∇ w⋅N w=w u⋅P u +w v⋅P v

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. ∇ w is a
directional derivative along a unit vector w (in the surface) :
∂ +w ∂
it is equal to w u v .
∂u ∂v
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 :
u ∂P v ∂P P u× P v
P = P = N = N (u , v )= u
∂u ∂v v v ‖ P × P v

u
P P −( P ⋅t 1 )t 1
t 1= u t 2 =N ×t 1=
‖P ‖ ‖P v −( P v⋅t 1 )t 1‖ 82
Computer Aided Design
Parametric representation

It is easy to show that one can switch from one
basis to the other using coefficients of the 1 st
fundamental form …
Pu Pu eP −f P
v u v
eP −f P
u
t 1= u = t 2= =
‖P ‖ √ e √ e √ eg − f 2
√e √ h
t1 1 √h 0 Pu
[] =
[
t 2 √ e √h − f ][ ]
e Pv

One can also switch the other way back, working on
coefficients rather than on vectors e.g. for any
vector w u
⃗ =w 1 t 1 +w 2 t 2 =w u P + w v P
v

wu = 1 w 1 =Φ w 1
One gets
[ ]
wv √e √ h 0 [
√h − f
e ][ ] [ ]
w2 w2
83
Computer Aided Design
Parametric representation

Now back to the shape operator : we will start with
a vector expressed in the orthonormal frame
(w1,w2) , convert it to the parametric basis (wu,wv),
take the directional derivative w u ∂ +w v ∂ of the
∂u ∂v
normal n and then project back to the orthonormal
frame.
W p (w )=− t 1 [ nu nv ]Φ w 1
[] [ ]
t2 w2
u
P w1
=−Φ
P [ ] [ ]
T
v
[n u n v ]Φ
w2
u
P

Here, [ ]
− v [n u nv ]is precisely the matrix of the
P
coefficients of the second fundamental form...
84
Computer Aided Design
Parametric representation

In the orthonormal basis
1 √h
W p (w)=ΦT l m Φ w 1 = 0 l m √ h − f w1
[ ][ ] [
m n w2 e h − f ][ ] [
e m n 0 e ][ ]
w2

1 hl (e m− f l) √ h
=
[
eh (e m− f l ) √ h 2 2
][ ]
w1
f l +e n−2 e f m w 2


In the original basis
T l m
W p (w)=Φ W p (w)Φ wu =Φ(Φ Φ)Φ w u
~ −1

wv [ ] m n
−1
[ ] [ ]
wv
−1
1 g − f l m wu
=Φ ΦT l m w u = = e f ⋅l m w
[ ][ ] [
m n wv h − f e m n wv ] [ ][ ] [ g ] [ m n ] [ w ]
f
u

(Weingarten Equation)
85
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)
du 0 ~
( L−k I ) ( )()
dv
=
0
−1
with L= M 1 M 2 =W p (w ) det (L−k I )=0

Or the orthonormal frame, for which the matrix is
symmetric and the 2D eigenvectors are orthogonal

dt 1 0
(W p (w)−k I )
( )()
dt 2
=
0
det (W p (w)−k I )=0
86
Computer Aided Design
Parametric representation

du 0 l −k e m−k f du 0
( M 2−k M 1 )
dv ( )()
=
0 ( m−k f n−k g )( ) ( )
dv
=
0

The eigenvectors are obtained using any of the relations:

du l−k e du m−k f
( )(

dv m−k f
=0 ) ( ) (
dv
=α⋅
k e−l ) , α>0: du2 +dv 2=1


Just use the other relation if the basis contains a null
vector for one of the values of k :

du m−k f du l−k g
( )(

dv l−k g
=0 ) ( ) (
dv
=α⋅
k f −m ) , α>0: du +dv =1
2 2

87
Computer Aided Design
Parametric representation

Example u
 
P u , v= v
cos u

1 0
u
P u , v= 0
 
−sin u
v


P u , v= 1
0

0 0
uu
P u , v= 0
 
−cos u
uv


P u , v= 0
0
0 P u ×P v −sin u
vv
P u , v = 0
0  N (u , v)= u
∣P ×P ∣ ( )
v
= 0 ⋅
1
1
2
√ 1+sin u 88
Computer Aided Design
Parametric representation

du 0
( L−k I ) ( )()
dv
=
0
−1
with L= M 1 M 2

u u u v 2


P ⋅P
M 1= u v
P ⋅P
P ⋅P
P v⋅P v
=
1sin u 0
0 1 
−cos u

( )
uu uv
N⋅P N⋅P 0
M2= (
N⋅P uv N⋅P vv )
= √ 1+sin 2 u
0 0

89
Computer Aided Design
Parametric representation

Numerical application : u=0 and v=0

2
M 1=  1sin u 0
0 1
=
1 0
0 1   c2

1 0 c1
−1
M =
1  
0 1
o
−cos u
M2=
( √ 1+sin
0
2
u
0

0
)(
=
−1 0
0 0 )
c 1= 1
L=M −1
1 M 2 = −1 0
 
 1=−1
 0 C 3D
1 =( P u , P v ()
)⋅ 1
0
0 0
c 2= 0
 2 =0
1 C 3D
2 =( P u , P v ()
)⋅ 0
1 90
Computer Aided Design
Parametric representation
Umbilical points
 Points whose normal curvature kn 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 M1 and M2 :

l m n
= = if f ≠0
e f g l
k n = =kmin =kmax = const.
e
l n Principal directions are arbitrary.
= if f =0 and m=0
e g
91
Computer Aided Design
Parametric representation

Gaussian curvature and average curvature

Invariants (do not depend on the parametrization)
det ( M 2 ) l n−m2
kT =k min k max =det ( L)= =
det ( M 1 ) e g− f 2

 min  max 1 1 e n g l−2 f m


M = = trace L=
2 2 2 e g− f
2

 L=M −1
1 M 2

92
Computer Aided Design
Parametric representation
Local nature of the surface
 kT>0 the surface is locally an ellipsoid – elliptic point
 kT<0 : hyperbolic paraboloid – saddle point –
hyperbolic point
 kT=0 and kM<>0 : parabolic cylinder – parabolic
point
 kT=0 and kM=0 : no information – locally plane

93
Computer Aided Design
Christoffel symbols

Complete developments. Christoffel symbols

Expression of the first derivatives along a
curve...
∂ P (u , v) u' = du(t )
P u= dt
∂u
∂ P (u , v) ' dv (t )
P v= v=
∂v dt
Γ' (t )=u ' P u +v ' P v

Lets differentiate that expression again...

94
Computer Aided Design
Christoffel symbols
 (Γ ' (t)=u ' P u +v ' P v )'

Γ" (t )=u " P u +u ' (u ' P uu +v ' P uv )+v " P v +v ' (u ' P vu +v ' P vv )
2 2
=u " P u +v " P v +u ' P uu +u ' v ' P uv +u ' v ' P vu +v ' P vv

The terms u " P u +v " P v are in the tangent plane

The terms P ij , i , j={u , v } can be expressed as
linear combinations of tangential and normal
components :
u v
Gauss formula
P ij =C P u +C P v + Lij N
ij ij

The C are the Christoffel symbols (often


k
ij
written Γij in textbooks ) and the Lij are the
k

coefficients of the second fundamental form. 95


Computer Aided Design
Christoffel symbols

Using Einstein's notation (summation over
k
repeated indices ): P ij =C ij P k + Lij N , i , j , k =u , v

How to compute C and Lij ? k
ij

Multiply by P l , l=u , v
0
k
P ij⋅P l =C P k⋅P l + Lij N⋅P l
ij

Coefficients of the 1st


fundamental form = g kl = metric tensor
−1 k
P ij⋅P l⋅( g kl ) =C ij g kl⋅g kl
−1 Conventional
notation of the
k
inverse of the
−1 k lk
C = P ij⋅P l⋅( g kl )
ij C = P ij⋅P l⋅g
ij metric tensor
96
Computer Aided Design
Christoffel symbols
k
P ij =C P k + L ij N
ij

Now, multiply by N
k
P ij⋅N =C ij P k⋅N + L ij N⋅N
1
0

Lij =P ij⋅N


One recovers the formula seen before:
N⋅P uu N⋅P uv
Lij ≡M 2 M2= (
N⋅P uv N⋅P vv )
97
Computer Aided Design
Christoffel symbols

Use of Christoffel symbols and the second
fundamental form

Let us return to the expression
2 2
Γ" (t )=u " P u +v " P v +u ' P uu +u ' v ' P uv +u ' v ' P vu +v ' P vv

Now replace u , v by ui ,i=1,2 and use the Einstein
notation again :
i " i ' j '
Γ" (t )=(u ) P i +(u ) ⋅(u ) P ij

Now substitute P ij =C ijk P k + L ij N
k " k i ' j ' i ' j '
Γ" (t )=((u ) +C (u ) ⋅(u ) ) P k +(u ) ⋅(u ) Lij N
ij

Total tangential component Normal component 98


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
i ' j '
(u ) ⋅(u ) L ij N
If we have an arc-length parametrization :
i ' j ' uv uv
k n=Γ"⋅N =L ij (u ) (u ) ( =j2 (d Γ , d Γ ))
if not : need to adjust
i ' j ' i ' j '
Lij (u ) (u ) L ij (u ) (u )
k n= 2
= k ' l '
ds g kl (u ) (u ) uv uv
j 2 (d Γ , d Γ )

One recovers the formula : k N = uv uv
j1 (d Γ , d Γ ) 99
Computer Aided Design
Christoffel symbols

Geodesic curvature : based on the tangential
components
k " k i ' j '
((u ) +C (u ) ⋅(u ) ) P k
ij


If the curve is parametrized by arc-length :
=0
Γ '⋅Γ ' =1 Γ '⋅Γ "=0
k " k i ' j ' i ' j '
Γ"⋅Γ ' =0=((u ) +C (u ) ⋅(u ) ) P k⋅Γ ' +(u ) ⋅(u ) Lij N⋅Γ '
ij


Therefore, the tangential component Γt " of Γ" is
orthogonal to Γ ' and to N as well. There is a
proportionality factor between Γt " and N ×Γ ' .
This factor is the geodesic curvature
100
Computer Aided Design
Christoffel symbols

Γt "=k g ( N ×Γ ' ) Γt "⋅( N ×Γ ' )=k g ( N ×Γ ' )⋅( N ×Γ ' )
k g =( N ×Γ ' )⋅Γt " =( N ×Γ' )⋅Γ "
Therefore, k g =[ N , Γ' , Γ" ] , valid only if the
parametrization of Γ is normal (arc-length)

If not, need to adjust ...
[ N , Γ ' , Γ" ] [N ,Γ' ,Γ"]
kg= 3
= l ' 3/2
ds k '
( g kl (u ) (u ) )

Some developments* leads to the following identity :
2 3 1 3 2 1 2 1 2 2
√ det ( M 1)[−C 11 u ' +C 22 v ' −(2 C 12−C 11)u ' v ' +(2 C 12 −C 22 )u ' v ' +u " v '−v " u ' ]
kg = 3/ 2
u'
(( u' ( ))
v ' ) M1
v'
Again, this expression makes only use of derivatives
in the parametric space... *Surfaces
see e.g.“Modern Differential Geometry of Curves and
with Mathematica”, 2nd ed. Boca Raton, FL: CRC 101
Press, pp. 501-518, 1997.
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.

102
Computer Aided Design
Parametric representation
Darboux frame and equations
x= f (u , v) x s= f u s , v s
P
{
⃗ (u , v): y=g (u , v)
z=h(u , v)
 uv s: u=u s
 {
v=v s

{
  s: y s= g u s , v s
z s=hu s , v s

 s= ∂ x s , ∂ y  s , ∂ z  s
 s 
G
  s
N  s
T
Darboux frame
T {∂s ∂s ∂s }
  s

 s= N
N  u s , v s

⃗ ( s)= N
G ⃗ ×T


Su , v

s is the curvilinear abscissa


103
Computer Aided Design
Parametric representation
Darboux frame and equations

 s
G Darboux frame
  s
N  s
T

  s

d T s

[]ds
d G s
ds
d N  s
ds
[−
0
= − g  s
n  s
 g  s  n s T s

 g
0
s 0 ][ ]
− g s ⋅ G s
N  s

Su , v

Geodesic torsion (or relative torsion)


104
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

105
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)

106
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)

107
Computer Aided Design
Parametric representation
Some results of differential geometry
Gauss-Bonnet's theorem
∫ kT dA+∫ k g ds=2 π χ (S )
S ∂S

 S  is Euler's
characteristic
of surface S

=−2
=0 108
=2 =1 =−4
Computer Aided Design
Parametric representation
Application of Gauss-Bonnet's theorem

For a polyhedron, we have (Euler's formula) :
 S = N − E F
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
 S = N −E F =5P6H/3−5P6H/ 2P H =P /6

The sphere is compact and its gaussian curvature is 1/R2
1
∫ T dA∫ G ds= R2 ∫ dA=4 =2  S 
S ∂S S
so P=12 … 12 pentagons are necessary and as many hexagons
as we want to make soccer ball.
109
Computer Aided Design
Parametric representation

110
Computer Aided Design

Explicit curves and surfaces

111
Computer Aided Design
Explicit forms


Curve as a function
y= f  x z= f  x , y


We can swap x, y and z according to needs

y y y

y= f  x x= f  y 
OK ! x OK ! x KO ! x
112
Computer Aided Design
Explicit forms


Polar coordinates

Sometimes used. Circle is readily represented :

r =1

113
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 :
2 2
y=  1− x y=− 1− x
and

114
Computer Aided Design

Implicit representation

115
Computer Aided Design
Implicit forms

f  x , y=0
2 2

Ex. Unit circle : x  y −1=0

Infinity of representations of a
given curve f =0

Invariance by the multiplication by a constant
k⋅f  x , y=0 ⇔ f  x , y=0 ∀ k ≠0

We can take absolute value too
∣ f  x , y∣=0 ⇔ f  x , y=0
... but the form is then not differentiable

etc...
116
Computer Aided Design
Implicit forms
Advantages of an implicit form
For a point P [ x p , y p ] we know :

If it is on the curve : f  x p , y p =0

If it is not on the curve : f  x p , y p ≠0

In some cases, we may know if it is inside or
outside the volume delimited by the curve:
f ( x p , y p )<0 or f ( x p , y p )>0
2 2
If x  y −10 , P is inside the circle
p p


But : ∣x 2p y 2p−1∣0 has no meaning

Multiplication by negative k : interior exterior
117
Computer Aided Design
Implicit forms
Normal forms / Contour line / level sets

Particular case of implicit forms such that :
  x , y =d , d is the signed distance to the curve

In this case, for a point P [ x p , y p ] ,   x p , y p 
is the distance from the point to the curve. d<0 means
usually that the point is inside.
2 2

Case of the unit circle :   x , y=  x  y −1
is the distance to the circle.

Unique representation !
(except the sign of the distance 0
function – but it indicates 0
where is the interior)
=0 118
Computer Aided Design
Implicit forms
Normal forms

A normal form is a distance function, we have :
∣∇   x , y∣=1

For the circle :

∂ 2x

∣ ∣∣ ∣
∂x

∂y

∂z

2
2x y 2
x
2
∣∇ ∣= = 2 y = 2 2  2 2 =1

2
∂ 2x y
0
2
x y
y

x y
2

119
Computer Aided Design
Implicit forms
Normal forms

Ellipse ?

We can « flatten » a circle :   x * , y * =  x *2  y *2 −1
* *
Set y =2 y ; x = x
2 2
  x , y=  x 2 y  −1
x

∣ ∣
2
x 4 y
2
2
x 16 y
∣∇ e∣= 4y = x 24 y 2 ≠1

2
 x 4 y
0
2 
2
0

=0
0

120
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: j=0 on Γ

The normal form is reconstructed in the considered
domain by solving the « Eikonal » equation (from greek
« image »):
|⃗
∇ j|=1 in Ω
{ j=0 on Γ
 ext

 int

121
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. Setian
122
Computer Aided Design
Implicit forms

Resolution algorithm at first order on a regular
grid

J.A. Setian
Known value in a point = 0 a) Calculation of test points

123
Computer Aided Design
Implicit forms

First order resolution algorithm on a regular grid

J.A. Setian
b) Among test points, we c) We fix it and (re)calculate
choose the one of lowest new test points
value 124
Computer Aided Design
Implicit forms

Resolution algorithm at first order on a regular
grid

J.A. Setian
b) Among test points, we c) We fix it and we recalculate...
choose the one of lowest Here a test point has been computed
value twice : we keep the lowest value 125
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.

126
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

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 : iso-distance curves

128
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)

129
Computer Aided Design
Implicit forms

Transport equation of a level-set
∂j
n =0
+V n⋅∇ j⋅⃗
∂t

We solve that using explicit time-stepping

Normal speed is given (known)

Below, the speed is depending on the density ...

N. Paragios
130
Computer Aided Design
Implicit forms

Example of geometries based on « level-sets »

131
Computer Aided Design
Implicit forms

Example of geometries based on « level-sets »

M.Y. Wang
132
Computer Aided Design
Implicit forms

Some words on differential geometry...

133
Computer Aided Design
Implicit forms
∂  x , y , z

[ ]
Normal (ext.) to the curve / surface
∂x

We use the gradient 
∇ = ∂  x , y , z
 is equal to 1 if j is ∂y
 ∇
N = a signed distance ⋮
∣
∇ ∣
( a normal form )
Tangent vector for a planar implicit curve

Use of a permutation
∂  x , y , z 
of the gradient


T =
Tan 
∣
∇ ∣

Tan =

[ ∂ y
∂x , y , z
∂x
]
134
Computer Aided Design
Implicit forms
Curvature of a planar implicit curve

Use of the Hessian matrix =0
∂2  ∂2 

T
[∂ x2
H = 2
∂ 
∂ y∂x
∂x∂ y
∂2 
∂y 2 ] Osculating
circle

Ro
T  ∗H ∗
T  1
=− = Basis vector (along z)

∣∇ ∣ Ro
Alternative
notation =−
  T
Tan  ⋅n
Tan  ∗∇ Tan  × 3
 3
∣Tan ∣
135
Computer Aided Design
Implicit forms
Demonstration of the equation of the curvature
d T s
From Frenet equations :
[ ]

ds 0   s T  s
d N  s d N  s
=
[−  s 0 ][ ]

N  s
we have : =− ⋅T s ds
ds

∂ N  s dx ∂ N s dy
and so : =− 
∂ x ds

∂ y ds
⋅T  s 
∂ Nx ∂Ny dx

now, ∇ N=
[ ] []
∂x
∂ Nx
∂y

T
∂x
∂Ny
∂y
T s =
ds
dy
ds

=−T  s ∗∇ N s∗T s


136
Computer Aided Design
Implicit forms

We have :
∇  ∣∇ ∣ ∇  ∇   −∇ ∣∇ ∣ ∇ 
∇ N =∇
 
∣∇ ∣
=
∣∇ ∣
2

∇  ∇   =H  ∇ ⋅T =∣∇ ∣⋅N⋅T =0

T
T T ∗H ∗T 
=−T  s ∗∇ N  s∗T s=−
∣∇ ∣
Quod Erat Demonstrandum, QED

137
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) :
2  min  max
 min , max = M ±   − T
M M =  T = min  max
2
Along principal directions T1 and T2 , curvatures are
extrema ( kmin or kmax )
138
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...

143
Computer Aided Design
Implicit forms
Numerical expression of the curvatures

Conjugate transpose Hessian matrix (matrix of the
cofactors) :
∂2  ∂2  ∂2 

H =

[
∂ x2
∂2 
∂ y∂x
∂2 
∂z∂x
∂x∂ y
∂2 
∂ y2
∂2 
∂z∂ y
∂x∂z
2
∂ 
∂ y∂z
2
∂ 
∂ z2
] [
 , xx  , xy  , xz
=  , yx  , yy  , yz
 , zx  , zy  , zz ]
 , yy  , zz − , zy  , yz  , yz  , zx − , yx  , zz  , yx  , zy − , yy  , zx
*

[
H  =  , xz  , zy − , xy  , zz  xx  , zz − , xz  , zx  , xy  , zx − , xx  , zy
 , xy  , yz − , xz  , yy  , yx  , xz − , xx  , yz  , xx  , yy − , xy  , yx
144
]
Computer Aided Design
Implicit forms
Expression of curvatures of an implicit surface
 T *
∇  ∗H ∗∇
T = 4
∣
∇ ∣
2
 T
∇ −∣
∇  ∗H ∗ ∇ ∣ ⋅traceH 
M = 3
2∣
∇ ∣

145
Computer Aided Design
Implicit forms

Implicit curves in 3D

146
Computer Aided Design
Implicit forms
Curve in 3D

Intersection of two implicit surfaces
{  x , y , z =0 } ∩ {   x , y , z =0 }

N
T
B

147
Computer Aided Design
Implicit forms
Tangent
Tan  ,  =∇   x , y , z ×∇   x , y , z 
Tan  ,  =1 if we deal with two normal forms that
T  , = are “orthogonal”
∣Tan  , ∣
Curvature

For planar curves : =−
 T
Tan  ⋅n
 Tan  ∗∇ Tan ×

3
3
∣
Tan ∣

By substituting ... (we must take the norm , because
that vector is not along n3 anymore)

=
∣
 Tan ,  T∗∇ Tan  ,  ×
Tan  ,  ∣
∣Tan  , ∣3

148
Computer Aided Design
Implicit forms
Torsion

The formulas are obtained from the definition of the
torsion for the parametric curves

We set :
*
T =Tan  ,  =∇   x , y , z ×∇   x , y , z 
** * *
T =T ∗∇ T
*** * * *T * * *
T =T ∗∇  ∇ T ∗T T ∗∇ T ∗∇ T
 T * ,T ** ,T *** 
=
* ** 2
∣T ×T ∣

Note : the curvature, written with the same kind of
notation, is : ∣T *×T **∣
=
*3
∣T ∣ 149
Computer Aided Design
Implicit forms
Volume operations on contour lines (level-sets)

We can represent a volume as the set of points
such as

≤0


Manipulations of volumes

Union, intersection, etc...

150
Computer Aided Design
Implicit forms
Compounds of level-sets
Union  u = 1∪ 2

u  x , y=min [1  x , y , 2  x , y]



Intersection  i = 1∩ 2
i  x , y=max[ 1  x , y , 2  x , y]

Complement  c =
c  x , y =−  x , y 
d =1 ∖  2 = 1∩ 2

Difference
d  x , y=max[1  x , y ,− 2  x , y]
151
Computer Aided Design
Implicit forms

Disc 
Square
2 2
 d  x , y=  x  y −1 
4 half planes !

c
  1  x , y= y
1
 2  x , y =− y2


3  x , y=− x0.2

2 
4  x , y = x−1.8
3 4
Region of interest
152
Computer Aided Design
Implicit forms

2 2

Use of intersections for
d  x , y=  x  y −1 the square :
 sq= 1∩ 2∩ 3∩ 4
c  sq  x , y=max[1,  2,  3,  4 ]
1

Finally, difference
between  sq and d
 f = sq ∖ d
2  f  x , y=max[ sq ,− d ]
3 4  f  x , y=max[ 1,  2,  3,  4,− d ]
Region of interest
153
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

154

S-ar putea să vă placă și