Mathématiques - Informatique
Ecole Jeunes Chercheurs GDR IM
Géométrie Numérique
Partie I: Transport Optimal (Lundi) B. Lévy
Partie II: Résolution de systèmes linéaires (Jeudi) N. Ray
Bruno Lévy
ALICE Géométrie & Lumière
CENTRE INRIA Nancy Grand-Est
Computer Graphics International 2018 – Bintan – June 11-14
Bruno Lévy - Simulating fluids with the “path bundle” method
Part. 1. Introduction
Part. 2. Physics
Part. 3. Fluids
Part. 4. Fluids on computers
Part. 5. To infinity and beyond…
OVERVIEW
EMETTEUR - NOM DE LA PRESENTATION
Introduction
00 MOIS 2011 - 3
1
1982
1982
Vol de rêve (Dream Flight)
Produced by Philippe Bergeron, Nadia Magnenat Thalmann, Daniel Thalmann.
Telling stories with computer graphics …
1987
Rendez-vous à Montréal
Directed by Nadia Magnenat Thalmann, Daniel Thalmann.
Telling stories with computer graphics …
1982
Vol de rêve (Dream Flight)
Produced by Philippe Bergeron, Nadia Magnenat Thalmann, Daniel Thalmann.
Telling stories with computer graphics …
1982
Vol de rêve (Dream Flight)
Produced by Philippe Bergeron, Nadia Magnenat Thalmann, Daniel Thalmann.
Telling stories with computer graphics …
Emotions, character animation
1982
Vol de rêve (Dream Flight)
Produced by Philippe Bergeron, Nadia Magnenat Thalmann, Daniel Thalmann.
Telling stories with computer graphics …
Emotions, character animation
Physics
How can we simulate physics in a computer ?
2018Telling stories with computer graphics …
Physics
2
Telling stories…
Telling stories…
Tales of matter, energy, time, light, …
Which “language” to tell these stories ?
Telling stories…
Tales of matter, energy, time, light, …
1960
The connection machine – D. Hillis
R. Feynman,
Playing bongos
1980
Isaac Newton
1623-1727
1687
Principia Mathematica
A mathematical language
to talk about physics
Differential calculus
Newton’s principles
(1) Inertia
(2) Fundamental principle
(3) Reciprocal action
1687
Isaac Newton
1623-1727
1687
Principia Mathematica
A mathematical language
to talk about physics
Differential calculus
Newton’s principles
(1) Inertia
(2) Fundamental principle
(3) Reciprocal action
x position
1687
Isaac Newton
1623-1727
1687
Principia Mathematica
A mathematical language
to talk about physics
Differential calculus
Newton’s principles
(1) Inertia
(2) Fundamental principle
(3) Reciprocal action
x position
x speed
1687
Isaac Newton
1623-1727
1687
Principia Mathematica
A mathematical language
to talk about physics
Differential calculus
Newton’s principles
(1) Inertia
(2) Fundamental principle
(3) Reciprocal action
x position
x speed
x acceleration
1687
Isaac Newton
1623-1727
1687
Principia Mathematica
A mathematical language
to talk about physics
Differential calculus
Newton’s principles
(1) Inertia
(2) Fundamental principle
(3) Reciprocal action
x position
x speed
x acceleration
F = m x
(2) Fundamental principle of dynamics
Change of speed (acceleration) is proportional to force
Force
Mass
1687
Gravity
F = m g = m x
9.81 m / s / s
x = g
Gravity
F = m g = m x
9.81 m / s / s
x = g
Gravity
F = m g = m x
9.81 m / s / s
x = g
Gravity
F = m g = m x
9.81 m / s / s
x = g
Gravity
F = m g = m x
9.81 m / s / s
x = g
Gravity
F = m g = m x
9.81 m / s / s
x = g
Gravity
F = m g = m x
9.81 m / s / s
x = g
Gravity
F = m g = m x
9.81 m / s / s
x = g
Gravity
F = m g = m x
9.81 m / s / s
x = g
Gravity
F = m g = m x
9.81 m / s / s
x = g
Gravity
F = m g = m x
9.81 m / s / s
x = g
Gravity
F = m g = m x
9.81 m / s / s
x = g
Gravity
F = m g = m x
9.81 m / s / s
x = g
Gravity
F = m g = m x
9.81 m / s / s
x = g
Gravity
F = m g = m x
9.81 m / s / s
x = g
Gravity
F = m g = m x
9.81 m / s / s
x = g
Gravity
F = m g = m x
9.81 m / s / s
x = g
Gravity
F = m g = m x
9.81 m / s / s
x = g
Gravity
F = m g = m x
9.81 m / s / s
x = g
Gravity
F = m g = m x
9.81 m / s / s
x = g
Gravity
F = m g = m x
9.81 m / s / s
x = g
Gravity
F = m g = m x
9.81 m / s / s
x = g
Gravity
F = m g = m x
9.81 m / s / s
x = g
Gravity
F = m g = m x
9.81 m / s / s
x = g
Gravity
F = m g = m x
9.81 m / s / s
x = g
Gravity
F = m g = m x
9.81 m / s / s
x = gHow to simulate this behavior
on a computer ?
Each second
subtract 9.81 m/s from
the vertical component of speed
move the point along the speed
Gravity
F = m g = m x
9.81 m / s / s
x = g
We do computation with a certain precision
Gravity
F = m g = m x
9.81 m / s / s
x = g
We do computation with a certain precision
One can increase this precision
Gravity
F = m g = m x
9.81 m / s / s
x = g
We do computation with a certain precision
One can increase this precision
Is it possible to invent a langage to talk about
what would happen with infinite precision ?
Gravity
F = m g = m x
9.81 m / s / s
x = g
Is it possible to invent a langage to talk about
what would happen with infinite precision ?
Derivatives f’(x)
df(t)
dt
df(x)
dx
Gravity
F = m g = m x
9.81 m / s / s
x = g
Is it possible to invent a langage to talk about
what would happen with infinite precision ?
Derivatives f’(x)
df(t)
dt
df(x)
dx
Variation of something
w.r.t time
Gravity
F = m g = m x
9.81 m / s / s
x = g
Is it possible to invent a langage to talk about
what would happen with infinite precision ?
Derivatives f’(x)
df(t)
dt
df(x)
dx
Variation of something
w.r.t time
Variation of something
w.r.t. space
Gravity
F = m g = m x
9.81 m / s / s
x = g
Is it possible to invent a langage to talk about
what would happen with infinite precision ?
Derivatives – differential calculus
“Ghosts of vanished quantities”
Newton et Leibniz
Derivatives f’(x)
df(t)
dt
df(x)
dx
Variation of something
w.r.t time
Variation of something
w.r.t. space
Gravity
F = m g = m x
9.81 m / s / s
x = g
Let’s program it !
Fluids
Newton and Euler
3
Fluids
Fluids“Lagrange” point of view
Fluids“Lagrange” point of view
Let’s program it !
Fluids“Lagrange” point of view
ρ “nb particles per square”
“Euler” point of view
1757
Fluids“Lagrange” point of view
ρ(x,y,t) “nb particles per square”
“Euler” point of view
v(x,y,t) speed of the particle under
“grid point” (x,y) at time t
1757
Fluids
ρ(x,y,t) “nb particles per square”
“Euler” point of view
v(x,y,t) speed of the particle under
“grid point” (x,y) at time t
Q1: how to compute the
acceleration of the particles
from v(x,y,t) ?
1757
Fluids
ρ(x,y,t) “nb particles per square”
“Euler” point of view
v(x,y,t) speed of the particle under
“grid point” (x,y) at time t
Q1: how to compute the
acceleration of the particles
from v(x,y,t) ?
dv
dt
∂v ∂v dx ∂v dy
∂t ∂x dt ∂y dt
= + +
1757
Fluids
ρ(x,y,t) “nb particles per square”
“Euler” point of view
v(x,y,t) speed of the particle under
“grid point” (x,y) at time t
Q1: how to compute the
acceleration of the particles
from v(x,y,t) ?
dv
dt
∂v ∂v dx ∂v dy
∂t ∂x dt ∂y dt
= + +
∂v ∂v vx ∂v vy
∂t ∂x ∂y
= + +
1757
Fluids
ρ(x,y,t) “nb particles per square”
“Euler” point of view
v(x,y,t) speed of the particle under
“grid point” (x,y) at time t
Q1: how to compute the
acceleration of the particles
from v(x,y,t) ?
dv
dt
∂v ∂v dx ∂v dy
∂t ∂x dt ∂y dt
= + +
∂v ∂v vx ∂v vy
∂t ∂x ∂y
= + +
∂v v. v
∂t
= +
1757
Fluids
ρ(x,y,t) “nb particles per square”
“Euler” point of view
v(x,y,t) speed of the particle under
“grid point” (x,y) at time t
Q1: how to compute the
acceleration of the particles
from v(x,y,t) ?
dv
dt
=
∂v v. v
∂t
+
Q2: incompressible fluids ?
1757
Fluids
ρ(x,y,t) “nb particles per square”
“Euler” point of view
v(x,y,t) speed of the particle under
“grid point” (x,y) at time t
Q1: how to compute the
acceleration of the particles
from v(x,y,t) ?
dv
dt
=
∂v v. v
∂t
+
Q2: incompressible fluids ?
1757
Fluids
ρ(x,y,t) “nb particles per square”
“Euler” point of view
v(x,y,t) speed of the particle under
“grid point” (x,y) at time t
Q1: how to compute the
acceleration of the particles
from v(x,y,t) ?
dv
dt
=
∂v v. v
∂t
+
Q2: incompressible fluids ?
what goes in =
what goes out
1757
Fluids
ρ(x,y,t) “nb particles per square”
“Euler” point of view
v(x,y,t) speed of the particle under
“grid point” (x,y) at time t
Q1: how to compute the
acceleration of the particles
from v(x,y,t) ?
dv
dt
=
∂v v. v
∂t
+
Q2: incompressible fluids ?
what goes in =
what goes out
div(v) = 0
1757
Fluids
ρ(x,y,t) “nb particles per square”
“Euler” point of view
v(x,y,t) speed of the particle under
“grid point” (x,y) at time t
Q1: how to compute the
acceleration of the particles
from v(x,y,t) ?
dv
dt
=
∂v v. v
∂t
+
Q2: incompressible fluids ?
div(v) = 0
Q3: mass conservation ?
1757
Fluids
ρ(x,y,t) “nb particles per square”
“Euler” point of view
v(x,y,t) speed of the particle under
“grid point” (x,y) at time t
Q1: how to compute the
acceleration of the particles
from v(x,y,t) ?
dv
dt
Q2: incompressible fluids ?
div(v) = 0
Q3: mass conservation ?
d ρ
dt = - div(ρv)
(Continuity equation)
1757
=
∂v v. v
∂t
+
Fluids
Newton 2nd law (F = ma)
Incompressibility
Initial condition
Incompressible Euler fluid
1757
Fluids
Newton 2nd law (F = ma)
Incompressibility
Initial condition
Incompressible Euler fluid
1757
Q: How to program incompressibility ?
Fluids on the computer
4
From Euler to Brenier
Fluid element
Fluid element
Parameters
Fluid element
Parameters
Q1: can we find a parameterization such that
each fluid element has constant volume ?
Fluid element
Parameters
Q1: can we find a parameterization such that
each fluid element has constant volume ?
Q2: can we compute the time evolution of the
parameters that mimics the physics ?
Voronoi diagram: Vor(xi) = { x | d2(x,xi) < d2(x,xj) }
Fluids on the computer: power diagrams
Fluids on the computer: power diagrams
Power diagram: Pow(xi) = { x | d2(x,xi) – ψi < d2(x,xj) – ψj }
Voronoi diagram: Vor(xi) = { x | d2(x,xi) < d2(x,xj) }
Fluids on the computer: power diagrams
Fluids on the computer: power diagrams
Theorem: (direct consequence of MK duality, Brenier thm
alternative proof in [Aurenhammer, Hoffmann, Aronov 98] ):
Given a point set, there exists a unique weight vector W = [ψ(y1) ψ(y2) … ψ(ym)]
such that the Laguerre cells have the prescribed areas.
Fluids on the computer:
optimal transport
Proof: G(ψ) =∑j ∫Lag ψ(yj) || x – yj ||2 - ψ(yj) dμ + ∑j ψ(yj) vj
Is a concave function of the weight vector [ψ(y1) ψ(y2) … ψ(ym)]
Theorem: (direct consequence of MK duality, Brenier thm
alternative proof in [Aurenhammer, Hoffmann, Aronov 98] ):
Given a point set, there exists a unique weight vector W = [ψ(y1) ψ(y2) … ψ(ym)]
such that the Laguerre cells have the prescribed areas.
Fluids on the computer:
optimal transport
Proof: G(ψ) =∑j ∫Lag ψ(yj) || x – yj ||2 - ψ(yj) dμ + ∑j ψ(yj) vj
Is a concave function of the weight vector [ψ(y1) ψ(y2) … ψ(ym)]
Theorem: (direct consequence of MK duality, Brenier thm
alternative proof in [Aurenhammer, Hoffmann, Aronov 98] ):
Given a point set, there exists a unique weight vector W = [ψ(y1) ψ(y2) … ψ(ym)]
such that the Laguerre cells have the prescribed areas.
Fluids on the computer:
optimal transport
Idea of the proof
Consider the function fT(W) = ∫(|| x– T(x) ||2 – ψ(T(X)))dμ(x)
The (unknown) weights W = [ψ(y1) ψ(y2) … ψ(ym)]
Fluids on the computer: optimal transport
Idea of the proof
Consider the function fT(W) = ∫(|| x– T(x) ||2 – ψ(T(X)))dμ(x)
T : an arbitrary but fixed assignment.
Fluids on the computer: optimal transport
Idea of the proof
Consider the function fT(W) = ∫(|| x– T(x) ||2 – ψ(T(X)))dμ(x)
T : an arbitrary but fixed assignment.
Fluids on the computer: optimal transport
Idea of the proof
Consider the function fT(W) = ∫(|| x– T(x) ||2 – ψ(T(X)))dμ(x)
T : an arbitrary but fixed assignment.
Fluids on the computer: optimal transport
Idea of the proof
Consider the function fT(W) = ∫(|| x– T(x) ||2 – ψ(T(X)))dμ(x)
T : an arbitrary but fixed assignment.
Fluids on the computer: optimal transport
Idea of the proof
Consider the function fT(W) = ∫(|| x– T(x) ||2 – ψ(T(X)))dμ(x)
W
fT(W)
fT(W)
Fluids on the computer: optimal transport
Idea of the proof
Consider the function fT(W) = ∫(|| x– T(x) ||2 – ψ(T(X)))dμ(x)
W
fT(W)
fT(W)
Fluids on the computer: optimal transport
Idea of the proof
Consider the function fT(W) = ∫(|| x– T(x) ||2 – ψ(T(X)))dμ(x)
fT(W) is linear in W
fT(W)
W
fT(W)
Fixed T
Fluids on the computer: optimal transport
Idea of the proof
Consider the function fT(W) = ∫(|| x– T(x) ||2 – ψ(T(X)))dμ(x)
fT(W) is linear in W
f TW
(W) : defined by Laguerre diagram
fT(W)
fixed W
W
Fluids on the computer: optimal transport
Idea of the proof
Consider the function fT(W) = ∫(|| x– T(x) ||2 – ψ(T(X)))dμ(x)
fT(W) is linear in W
f TW
(W) = minT fT(W)
fT(W)
fixed W
W
Fluids on the computer: optimal transport
Idea of the proof
Consider the function fT(W) = ∫(|| x– T(x) ||2 – ψ(T(X)))dμ(x)
fT(W) is linear in W
f: W → f TW
(W) is concave !!
(because its graph is the lower
enveloppe of linear functions)
fT(W)
W
fT(W)
f TW
(W) = minT fT(W)
Fluids on the computer: optimal transport
Idea of the proof
Consider the function fT(W) = ∫(|| x– T(x) ||2 – ψ(T(X)))dμ(x)
fT(W) is linear in W
f: W → f TW
(W) is concave
(because its graph is the lower
enveloppe of linear functions)
fT(W)
W
fT(W)
f TW
(W) = minT fT(W)
Consider g(W) = f TW
(W) + ∑vj ψj
Fluids on the computer: optimal transport
fT(W)
W
fT(W)
f TW
(W) = minT fT(W)
Consider g(W) = f TW
(W) + ∑vj ψj
vj -∫Lag
ψ
(yj) dμ(x) and g is concave.∂ g / ∂ ψ j =
Idea of the proof
Consider the function fT(W) = ∫(|| x– T(x) ||2 – ψ(T(X)))dμ(x)
fT(W) is linear in W
f: W → f TW
(W) is concave
(because its graph is the lower
enveloppe of linear functions)
Fluids on the computer: optimal transport
W
fT(W)
vj =∫Lag
ψ
(yj) dμ(x)
∂ g / ∂ ψ j = 0
Fluids on the computer: optimal transport
W
fT(W)
vj =∫Lag
ψ
(yj) dμ(x)
∂ g / ∂ ψ j = 0
Fluids on the computer: optimal transport
Prescribed volume
W
fT(W)
vj =∫Lag
ψ
(yj) dμ(x)
∂ g / ∂ ψ j = 0
Fluids on the computer: optimal transport
Prescribed volume
Actual volume
Let’s program it !
Fluid element
Parameters:
Pow diag. seeds
Q1: can we find a parameterization such that
each fluid element has constant volume ?
R1: use power diagram and compute weights
that maximize F (using Newton optim.)
Fluid element
Q2: can we compute the time evolution of the parameters
that mimics the physics ?
Parameters:
Pow diag. seeds
Fluids on the computer: optimal transport
Fluid element
Q2: can we compute the time evolution of the parameters
that mimics the physics ?
Parameters:
Pow diag. seeds
Fluids on the computer: optimal transport
F = ma (Newton 2nd law)
Fluid element
Q2: can we compute the time evolution of the parameters
that mimics the physics ?
Parameters:
Pow diag. seeds
Fluids on the computer: optimal transport
F = ma (Newton 2nd law)
applies to center of gravity
Fluid element
Q2: can we compute the time evolution of the parameters
that mimics the physics ?
Parameters:
Pow diag. seeds
Fluids on the computer: optimal transport
F = ma (Newton 2nd law)
applies to center of gravity
Difficulty: the center of gravity is not a variable/parameter
Fluid element
Q2: can we compute the time evolution of the parameters
that mimics the physics ?
Parameters:
Pow diag. seeds
Fluids on the computer: optimal transport
F = ma (Newton 2nd law)
applies to center of gravity
Difficulty: the center of gravity is not a variable/parameter
(1) Apply gravity to the parameters instead
Fluid element
Q2: can we compute the time evolution of the parameters
that mimics the physics ?
Parameters:
Pow diag. seeds
Fluids on the computer: optimal transport
F = ma (Newton 2nd law)
applies to center of gravity
Difficulty: the center of gravity is not a variable/parameter
(1) Apply gravity to the parameters instead
(2) Add a spring so that it pulls the center of gravity
Fluid element
Q2: can we compute the time evolution of the parameters
that mimics the physics ?
Parameters:
Pow diag. seeds
Fluids on the computer: optimal transport
F = ma (Newton 2nd law)
applies to center of gravity
Difficulty: the center of gravity is not a variable/parameter
(1) Apply gravity to the parameters instead
(2) Add a spring so that it pulls the center of gravity
[Gallout Mérigot]
Converges to sol. of Euler
Let’s program it !
Moving forward: “path bundle” method
Newton Laws
(1) inertia
(2) F = ma
(3) Fab = -Fba
Moving forward: “path bundle” method
∫t1
t2
L(x,x,t) dt
The Least Action Principle
The movement of the system
extremizes the integral :
+ Symmetries
w.r.t. time
w.r.t. space
Newton Laws
(1) inertia
(2) F = ma
(3) Fab = -Fba
Moving forward: “path bundle” method
∫t1
t2
L(p,p,t) dt
The Least Action Principle
Extremize
+ Symmetries
w.r.t. time
w.r.t. space
Subject to
Fluid element
Parameters:
Pow diag. seeds
Other examples
To infinity and beyond
5
Simulate the whole universe in a computer ?
René Descartes - 1663
Vortices in Ether
… and Voronoi diagrams !
Early universe reconstruction.
The data (1) the cosmological microwave background
COBE 1992
To infinity and beyond
WMAP 2003
2006
2008
2010
Early universe reconstruction.
The data (1) the cosmological microwave background
To infinity and beyond
Early universe reconstruction.
The data (2) redshift acquisition surveys
To infinity and beyond
Early universe reconstruction.
The data (2) redshift acquisition surveys
To infinity and beyond
Early universe reconstruction.
The data (2) redshift acquisition surveys
To infinity and beyond
The millenium simulation project, Max Planck Institute fur Astrophysik
pc/h : parsec (= 3.2 light year)
To infinity and beyond
To infinity and beyond
The universal swimming pool
Coop. with MOKAPLAN & Institut d’Astrophysique de Paris
Time = Now
Going back in time … 13.7 billion years
Coop. with MOKAPLAN & Institut d’Astrophysique de Paris
. . . . .
Going back in time … 13.7 billion years
Coop. with MOKAPLAN & Institut d’Astrophysique de Paris
Time = BigBang
(- 13.7 billion Y)
Going back in time … 13.7 billion years
Coop. with MOKAPLAN & Institut d’Astrophysique de Paris
“Time-warped” map of the
universe
Going back in time … 13.7 billion years
Coop. with MOKAPLAN & Institut d’Astrophysique de Paris
Cosmic Microware Background:
“Fossil light” emitted 380 000 Y after BigBang
and measured now
“Time-warped” map of the
universe
Going back in time … 13.7 billion years
Coop. with MOKAPLAN & Institut d’Astrophysique de Paris
Cosmic Microware Background:
“Fossil light” emitted 380 000 Y after BigBang
and measured now
Do they match ?
“Time-warped” map of the
universe
Going back in time … 13.7 billion years
Thank you
Online resources
All the sourcecode/documentation available from:
http://alice.loria.fr/software/geogram
Demo: www.loria.fr/~levy/GLUP/vorpaview
* L., A numerical algorithm
for semi-discrete L2 OT in 3D,
ESAIM Math. Modeling
and Analysis, 2015
* L. and E. Schwindt,
Notions of OT and how to
implement them on a computer,
Computer and Graphics, 2018.
J. Lévy – 1936-2018 - To you Dad, I miss you so much.
+ My course at SGP
on Optimal Transport
July 08, Paris

CGI2018 keynote - fluids simulation

  • 1.
    Mathématiques - Informatique EcoleJeunes Chercheurs GDR IM Géométrie Numérique Partie I: Transport Optimal (Lundi) B. Lévy Partie II: Résolution de systèmes linéaires (Jeudi) N. Ray Bruno Lévy ALICE Géométrie & Lumière CENTRE INRIA Nancy Grand-Est Computer Graphics International 2018 – Bintan – June 11-14 Bruno Lévy - Simulating fluids with the “path bundle” method
  • 2.
    Part. 1. Introduction Part.2. Physics Part. 3. Fluids Part. 4. Fluids on computers Part. 5. To infinity and beyond… OVERVIEW
  • 3.
    EMETTEUR - NOMDE LA PRESENTATION Introduction 00 MOIS 2011 - 3 1
  • 4.
  • 6.
    1982 Vol de rêve(Dream Flight) Produced by Philippe Bergeron, Nadia Magnenat Thalmann, Daniel Thalmann. Telling stories with computer graphics …
  • 7.
    1987 Rendez-vous à Montréal Directedby Nadia Magnenat Thalmann, Daniel Thalmann. Telling stories with computer graphics …
  • 8.
    1982 Vol de rêve(Dream Flight) Produced by Philippe Bergeron, Nadia Magnenat Thalmann, Daniel Thalmann. Telling stories with computer graphics …
  • 9.
    1982 Vol de rêve(Dream Flight) Produced by Philippe Bergeron, Nadia Magnenat Thalmann, Daniel Thalmann. Telling stories with computer graphics … Emotions, character animation
  • 10.
    1982 Vol de rêve(Dream Flight) Produced by Philippe Bergeron, Nadia Magnenat Thalmann, Daniel Thalmann. Telling stories with computer graphics … Emotions, character animation Physics
  • 11.
    How can wesimulate physics in a computer ? 2018Telling stories with computer graphics …
  • 12.
  • 13.
  • 14.
    Telling stories… Tales ofmatter, energy, time, light, …
  • 15.
    Which “language” totell these stories ? Telling stories… Tales of matter, energy, time, light, …
  • 16.
  • 17.
    The connection machine– D. Hillis R. Feynman, Playing bongos 1980
  • 18.
    Isaac Newton 1623-1727 1687 Principia Mathematica Amathematical language to talk about physics Differential calculus Newton’s principles (1) Inertia (2) Fundamental principle (3) Reciprocal action 1687
  • 19.
    Isaac Newton 1623-1727 1687 Principia Mathematica Amathematical language to talk about physics Differential calculus Newton’s principles (1) Inertia (2) Fundamental principle (3) Reciprocal action x position 1687
  • 20.
    Isaac Newton 1623-1727 1687 Principia Mathematica Amathematical language to talk about physics Differential calculus Newton’s principles (1) Inertia (2) Fundamental principle (3) Reciprocal action x position x speed 1687
  • 21.
    Isaac Newton 1623-1727 1687 Principia Mathematica Amathematical language to talk about physics Differential calculus Newton’s principles (1) Inertia (2) Fundamental principle (3) Reciprocal action x position x speed x acceleration 1687
  • 22.
    Isaac Newton 1623-1727 1687 Principia Mathematica Amathematical language to talk about physics Differential calculus Newton’s principles (1) Inertia (2) Fundamental principle (3) Reciprocal action x position x speed x acceleration F = m x (2) Fundamental principle of dynamics Change of speed (acceleration) is proportional to force Force Mass 1687
  • 23.
    Gravity F = mg = m x 9.81 m / s / s x = g
  • 24.
    Gravity F = mg = m x 9.81 m / s / s x = g
  • 25.
    Gravity F = mg = m x 9.81 m / s / s x = g
  • 26.
    Gravity F = mg = m x 9.81 m / s / s x = g
  • 27.
    Gravity F = mg = m x 9.81 m / s / s x = g
  • 28.
    Gravity F = mg = m x 9.81 m / s / s x = g
  • 29.
    Gravity F = mg = m x 9.81 m / s / s x = g
  • 30.
    Gravity F = mg = m x 9.81 m / s / s x = g
  • 31.
    Gravity F = mg = m x 9.81 m / s / s x = g
  • 32.
    Gravity F = mg = m x 9.81 m / s / s x = g
  • 33.
    Gravity F = mg = m x 9.81 m / s / s x = g
  • 34.
    Gravity F = mg = m x 9.81 m / s / s x = g
  • 35.
    Gravity F = mg = m x 9.81 m / s / s x = g
  • 36.
    Gravity F = mg = m x 9.81 m / s / s x = g
  • 37.
    Gravity F = mg = m x 9.81 m / s / s x = g
  • 38.
    Gravity F = mg = m x 9.81 m / s / s x = g
  • 39.
    Gravity F = mg = m x 9.81 m / s / s x = g
  • 40.
    Gravity F = mg = m x 9.81 m / s / s x = g
  • 41.
    Gravity F = mg = m x 9.81 m / s / s x = g
  • 42.
    Gravity F = mg = m x 9.81 m / s / s x = g
  • 43.
    Gravity F = mg = m x 9.81 m / s / s x = g
  • 44.
    Gravity F = mg = m x 9.81 m / s / s x = g
  • 45.
    Gravity F = mg = m x 9.81 m / s / s x = g
  • 46.
    Gravity F = mg = m x 9.81 m / s / s x = g
  • 47.
    Gravity F = mg = m x 9.81 m / s / s x = g
  • 48.
    Gravity F = mg = m x 9.81 m / s / s x = gHow to simulate this behavior on a computer ? Each second subtract 9.81 m/s from the vertical component of speed move the point along the speed
  • 49.
    Gravity F = mg = m x 9.81 m / s / s x = g We do computation with a certain precision
  • 50.
    Gravity F = mg = m x 9.81 m / s / s x = g We do computation with a certain precision One can increase this precision
  • 51.
    Gravity F = mg = m x 9.81 m / s / s x = g We do computation with a certain precision One can increase this precision Is it possible to invent a langage to talk about what would happen with infinite precision ?
  • 52.
    Gravity F = mg = m x 9.81 m / s / s x = g Is it possible to invent a langage to talk about what would happen with infinite precision ? Derivatives f’(x) df(t) dt df(x) dx
  • 53.
    Gravity F = mg = m x 9.81 m / s / s x = g Is it possible to invent a langage to talk about what would happen with infinite precision ? Derivatives f’(x) df(t) dt df(x) dx Variation of something w.r.t time
  • 54.
    Gravity F = mg = m x 9.81 m / s / s x = g Is it possible to invent a langage to talk about what would happen with infinite precision ? Derivatives f’(x) df(t) dt df(x) dx Variation of something w.r.t time Variation of something w.r.t. space
  • 55.
    Gravity F = mg = m x 9.81 m / s / s x = g Is it possible to invent a langage to talk about what would happen with infinite precision ? Derivatives – differential calculus “Ghosts of vanished quantities” Newton et Leibniz Derivatives f’(x) df(t) dt df(x) dx Variation of something w.r.t time Variation of something w.r.t. space
  • 56.
    Gravity F = mg = m x 9.81 m / s / s x = g Let’s program it !
  • 57.
  • 58.
  • 59.
  • 60.
    Fluids“Lagrange” point ofview Let’s program it !
  • 61.
    Fluids“Lagrange” point ofview ρ “nb particles per square” “Euler” point of view 1757
  • 62.
    Fluids“Lagrange” point ofview ρ(x,y,t) “nb particles per square” “Euler” point of view v(x,y,t) speed of the particle under “grid point” (x,y) at time t 1757
  • 63.
    Fluids ρ(x,y,t) “nb particlesper square” “Euler” point of view v(x,y,t) speed of the particle under “grid point” (x,y) at time t Q1: how to compute the acceleration of the particles from v(x,y,t) ? 1757
  • 64.
    Fluids ρ(x,y,t) “nb particlesper square” “Euler” point of view v(x,y,t) speed of the particle under “grid point” (x,y) at time t Q1: how to compute the acceleration of the particles from v(x,y,t) ? dv dt ∂v ∂v dx ∂v dy ∂t ∂x dt ∂y dt = + + 1757
  • 65.
    Fluids ρ(x,y,t) “nb particlesper square” “Euler” point of view v(x,y,t) speed of the particle under “grid point” (x,y) at time t Q1: how to compute the acceleration of the particles from v(x,y,t) ? dv dt ∂v ∂v dx ∂v dy ∂t ∂x dt ∂y dt = + + ∂v ∂v vx ∂v vy ∂t ∂x ∂y = + + 1757
  • 66.
    Fluids ρ(x,y,t) “nb particlesper square” “Euler” point of view v(x,y,t) speed of the particle under “grid point” (x,y) at time t Q1: how to compute the acceleration of the particles from v(x,y,t) ? dv dt ∂v ∂v dx ∂v dy ∂t ∂x dt ∂y dt = + + ∂v ∂v vx ∂v vy ∂t ∂x ∂y = + + ∂v v. v ∂t = + 1757
  • 67.
    Fluids ρ(x,y,t) “nb particlesper square” “Euler” point of view v(x,y,t) speed of the particle under “grid point” (x,y) at time t Q1: how to compute the acceleration of the particles from v(x,y,t) ? dv dt = ∂v v. v ∂t + Q2: incompressible fluids ? 1757
  • 68.
    Fluids ρ(x,y,t) “nb particlesper square” “Euler” point of view v(x,y,t) speed of the particle under “grid point” (x,y) at time t Q1: how to compute the acceleration of the particles from v(x,y,t) ? dv dt = ∂v v. v ∂t + Q2: incompressible fluids ? 1757
  • 69.
    Fluids ρ(x,y,t) “nb particlesper square” “Euler” point of view v(x,y,t) speed of the particle under “grid point” (x,y) at time t Q1: how to compute the acceleration of the particles from v(x,y,t) ? dv dt = ∂v v. v ∂t + Q2: incompressible fluids ? what goes in = what goes out 1757
  • 70.
    Fluids ρ(x,y,t) “nb particlesper square” “Euler” point of view v(x,y,t) speed of the particle under “grid point” (x,y) at time t Q1: how to compute the acceleration of the particles from v(x,y,t) ? dv dt = ∂v v. v ∂t + Q2: incompressible fluids ? what goes in = what goes out div(v) = 0 1757
  • 71.
    Fluids ρ(x,y,t) “nb particlesper square” “Euler” point of view v(x,y,t) speed of the particle under “grid point” (x,y) at time t Q1: how to compute the acceleration of the particles from v(x,y,t) ? dv dt = ∂v v. v ∂t + Q2: incompressible fluids ? div(v) = 0 Q3: mass conservation ? 1757
  • 72.
    Fluids ρ(x,y,t) “nb particlesper square” “Euler” point of view v(x,y,t) speed of the particle under “grid point” (x,y) at time t Q1: how to compute the acceleration of the particles from v(x,y,t) ? dv dt Q2: incompressible fluids ? div(v) = 0 Q3: mass conservation ? d ρ dt = - div(ρv) (Continuity equation) 1757 = ∂v v. v ∂t +
  • 73.
    Fluids Newton 2nd law(F = ma) Incompressibility Initial condition Incompressible Euler fluid 1757
  • 74.
    Fluids Newton 2nd law(F = ma) Incompressibility Initial condition Incompressible Euler fluid 1757 Q: How to program incompressibility ?
  • 75.
    Fluids on thecomputer 4 From Euler to Brenier
  • 79.
  • 80.
  • 81.
    Fluid element Parameters Q1: canwe find a parameterization such that each fluid element has constant volume ?
  • 82.
    Fluid element Parameters Q1: canwe find a parameterization such that each fluid element has constant volume ? Q2: can we compute the time evolution of the parameters that mimics the physics ?
  • 83.
    Voronoi diagram: Vor(xi)= { x | d2(x,xi) < d2(x,xj) } Fluids on the computer: power diagrams
  • 84.
    Fluids on thecomputer: power diagrams
  • 85.
    Power diagram: Pow(xi)= { x | d2(x,xi) – ψi < d2(x,xj) – ψj } Voronoi diagram: Vor(xi) = { x | d2(x,xi) < d2(x,xj) } Fluids on the computer: power diagrams
  • 86.
    Fluids on thecomputer: power diagrams
  • 87.
    Theorem: (direct consequenceof MK duality, Brenier thm alternative proof in [Aurenhammer, Hoffmann, Aronov 98] ): Given a point set, there exists a unique weight vector W = [ψ(y1) ψ(y2) … ψ(ym)] such that the Laguerre cells have the prescribed areas. Fluids on the computer: optimal transport
  • 88.
    Proof: G(ψ) =∑j∫Lag ψ(yj) || x – yj ||2 - ψ(yj) dμ + ∑j ψ(yj) vj Is a concave function of the weight vector [ψ(y1) ψ(y2) … ψ(ym)] Theorem: (direct consequence of MK duality, Brenier thm alternative proof in [Aurenhammer, Hoffmann, Aronov 98] ): Given a point set, there exists a unique weight vector W = [ψ(y1) ψ(y2) … ψ(ym)] such that the Laguerre cells have the prescribed areas. Fluids on the computer: optimal transport
  • 89.
    Proof: G(ψ) =∑j∫Lag ψ(yj) || x – yj ||2 - ψ(yj) dμ + ∑j ψ(yj) vj Is a concave function of the weight vector [ψ(y1) ψ(y2) … ψ(ym)] Theorem: (direct consequence of MK duality, Brenier thm alternative proof in [Aurenhammer, Hoffmann, Aronov 98] ): Given a point set, there exists a unique weight vector W = [ψ(y1) ψ(y2) … ψ(ym)] such that the Laguerre cells have the prescribed areas. Fluids on the computer: optimal transport
  • 90.
    Idea of theproof Consider the function fT(W) = ∫(|| x– T(x) ||2 – ψ(T(X)))dμ(x) The (unknown) weights W = [ψ(y1) ψ(y2) … ψ(ym)] Fluids on the computer: optimal transport
  • 91.
    Idea of theproof Consider the function fT(W) = ∫(|| x– T(x) ||2 – ψ(T(X)))dμ(x) T : an arbitrary but fixed assignment. Fluids on the computer: optimal transport
  • 92.
    Idea of theproof Consider the function fT(W) = ∫(|| x– T(x) ||2 – ψ(T(X)))dμ(x) T : an arbitrary but fixed assignment. Fluids on the computer: optimal transport
  • 93.
    Idea of theproof Consider the function fT(W) = ∫(|| x– T(x) ||2 – ψ(T(X)))dμ(x) T : an arbitrary but fixed assignment. Fluids on the computer: optimal transport
  • 94.
    Idea of theproof Consider the function fT(W) = ∫(|| x– T(x) ||2 – ψ(T(X)))dμ(x) T : an arbitrary but fixed assignment. Fluids on the computer: optimal transport
  • 95.
    Idea of theproof Consider the function fT(W) = ∫(|| x– T(x) ||2 – ψ(T(X)))dμ(x) W fT(W) fT(W) Fluids on the computer: optimal transport
  • 96.
    Idea of theproof Consider the function fT(W) = ∫(|| x– T(x) ||2 – ψ(T(X)))dμ(x) W fT(W) fT(W) Fluids on the computer: optimal transport
  • 97.
    Idea of theproof Consider the function fT(W) = ∫(|| x– T(x) ||2 – ψ(T(X)))dμ(x) fT(W) is linear in W fT(W) W fT(W) Fixed T Fluids on the computer: optimal transport
  • 98.
    Idea of theproof Consider the function fT(W) = ∫(|| x– T(x) ||2 – ψ(T(X)))dμ(x) fT(W) is linear in W f TW (W) : defined by Laguerre diagram fT(W) fixed W W Fluids on the computer: optimal transport
  • 99.
    Idea of theproof Consider the function fT(W) = ∫(|| x– T(x) ||2 – ψ(T(X)))dμ(x) fT(W) is linear in W f TW (W) = minT fT(W) fT(W) fixed W W Fluids on the computer: optimal transport
  • 100.
    Idea of theproof Consider the function fT(W) = ∫(|| x– T(x) ||2 – ψ(T(X)))dμ(x) fT(W) is linear in W f: W → f TW (W) is concave !! (because its graph is the lower enveloppe of linear functions) fT(W) W fT(W) f TW (W) = minT fT(W) Fluids on the computer: optimal transport
  • 101.
    Idea of theproof Consider the function fT(W) = ∫(|| x– T(x) ||2 – ψ(T(X)))dμ(x) fT(W) is linear in W f: W → f TW (W) is concave (because its graph is the lower enveloppe of linear functions) fT(W) W fT(W) f TW (W) = minT fT(W) Consider g(W) = f TW (W) + ∑vj ψj Fluids on the computer: optimal transport
  • 102.
    fT(W) W fT(W) f TW (W) =minT fT(W) Consider g(W) = f TW (W) + ∑vj ψj vj -∫Lag ψ (yj) dμ(x) and g is concave.∂ g / ∂ ψ j = Idea of the proof Consider the function fT(W) = ∫(|| x– T(x) ||2 – ψ(T(X)))dμ(x) fT(W) is linear in W f: W → f TW (W) is concave (because its graph is the lower enveloppe of linear functions) Fluids on the computer: optimal transport
  • 103.
    W fT(W) vj =∫Lag ψ (yj) dμ(x) ∂g / ∂ ψ j = 0 Fluids on the computer: optimal transport
  • 104.
    W fT(W) vj =∫Lag ψ (yj) dμ(x) ∂g / ∂ ψ j = 0 Fluids on the computer: optimal transport Prescribed volume
  • 105.
    W fT(W) vj =∫Lag ψ (yj) dμ(x) ∂g / ∂ ψ j = 0 Fluids on the computer: optimal transport Prescribed volume Actual volume
  • 106.
  • 107.
    Fluid element Parameters: Pow diag.seeds Q1: can we find a parameterization such that each fluid element has constant volume ? R1: use power diagram and compute weights that maximize F (using Newton optim.)
  • 108.
    Fluid element Q2: canwe compute the time evolution of the parameters that mimics the physics ? Parameters: Pow diag. seeds Fluids on the computer: optimal transport
  • 109.
    Fluid element Q2: canwe compute the time evolution of the parameters that mimics the physics ? Parameters: Pow diag. seeds Fluids on the computer: optimal transport F = ma (Newton 2nd law)
  • 110.
    Fluid element Q2: canwe compute the time evolution of the parameters that mimics the physics ? Parameters: Pow diag. seeds Fluids on the computer: optimal transport F = ma (Newton 2nd law) applies to center of gravity
  • 111.
    Fluid element Q2: canwe compute the time evolution of the parameters that mimics the physics ? Parameters: Pow diag. seeds Fluids on the computer: optimal transport F = ma (Newton 2nd law) applies to center of gravity Difficulty: the center of gravity is not a variable/parameter
  • 112.
    Fluid element Q2: canwe compute the time evolution of the parameters that mimics the physics ? Parameters: Pow diag. seeds Fluids on the computer: optimal transport F = ma (Newton 2nd law) applies to center of gravity Difficulty: the center of gravity is not a variable/parameter (1) Apply gravity to the parameters instead
  • 113.
    Fluid element Q2: canwe compute the time evolution of the parameters that mimics the physics ? Parameters: Pow diag. seeds Fluids on the computer: optimal transport F = ma (Newton 2nd law) applies to center of gravity Difficulty: the center of gravity is not a variable/parameter (1) Apply gravity to the parameters instead (2) Add a spring so that it pulls the center of gravity
  • 114.
    Fluid element Q2: canwe compute the time evolution of the parameters that mimics the physics ? Parameters: Pow diag. seeds Fluids on the computer: optimal transport F = ma (Newton 2nd law) applies to center of gravity Difficulty: the center of gravity is not a variable/parameter (1) Apply gravity to the parameters instead (2) Add a spring so that it pulls the center of gravity [Gallout Mérigot] Converges to sol. of Euler
  • 115.
  • 116.
    Moving forward: “pathbundle” method Newton Laws (1) inertia (2) F = ma (3) Fab = -Fba
  • 117.
    Moving forward: “pathbundle” method ∫t1 t2 L(x,x,t) dt The Least Action Principle The movement of the system extremizes the integral : + Symmetries w.r.t. time w.r.t. space Newton Laws (1) inertia (2) F = ma (3) Fab = -Fba
  • 118.
    Moving forward: “pathbundle” method ∫t1 t2 L(p,p,t) dt The Least Action Principle Extremize + Symmetries w.r.t. time w.r.t. space Subject to Fluid element Parameters: Pow diag. seeds
  • 119.
  • 120.
  • 121.
    Simulate the wholeuniverse in a computer ?
  • 122.
    René Descartes -1663 Vortices in Ether … and Voronoi diagrams !
  • 123.
    Early universe reconstruction. Thedata (1) the cosmological microwave background COBE 1992 To infinity and beyond
  • 124.
    WMAP 2003 2006 2008 2010 Early universereconstruction. The data (1) the cosmological microwave background To infinity and beyond
  • 125.
    Early universe reconstruction. Thedata (2) redshift acquisition surveys To infinity and beyond
  • 126.
    Early universe reconstruction. Thedata (2) redshift acquisition surveys To infinity and beyond
  • 127.
    Early universe reconstruction. Thedata (2) redshift acquisition surveys To infinity and beyond
  • 128.
    The millenium simulationproject, Max Planck Institute fur Astrophysik pc/h : parsec (= 3.2 light year) To infinity and beyond
  • 129.
    To infinity andbeyond The universal swimming pool
  • 130.
    Coop. with MOKAPLAN& Institut d’Astrophysique de Paris Time = Now Going back in time … 13.7 billion years
  • 131.
    Coop. with MOKAPLAN& Institut d’Astrophysique de Paris . . . . . Going back in time … 13.7 billion years
  • 132.
    Coop. with MOKAPLAN& Institut d’Astrophysique de Paris Time = BigBang (- 13.7 billion Y) Going back in time … 13.7 billion years
  • 133.
    Coop. with MOKAPLAN& Institut d’Astrophysique de Paris “Time-warped” map of the universe Going back in time … 13.7 billion years
  • 134.
    Coop. with MOKAPLAN& Institut d’Astrophysique de Paris Cosmic Microware Background: “Fossil light” emitted 380 000 Y after BigBang and measured now “Time-warped” map of the universe Going back in time … 13.7 billion years
  • 135.
    Coop. with MOKAPLAN& Institut d’Astrophysique de Paris Cosmic Microware Background: “Fossil light” emitted 380 000 Y after BigBang and measured now Do they match ? “Time-warped” map of the universe Going back in time … 13.7 billion years
  • 136.
  • 137.
    Online resources All thesourcecode/documentation available from: http://alice.loria.fr/software/geogram Demo: www.loria.fr/~levy/GLUP/vorpaview * L., A numerical algorithm for semi-discrete L2 OT in 3D, ESAIM Math. Modeling and Analysis, 2015 * L. and E. Schwindt, Notions of OT and how to implement them on a computer, Computer and Graphics, 2018. J. Lévy – 1936-2018 - To you Dad, I miss you so much. + My course at SGP on Optimal Transport July 08, Paris