41
Universit¨ at Bielefeld Technische Fakult¨ at AG Computergrafik & Geometrieverarbeitung Bachelorarbeit Projective Dynamcis Tristan Kenneweg Studiengang: Naturwissenschaftliche Informatik Betreuer: Prof. Dr. Mario Botsch M. Sc. Jascha Aschenbach Datum: 15. Dezember 2014

Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

  • Upload
    hakhue

  • View
    214

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

Universitat BielefeldTechnische FakultatAG Computergrafik & Geometrieverarbeitung

Bachelorarbeit

Projective Dynamcis

Tristan Kenneweg

Studiengang: Naturwissenschaftliche Informatik

Betreuer:

Prof. Dr. Mario BotschM. Sc. Jascha Aschenbach

Datum: 15. Dezember 2014

Page 2: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit
Page 3: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

Abstract

This thesis deals with the physics-based simulation of deformable bodies and specificallywith the implementation and qualitative testing of Projective Dynamcis as shown in[BML+14]. Intuitive understanding of all presented methods is promoted in particular.

i

Page 4: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit
Page 5: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

Versicherung

Versicherung gemaß §14, Absatz 8 der Studien- und Prufungsordnung fur das Bache-lorstudium (BPO) an der Technischen Fakultat der Universitat Bielefeld vom 01. August2012.

Hiermit versichere ich, dass ich die vorliegende Bachelorarbeit selbstandig erarbeitet undkeine anderen als die angegebenen Quellen und Hilfsmittel benutzt sowie Zitate kenntlichgemacht habe.

Bielefeld, den 15. Dezember 2014

iii

Page 6: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit
Page 7: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

Contents

1 Introduction 1

2 Basics 32.1 Newton’s Law . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.2 Explicit and Implicit Euler Intergration . . . . . . . . . . . . . . . . . . . . 3

2.2.1 Explicit Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.2.2 Implicit Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2.3 Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.3.1 Position Based Methods . . . . . . . . . . . . . . . . . . . . . . . . 5

3 Projective Dynamics 73.1 Implicit Euler Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

3.1.1 Intuitive explanation . . . . . . . . . . . . . . . . . . . . . . . . . . 83.2 The Key Idea . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83.3 Projective Solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3.3.1 Projection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103.3.2 Global solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

4 Implementation and Constraints 114.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114.2 System Matrix Y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114.3 Projection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124.4 Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

4.4.1 Position Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . 134.4.2 Line Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144.4.3 Edge Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154.4.4 Bending Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . 16

5 Forces 215.1 Gravity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215.2 Mouse-Spring Force . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215.3 Windforce . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

6 Results 236.1 Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236.2 Damping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236.3 Intuitive Realism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256.4 Initialisation of q . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276.5 Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

v

Page 8: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

Contents

7 Conclusion 29

Appendix A 311 Multimedia CD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

Bibliography 33

vi

Page 9: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

1 Introduction

The physical simulation of deformable bodies is an important tool in the film, gamingand medical industry, as well as in many other areas. The algorithms used in these fieldsare ideally physically accurate, stable, simple, high-performance and able to simulate awide range of material behaviors. However, there is no algorithm that matches all thesecriteria perfectly. Instead some aspects are always neglected in favor of others.

The importance of these criteria varies from field to field. In films and video gamesvisually pleasing effects are more important than physical accuracy. The level of physicalrealism only has to be as good as the user’s intuition. In the medical sector it is the otherway around. Real time capability is of great relevance in both video games and medicalsimulations but it comes at the cost of computational expense and accuracy.

In the production of movies the rendering of a scene may take several days, nonethelessthe simulation should be as quick as possible in order to simplify development. For thesame reason stability is of great benefit in the film making industry and indispensable inreal time applications since in most cases it is not possible to re-run a simulation.

A commonly used algorithm for stable, low accuracy, real time simulations is PositionBased Dynamics [MHHR07]. Physically highly accurate simulations are usually performedvia the finite elements method [Clo90].

Projective Dynamics [BML+14] represents an iterative position-based algorithm that iscapable of real time animation and is unconditionally stable. Furthermore, it is able touse potentials derived from continuum mechanics which allows for a wide range of realisticmaterial behavior.

The aim of this thesis is to give the reader an intuitive understanding of Projecitve Dy-namcis as well as details concerning the implementation. Furthermore, some qualitativetests regarding the behavior of Projective Dynamics will be presented.

In Chapter 2 basic information concerning the animation of complex systems is given.Chapter 3 presents the Projective Dynamics solver and helps to give rise to an intuitiveunderstanding. Details concerning the implementation as well as concrete constraints arepresented in Chapter 4. Chapter 5 shortly displays possible external forces. Chapter 6presents a number of qualitative tests and Chapter 7 concludes this thesis.

1

Page 10: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit
Page 11: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

2 Basics

2.1 Newton’s Law

In order to develop an animation algorithm whose output resembles reality the underlyingphysical laws of the system that is modeled are needed. The movement of particles underthe effect of forces is governed by Newton’s law which reads

x = F/m. (2.1)

x denotes the second derivative of the position of a particle with respect to time and F isthe force acting on the particle. m is the constant mass of the particle. x and F are both∈ IR3. This way a motion in a 3 dimensional space is described.

Intuitively Newton’s law states that the rate by which the speed of a particle changes, isproportional to the force applied to the particle. That means that while no force is actingon the particle it will keep going with its current velocity.

We expect objects to slow down if no force is acting on them, but this is a misconceptiondue to everyday experience. If a ball is flying through the air, air resistance applies aforce on the ball which is opposed to its flying direction, thus slowing down the ball. Ifthe ball were in space, where there is no air, it would continue flying forever. In reality allforces acting on an object are described by a law of physics, like gravitation (see Chapter5 ”Forces”). In computer animation it is possible to invent arbitrary forces for artisticeffect and user input, for example a mouse force, that allows the user to drag or push anobject.

2.2 Explicit and Implicit Euler Intergration

To solve Equation (2.1) many numerical procedures exist of which two are mentionedhere.

Newton’s law can be rewritten in two first-order ODEs.

x = v

andvm = F.

where v is the velocity of a particle.

3

Page 12: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

2 Basics

2.2.1 Explicit Integration

To find the position of a particle in the near future we use a Taylor-series.

x (t+ h) = x + hx +h2

2x + ...

If we truncate the terms after the first derivate we end up with

x (t+ h) = x + hv (2.2)

for a small time step h.

Intuitively, we calculate the new position after a time interval h, by assuming the velocityto be constant in that interval. The smaller we choose the time step the smaller theresulting error. Similarly we calculate

v (t+ h) = v + ha (2.3)

where a = F/m is the acceleration of the particle.

The Explicit Euler Integration results in an error in the order of O(h2). Furthermore,instability is a big issue, since for certain systems the solution does not converge butgrows without limit [Pre07].

2.2.2 Implicit Integration

Implicit Euler Integration resolves the shortcoming of instability at the cost of complexityand computational expense. Express x (t) as a Taylor-series:

x ((t+ h)− h) = x (t) = x (t+ h)− hv (t+ h) +h2

2x (t+ h) + ..

Truncating and rearranging after the first term results in

x (t+ h) = x + hv (t+ h) . (2.4)

And similarly the velocities update reads

v (t+ h) = v (t) + hF(x (t+ h) ,v (t+ h)). (2.5)

Equation (2.4) and (2.5) build an often non-linear system of equations, which has tobe solved at every time step. The solution is guaranteed to converge. A side effect isinvoluntary damping at every time step.

4

Page 13: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

2.3 Materials

2.3 Materials

Newton’s law as written in Equation (2.1) only allows us to calculate the motion ofparticles. However, it is necessary to simulate the behavior of finite bodies that are capableof rotation and can be stretched, compressed or bend. It would seem that Newton’s lawis incapable of describing this behavior, but this is not the case.

In reality finite bodies consist of atoms that are governed by forces and Newton’s law.Consequently, a multi-particle system with forces acting between those particles is a verygood model of real materials. We would expect such a system to have an outcome thatis very similar to what we observe in everyday life.

A curtain, for example is made of innumerable atoms that are hold together by complexforces. These forces allow the material to endure a certain amount of stretching, com-pression and bending before failure. The forces that hold together the atoms in a pieceof metal are different than those in a curtain and so the metal’s properties are different,but Newton’s law is the same in both systems.

Therefore, one way to simulate a material would be to simulate a big number of particlesthat take the place of atoms and are hold together by the same forces as actual atoms are,which can be found in a physics textbook. These forces could be plugged in Equation (2.1),which could be solved using an integration method of choice (Section 2.2). Unfortunately,it is not possible to use this method, since the number of atoms is too large to simulateeven for a small object. Additionally, the forces at work are extremely complex.

Consequently, there have been many attempts to discretize an object with particles thatdo not take the place of atoms. One of the most famous attempts is a mass-spring system,which consists of a number of particles, which are connected by springs that obey Hooke’slaw (see Chapter 5). However, it is difficult to simulate arbitrary material behavior withonly mass-spring-systems. Furthermore, when explicit integration is used, stability is amajor concern.

2.3.1 Position Based Methods

Due to these shortcomings in mass-spring-systems, position-based approaches have be-come more popular during the past years.

The key idea is to achieve the desired result in a more direct way. Instead of inventingforces that indirectly result in a pleasing behavior, the positions of the vertices in a meshare directly manipulated. This way material properties can be controlled more easily.

This manipulation violates Newton’s law and if the violation is too big, the material’sbehavior under the effect of forces will no longer be realistic. Therefore, a compromisehas to be found between the artificial constraints that are dictated by a position basedalgorithm, and Newton’s law of motion.

5

Page 14: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit
Page 15: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

3 Projective Dynamics

Projective Dynamics falls into the category of position based simulation methods (Section2.3.1). All ideas presented in this section originate from [BML+14].

The animated mesh consists of m vertices, with positions stored in a vector q ∈ IR3m,and velocities v ∈ IR3m. At any time tn the system is defined by qn and vn. Furthermoreh denotes the time step.

We distinguish between internal and external forces. External forces act on the systemfrom the outside, examples are gravity and windforce. Internal forces result from thematerial properties of the system. In a mass-spring-system for example, the spring forceis an internal force. The sums of these forces are stored in two vectors fint ∈ IR3m andfext ∈ IR3m. M ∈ IR3m×3m denotes the mass matrix which is a diagonal matrix with themass of every vertex on its diagonal.

Projective Dynamics exclusively deals with position dependent internal forces, such thatthe internal forces can be written as the derivative of a potential with respect to space

fint (q) = −∑i

∇Wi (q) .

3.1 Implicit Euler Integration

The particles in the system evolve according to Newton’s law of motion, which in ournotation reads

q = M−1(fint + fext). (3.1)

Note that Equation (3.1) describes the development of every vertex in the system.

Implicit Euler Integration yields

qn+1 = qn + hvn+1 (3.2)

and

vn+1 = vn + hM−1 (fint (qn+1) + fext) . (3.3)

Equation (3.2) and (3.3) can be further converted by plugging vn+1 into (3.2). Afterfurther rearranging, this results in

M (qn+1 − qn − hvn) = h2 (fint (qn+1) + fext) . (3.4)

7

Page 16: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

3 Projective Dynamics

which leads to the following optimization problem

minqn+1

1

2h2

∣∣∣∣∣∣M 12 (qn+1 − sn)

∣∣∣∣∣∣2F

+∑i

Wi(qn+1) (3.5)

where sn = qn + hvn + h2M−1fext and ||.||F denotes the Frobenius norm. Note thatexternal forces are directly captured by sn while the internal forces have been convertedto potentials. These potentials will therefore determine the mesh’s behavior. Equation(3.5) can be converted back into Equation (3.4) by demanding the gradient to be zero.

3.1.1 Intuitive explanation

Let us examine the intuitive meaning of Equation (3.5).∑i

Wi(qn+1) demands the system to be in a state of minimum total potential energy. Our

potentials stem from internal forces. Internal forces arise whenever vertices depart froma certain rest configuration. Examples are bending and stretching forces. The further avertex wanders from a point of zero force, the higher the potential associated with thatvertex. Consequently

∑i

Wi(qn+1) demands every vertex to be at a position where no

internal forces are acting on it. This is a behavior we would expect, since an internalforce will push a particle until the particle is in a place where no forces are acting on it.In a mass-spring-system a state of minimum total potential energy corresponds to a statewhere all springs have their restlength.

||M 12 (qn+1 − sn) ||2F describes the system’s deviation from one step of Explicit Euler, as

described in Section 2.2, but with the Taylor-series truncated after the second term insteadof the first. This term makes sure the system follows its momentum by taking velocityand acceleration into account. Without this term the system would immediately go intoa state of minimum potential energy.

Consequently, the best solution qn+1 to the minimization problem at hand is a minimaldeviation from one step of Explicit Euler which minimizes the potential energies as far aspossible.

3.2 The Key Idea

To simulate an arbitrary and often non-linear material, a non-linear potential W (q) isneeded, making Equation (3.5) very difficult and computational expensive to solve. Thekey idea of Projective Dynamics is to transform the potential terms Wi in Equation (3.5),into a new form which allows us to perform a very efficient solve.

In the further text we will speak of constraints as well as of potentials, since this iscommonly done. Keep in mind that both expressions are synonyms in the context of thisthesis. A set of vertex positions fulfill a constraint, if the potential evaluates to zero.

8

Page 17: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

3.3 Projective Solver

For every constraint there exists a subset of possible values for qn+1, for which the con-straint is fulfilled (Wi (qn+1) = 0). Let us introduce an auxiliary variable pi for everyconstraint for which this condition is always met.

∀Wi ∃pi : Wi(pi) = 0

We construct our new potentials by finding positions pi which are closest to the currentvertex positions q while still fulfilling Wi (pi) = 0. This step is called constraint projection.Depending on the constraint this can be done analytically, since we generate a largenumber of local potentials, such as per-vertex and per-edge potentials. Concrete examplesfor constraints can be found in Chapter 4.

We define our new potential as a difference between the optimal constraint fulfilling po-sitions pi and the new positions qn+1. We get

Wi (qn+1,pi) = d (qn+1,pi) + δC (pi) (3.6)

where δC (pi) expresses that Wi (p) = 0. If this condition is met δC (pi) evaluates to zero,otherwise to ∞.

d (qn+1,pi) denotes the distance measure, which is chosen to be

d (qn+1,pi) =wi

2||Aiqn+1 −Bipi||2F . (3.7)

where wi is an arbitrary non-negative weight. Ai and Bi are matrices, which may seemconfusing, but turn out to be important to keep these potentials as general as possible. IfAi and Bi were to be the identity matrix, our distance measure would equal the squaredEuclidean distance, but we would only be able to construct constraints which take simplevertex positions into account. But with arbitrary Ai and Bi it is possible to mix differentvertex positions and preserve more complex values, like the Laplace vector of a vertex,which uses the position of the vertex and all vertices surrounding it. The preservation ofthe Laplace vectors translate to bending energies as will be discussed in Section 4.4.4.

In summary: For every constraint we find the closest positions for all vertices involved inthe constraint which fulfill the constraint. Our potential is then the generalized distanceas defined in Equation (3.7) between those points and the actual vertex positions.

3.3 Projective Solver

Substituting our new potentials into Equation (3.5) leads to

minqn+1,p

1

2h2||M

12 (qn+1 − sn) ||2F +

∑i

wi

2||AiSiqn+1 −Bipi||2F + δC (pi) (3.8)

where Si is a constant selection matrix that selects the vertices involved in the ith con-straint. This problem can be solved in two steps, a projection and a global solve.

9

Page 18: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

3 Projective Dynamics

3.3.1 Projection

First, we solve Equation (3.8) for the auxiliary variables pi while keeping the positionsfixed. This translates to finding the closest positions for all vertices where their potentialamounts to zero, and allows us to drop the δC (pi) in the next step since it will be zero.The values for the auxiliary variables can be found for all constraints independently,leading us to only

minpi

||AiSiqn+1 −Bipi||2F + δC (p) . (3.9)

As mentioned in Section 3.2 this minimization can be solved analytically in most cases.

3.3.2 Global solve

When minimizing over the positions in the next step, requiring that the gradient vanishesfor Equation (3.8) leads to the following linear system.(

M

h2+∑i

wiSTi A

Ti AiSi

)qn+1 =

M

h2sn +

∑i

wiSTi A

Ti Bipi (3.10)

It is important that the system matrix on the left-hand side does not require recompu-tation at each time step, which allows pre-factorization at initialization and consequentlyvery efficient solves. The complete algorithm is shown in Algorithm 1.

Algorithm 1: Projective Dynamics Solver

1 ComputeExternalForces()2 sn = qn + hvn + h2M−1fext3 qn+1 = sn4 for i = 0 to iterations do5 ProjectonConstraintSet() // calculate all pi.6 globalSolve() // calls a linear system solver and updates qn+1.

7 end8 vn+1 = (qn+1 − qn) /h

Initializing qn+1 with qn+1 = sn instead of qn+1 = qn is not necessary but speeds upconvergence. The velocities are updated explicitly in line 8. Note that p and qn+1 areupdated multiple times during one time step. This is necessary in order for qn+1 toconverge to the optimal solution. To arrive at the optimal solution after one time step wewould need to minimize over all pi and qn+1 simultaneously in Equation (3.8). However,this would prevent us from deriving Equation (3.10), since requiring that the gradientvanishes for Equation (3.8) would make us differentiate all pi with respect to qn+1. Asmost pi are dependent on qn+1 in a non-linear fashion, this yields a non-linear system.

10

Page 19: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

4 Implementation and Constraints

In the following chapter details concerning the implementation of the Projective Dynamicssolver will be presented. Furthermore, the mathematical basis and implementation ofcertain constraints will be discussed thoroughly.

4.1 General

While Equation (3.10) has a mathematically very elegant form, it is in need of somechanges to make it computationally efficient to solve.

First, we will not calculate Ai and Si separately, but will calculate one matrix Ai := AiSi.

Furthermore, we will adopt the following notation:

• Y = Mh2 +

∑i

wiATi Ai

• b = Mh2 sn +

∑i

wiATi Bipi

• q = qn+1 (qn will henceforth refer to the nth element of q)

Transforming the system to be solved into

Yq = b. (4.1)

The implementation of every constraint consists of two parts:

1. The calculation of all Ai and the consequent computation of Y (see algorithm 2).

2. The computation of Bipi and finalization of b (Projection).

”The vertex vn at q3n” refers to a vertex with position vn ∈ IR3 saved at q3n, q3n+1 andq3n+2. vn always denotes the position of the vertex vn. Note that pn refers to the nthvalue of pi, rather than a vector. If this notation is used pi will be clear from context.

4.2 System Matrix Y

When working with sparse matrices it is possible to calculate Y exactly as describedabove. For m vertices all involved matrices are in the order of IR3m × 3m, but most entriesare zero. Y has to be calculated only once at initialization, since it stays constant as longas the constraints do not change.

11

Page 20: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

4 Implementation and Constraints

Ai is calculated for each constraint. If the vertex at q3n is not part of the constraint, allentries in the columns 3n to 3n + 2 of Ai equal zero. If a complex value is supposed tobe conserved, Aiq evaluates to that complex value. An example for this can be seen inSection 4.4.4. Y is always initialized with Y = M

h2 and finalized by Algorithm 2 when allAi are calculated.

Algorithm 2: System Matrix calculation

1 Y = Mh2 for all constraints Ci do

2 Y + = wiATi ·Ai

3 end

If constraints are supposed to be removed or added during runtime, it is beneficial tointroduce some auxiliary matrices that store the contributions of constraint groups.

Example: If all edge constraint contributions are stored in

E =∑e

weATe Ae

and all bending constraint contributions in

B =∑b

wbATb Ab

Y can be calculated by

Y =M

h2+ E + B

This allows for a fluent manipulation of material behavior and time step during runtime,since the contributions of constraint groups can be added or subtracted very fast.

4.3 Projection

Projection refers to the minimization of Equation (3.9). For every constraint the closestvertex configuration pi to the current positions q that fulfills the condition W (pi) = 0,must be computed. However, this is never done explicitly. Instead in most cases, onlythe non-zero entries of Bipi are calculated directly.

Furthermore, the contributions of∑i

wiATi Bipi to b must be computed. Since this process

is performed in every time step, it is not possible to use matrix products, even if usingsparse matrices. Direct manipulations of b are necessary. These direct manipulationshappen after initializing b with b = M

h2 sn in every iteration. Instead of performingan explicit matrix multiplication for each constraint, we only add the non-zero entries ofwiA

Ti Bipi to b. This corresponds to only roughly 3 to 20 values per constraint, depending

on the constraint in question. wiATi Bipi is never calculated explicitly. The projection

can be parallelized since wiATi Bipi can be evaluated independently for each constraint.

12

Page 21: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

4.4 Constraints

4.4 Constraints

In the following section the theoretical foundation and implementation details for fourconstraints will be presented:

• Position Constraint

• Line Constraint

• Edge Constraint

• Bending Constraint

The constraints are presented in order of increasing complexity. New concepts will beintroduced for each constraint.

4.4.1 Position Constraints

The position constraint fixes chosen vertices vn to arbitrary positions xn ∈ IR3. Thisis done by defining δC (pi) so that δC (pi) = 0 if and only if the vector stored at p3n

equals xn [BML+14]. The position constraint is the most simple constraint possible, sincethe projection positions are already known (xn). One constraint is generated per fixedposition.

System Matrix

To calculate Ai and Bi let us take a look at the distance measure of our potentials:

minpi

||Aiqn+1 −Bipi||2F + δC (p)

To fix vn to xn we want to punish the deviation of vn from xn. vn is stored at q3n. Allother entries of q must not influence the potential. Consequently, Ai can be calculatedas seen in Algorithm 3.

Algorithm 3: Position Constraint Selection Matrix

1 for each fixed vertex vn do2 for j = 0 to j = 2 do3 Ai[3n, 3n+ j] + = wixn[j]4 end

5 end

Ai is a diagonal selection matrix. Aiq results in a vector that contains vn at 3n and iszero everywhere else. Therefore, Bipi must result in a vector that contains xn at 3n andis zero everywhere else. Hence Bi equals Ai.

13

Page 22: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

4 Implementation and Constraints

Projection

The evaluation of wiATi Bipi is implemented by Algorithm 4. For every constraint the

Algorithm 4: Position Constraint Projection

1 for each fixed vertex vn do2 for j = 0 to j = 2 do3 b[3n+ j] + = wixn[j]4 end

5 end

desired position xn for every vertex vn is directly added to b at the place that correspondsto the fixed vertex.

Example: Suppose a system of two vertices with q ∈ IR6. The first vertex is fixed at(1, 2, 3). Consequently:

Ai = Bi =

1 0 0 0 0 0

0 1 0 0 0 0

0 0 1 0 0 0

0 0 0 0 0 0

0 0 0 0 0 0

0 0 0 0 0 0

pi =

1

2

3

p4

p5

p6

.

Note that the values of p4 to p6 are irrelevant, since only the product Bipi is ever necessary.

4.4.2 Line Constraints

The line constraint fixes chosen vertices to an arbitrary line. The projection position xn

of a vertex vn is the closest point on the line. A line in a 3 dimensional space is definedby

l (λ) = o + λd. (4.2)

A point xn on a line is closest to a vertex position vn if the vector xn − vn is orthogonalto the line. Consequently xn can be found by solving:

(xn − vn) · d = 0.

When substituting xn = o + λd, this amounts to

λ =d · (vn − o)

|d|2

14

Page 23: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

4.4 Constraints

xn = l (λ)

The line constraint can be implemented analogously to the position constraint. All Ai

matrices are identical and the projection can be performed as described in Algorithm 4.Merely xn is no longer constant but equals l (λ). λ changes in every iteration.

4.4.3 Edge Constraints

The edge constraint requires every edge to preserve its initial length. To this end theinitial length of every edge is calculated and saved at initialization

le = ‖v1 − v0‖

where v1 and v0 are the positions of the vertices of the edge at initialization. Oneconstraint is generated per edge.

Projection

The closest points x1 and x0, to v1 and v0 have to be found, so that

‖x1 − x0‖ = le

This as well as the manipulation of b can be done as seen in Algorithm 5,

Algorithm 5: Edge Projection

1 for each edge e do2 direction = v1 − v0

3 direction.normalize()4 mid = v1+v0

2

5 x0 = mid− le2direction

6 x1 = mid + le2direction

7 ptotal = ATB ptotal

8 for j = 0 to j = 2 do9 b[3n0 + j] + = wiptotal[j]

10 b[3n1 + j] + = wiptotal[j + 3]

11 end

12 end

where n0 and n1 refer to the numbers of v0 and v1. ptotal ∈ IR6 contains the projectedpositions x0 and x1. This is done in order to perform the multiplication you see in line 7in a convenient manner.

15

Page 24: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

4 Implementation and Constraints

Line 7 is unnecessary if A and B are the identity matrix. If this is the case, the algorithmwill work, but only poorly, since changes propagate very slowly through the mesh. It hasbeen found that by choosing

A = B =

12−1

2

−12

12

⊗ I3 (4.3)

changes propagate much faster through the system, since these matrices cancel out globaltranslation [BDS+12]. In (4.3) ⊗ denotes the Kronecker product. It is quiet difficult toexplain this effect in an intuitive way.

System Matrix

A and B as presented in the section above are ∈ IR6×6. In order to calculate the systemmatrix we need a matrix Ai ∈ IR3m×3m that performs the same operation when appliedto q ∈ IR3m. This can be achieved by setting Ai as described in Algorithm 6.

Algorithm 6: Calculation of Ai for Edge Constraints

1 for each edge e do2 for j = 0 to j = 2 do3 Ai[3n0 + j, 3n0 + j] = 0.54 Ai[3n1 + j, 3n1 + j] = 0.55 Ai[3n0 + j, 3n1 + j] = −0.56 Ai[3n1 + j, 3n0 + j] = −0.5

7 end

8 end

4.4.4 Bending Constraints

The bending constraint is derived from continuum mechanics and requires the magnitudeof the Laplace vector of every vertex to stay constant over time. This translates intobending energies. One constraint is generated per vertex vn. The potentials are of theform

Wi (q) =wi

2A

∣∣∣∣∣∣∣∣vf −vf ||vg||2||vf ||2

∣∣∣∣∣∣∣∣22

(4.4)

where vf and vg are the current and the initial Laplace vector of vn and A denotes theVoronoi area [BML+14]. W (q) measures the deviation of the current Laplace vector vf

from the perfectly rotated initial Laplace vector vg. Consequently, the potential does notdepend on the orientation of vf but only on its magnitude.

We will use discrete Laplace vectors that take the cotangent weights of the edges surround-ing a vertex as well as the Voronoi area into account [BKP+10]. This Laplace vector isnot well behaved for boundary vertices. Consequently, constraints are only generated forvertices within the mesh.

16

Page 25: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

4.4 Constraints

System Matrix

In order to implement these potentials, matrices Ai must be found such that vf = Aiq.When implementing Ai for every vertex, as suggested by Algorithm 7, the product Aiqresults in a vector with 3 non-zero entries which equal the Laplace vector of vn. This caneasily be checked by calculating the Laplace vector in a traditional manner and comparingthe results.

Algorithm 7: Bending Constraint - Calculation of A

1 for each vertex vn do2 weightSum = 03 for all halfedges surrounding vn hedg do4 weightsum + = cotanweight(hedg)5 for j=0 to j=2 do

6 Ai[3n+ j, 3nedg + j] = cotanweight(hedg)2∗voronoiArea(vn)

7 end

8 end9 for j=0 to j=2 do

10 Ai[3n+ j, 3n+ j] = − −weightSum2∗voronoiArea(vn)

11 end

12 end

Where nedg denotes the number of the vertex at the end of a halfedge (hedg).

Projection

Calculating the Projection Positions

In contrast to the constraints presented so far, it is not possible to compute concretepositions for all vertices involved in the constraint. Instead, computing the product Bipi

directly corresponds to computing a rescaled current Laplace vectorvf ||vg ||2||vf ||2

.

However, using the current Laplace vector in the projection step will yield unstable results.This is due to the fact that we need to use consistent values for vf . At initialization wecalculate the system matrix Y with matrices Ai that contain cotangent weights as wellas Voronoi areas associated with the initial vertex positions q. It is important to use thesame matrices Ai in the projection step for the calculation of vf = Aiq. Ai are constantmatrices, calculated at initialization and q are the current positions. We calculate vf

with current positions and old cotangent weights and Voronoi areas. For further detailssee Algorithm 8.

17

Page 26: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

4 Implementation and Constraints

Manipulating b

Let us remember the form of the right hand side of our linear system:

b =M

h2sn +

∑i

wiATi Bipi

b is initialized by b = Mh2 sn. Bipi is known and will from here on be addressed as pi. It is

necessary to perform a direct manipulation of b in order to keep performance high. Thefollowing reflections lead us to Algorithm 8.

pi contains only zeros, save 3 entries stored at p3n. These 3 numbers are the projectedLaplace of vn. Ai contains entries at A3n,3n to A3n+2,3n+2 and multiple other entries inthe same rows associated to the surrounding vertices. For further details see Algorithm7. If this matrix is transposed, all entries corresponding to the surrounding vertices arelocated in 3 columns at positions AT

3ns,3nto AT3ns+2,3n+2 , where ns denotes the numbers

of all surrounding vertices. Since all entries of pi are at p3n to p3n+2 the product ATi pi

results in a vector which has entries at the locations ns and n. These results are addeddirectly to the appropriate position of b as can be seen in Algorithm 8.

Algorithm 8: Bending Constraint Projection

1 for all vertices vn do2 if vn is not boundary then

// Calculate the Laplace vector Aiq3 weightSum = 04 laplace = (0, 0, 0)5 for all halfedges around vn hedg do6 weightSum + = cotanweight(hedg)

7 laplace + = cotanweight(hedg)2 voronoiArea(vn)

vhedg

8 end

9 laplace − = cotanweight(hedg)2 voronoiArea(vn)

vn

// Rescale laplace10 laplace.normalize()11 laplace ∗ = initiallaplace(vn).length()12 // finalize b13 for all halfedges surrounding v hedg do14 for j = 0 to j = 2 do

15 b[3nedg + j]+ = wi cotanweight(hedg)2

laplace[j]16 end

17 end18 for j = 0 to j = 2 do

19 b[3nv + j]− = wi weightSum2

laplace[j]20 end

21 end

22 end

18

Page 27: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

4.4 Constraints

Note that cotanweight(hedg), voronoiarea(vn) and initiallaplace (vn) refer to valueswhich have been calculated and stored at system initialization. vhedg and nedg denote theposition and number of the vertex at the end of an halfedge (hedg).

19

Page 28: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit
Page 29: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

5 Forces

Arbitrary external forces can be implemented in the Projective Dynamics framework ofwhich three are presented here. As written in Chapter 3 all external forces are stored infext ∈ IR3m.

5.1 Gravity

Newton’s law of gravitation for two bodies with masses m1 and m2 reads:

F = Gm1m2

r2(5.1)

where r denotes the distance between the two bodies and G the gravitational constant.However, G is very small (G = 6, 673 · 10−11 m3

kg s2), so that even the interaction between

very large everyday objects such as cars or buildings is negligibly. The only relevantgravitational force stems from the earth, which has a fixed mass (5.97219 · 1024 kg).In addition, the distance from the earth core is always the same on the earth surface.Consequently, the substitution g = G m1

r2is usually performed. This leads to

F = mg. (5.2)

with g =

0

0

−9.81

on the earth’s surface. m denotes the object’s mass. Usually, gravity

operates on all vertices.

5.2 Mouse-Spring Force

A spring’s force is determined by Hooke’s law

F0 = k (|x1 − x0| − L) (5.3)

F1 = −F0

21

Page 30: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

5 Forces

The force of a spring is proportional to the deviation of the spring’s current length|x1 − x0|, from its restlength L. k is the spring constant.

To implement a mouse-spring force between a vertex vn with position vn and the mousecourser, it is necessary to define a position m in 3 dimensional space for the mouse courser.This position must allow the user to drag an object along the screen’s surface. This canbe achieved by choosing m to be

m = T−1

x

y

z

where x and y denote the mouse coordinates, z the z-buffer value of vn and

T = WPVM

where W is the viewport matrix, P the projection matrix, V the view matrix and M themodel matrix.

5.3 Windforce

The force which the wind imparts on an object is proportional to the area the windperceives of the object. The windforce per triangle reads

F = A (n · d)n (5.4)

where A is the area of the triangle, n the normal vector and d the direction of the wind.Unfortunately, it is not possible to apply forces per triangle, but only per vertex. Sincewe only deal with triangle meshes, the force applied per vertex is F

3. Note that windforce

is added multiple times per vertex, depending on the number of triangles adjacent to avertex. This results in pleasing behavior, since the windforce is weighted by the area ofthese triangles.

22

Page 31: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

6 Results

In this chapter some qualitative tests concerning the performance of Projective Dynamics,as implemented by the author of this thesis, are performed. Red vertices mark positionconstraints and testforces.

6.1 Stability

Since Projective Dynamics uses Implicit Euler Integration, the animation should be un-conditionally stable. Major causes of instability in common animation frameworks arelarge forces and time steps. As we can see in Figure 6.1 meshes stay intact even underthe influence of extreme forces and large time steps.

Figure 6.1: Stresstest of a curtain animated by edge constraints under extreme windforcesfor time step h = 1 (left) and h = 8 (right).

Additionally, unstable behavior under the sudden change of position constraints is think-able. However, this is not the case. An example for this can be seen in Figure 6.2. For theright configuration of constraints bodies stay intact even after being subjected to changingposition constraints and extreme external forces.

6.2 Damping

Damping is a common problem associated with Implicit Euler Integration. However,Projective Dynamcis hopes to partially overcome this burden by the momentum term inEquation (3.5). To test the damping dependence on the number of iterations performed

23

Page 32: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

6 Results

Figure 6.2: A torus animated with edge and bending constraint under the effects of sud-denly changing position constraints.

Figure 6.3: Applying a testforce to a flag

per time step we apply a testforce to a curtain (see Figure 6.3) and measure the sumof the speed of all vertices. We can directly plot the total speed to examine energy andmomentum conservation since the mass of every vertex equals one.

vsum =∑n

vn

The setup is as follows: The curtain is hanging by its corners, held by position constraints,animated by edge constraints and is at rest under the influence of gravity. A testforceacts on a vertex in the middle of the curtain pulling in the z-direction for a duration of 30frames. After that, the testforce disappears and the system is free to evolve on its own.The testforce acts for 30 frames instead of a fixed time because for a large number ofiterations the frame rate is not constant. For the same reason vsum is always measuredfor 900 frames from the moment the testforce starts acting on the vertex. Note that noexplicit damping force like air resistance is added to the system

Expectation: If there were no damping in the system, we would expect a curve in the roughshape of a sinus wave with some irregularities but overall constant amplitude. We wouldexpect this behavior because after the testforce stops acting on the vertex the curtaincomes to rest before gravity pulls it down translating gravitational potential energy intokinetic energy. After that, the curtain swings to the other side trading momentum forpotential energy and the process repeats. However, since the test force acts on only onevertex, we expect wrinkles and chaotic behavior leading to irregularities in the resultingcurve.

The results for one iteration per time step can be seen in Figure 6.4. We can see thatthere is implicit damping, since the overall amplitude decreases.

24

Page 33: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

6.3 Intuitive Realism

Figure 6.4: Damping behavior for one iteration per time step.

Figure 6.5: Damping behavior for 5 iterations per time step.

Interestingly, the damping decreases for 5 iterations per time step (Figure 6.5) and theinitial total momentum after the testforce’s influence is higher. This is presumably thecase since changes propagate faster through the system for a higher number of iterations.Furthermore, the above mentioned irregularities are larger. This is due to the fact thatthe curtains behavior converges further to an optimal solution leading to more wrinklesand folds. Consequently, the transition between potential and kinetic energy no longerproduces a smooth curve.

For 20 iterations per time step (Figure 6.6) we can see little difference to the previouscase showing us that the solution converges. However, the irregularities are even larger.

Note that a complex system was chosen on purpose for this test, in order to test arealistic object’s behavior. We can conclude that Projective Dynamics does not overcomethe burden of Implicit Euler Integration completely but the damping behavior becomesbetter up to a certain threshold with an increasing number of iterations per time step.

6.3 Intuitive Realism

Since intuitive realism is a subjective phenomenon by definition, the only way to measureit reliably is by a study with multiple test subjects. However, since this was not possible in

25

Page 34: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

6 Results

Figure 6.6: Damping behavior for 20 iterations per time step.

the context of this thesis, this section only contains a subjective report from the author’spoint of view.

The implemented constraints provided intuitively good material properties. Especiallywith high numbers of iterations, objects like curtains produced very convincing folds andwrinkles. It is even possible to observe waves going out from points of disturbance. Ifbending constraints are added, the mesh acquires a behavior not unlike sheet metal (SeeFigure 6.7). For an expanded body like a hand, bending constraints ensure that unlessextreme forces are applied the mesh stays intact and is still recognizable as a hand afterthe influence of external forces. Considering that it is possible to implement a large varietyof constraints and weigh those differently for every mesh, it can be expected that an artistis able to create a wide range of realistic seeming material properties.

For one iteration per time step the animated mesh only faintly rotates under the influenceof torque. However, this flaw vanishes quickly with an increasing number of iterations pertime steps.

Figure 6.7: The left curtain is animated by edge and bending constraint. Even under astrong mouse force it does not wrinkle. The behavior reminds of sheet metal. The rightcurtain is animated only by edge constraints. This picture was taken very shortly after aforce stopped acting on a vertex in the middle of the mesh. Notice how the disturbancehas not yet spread to the edges of the tissue.

26

Page 35: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

6.4 Initialisation of q

6.4 Initialisation of q

It has been found that the initialization of q with sn is only beneficial for a larger numberof iterations. For only one iteration the Explicit Euler step performed by this initializationdominates slightly over the constraints, leading to a twitching behavior.

6.5 Performance

As implemented by the author of this thesis, the application is able to simulate mesheswith roughly 1000 vertices and 2500 edge and bending constraints with 60 frames persecond and up to 5 iterations per time step. However, the code is not perfectly optimized.Consequently no statement concerning the performance of Projective Dynamics can bemade at this point.

27

Page 36: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit
Page 37: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

7 Conclusion

The chief aim of this thesis was to give the reader a good intuitive and mathematicalunderstanding of Projective Dynamics as well as details concerning the constraints and theimplementation. The high grade of detail in Chapter 3 and 4 hopefully provided enoughinformation to avoid misunderstandings that easily arise when dealing with mathematicalsystems of such complexity.

The tests performed in Chapter 6 confirm the behavior reported by [BML+14]. ProjectiveDynamcis exhibits implicit damping which decreases with the number of iteration pertime step up to a certain threshold. A wide range of materials can be modeled and theanimated mesh’s behavior is intuitively pleasing. Projective Dynamcis has proven to beunconditionally stable.

For further work it is possible to add new constraints to the framework. Further con-straints mentioned in [BML+14] are area, volume and collision constraints. It might bepossible to define a constraint set δ (pi) as the surface of a target mesh. In combina-tion with further constraints that prevent that all vertices agglomerate on one spot ofthe target mesh it might be possible to animate the transformation of a source mesh tothe target mesh. An example for this is a dog that transforms itself into a cat in realtime. Furthermore, it is possible to speed up the calculation of Y by calculating wiA

Ti Ai

implicitly and adding the results at the appropriate places of Y. Finally, the projectionstep can be transfered to the graphics card.

29

Page 38: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit
Page 39: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

Appendix A

1 Multimedia CD

31

Page 40: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit
Page 41: Bachelorarbeit Projective Dynamcis - graphics.uni-bielefeld.de · only mass-spring-systems. Furthermore, when explicit integration is used, stability is a Furthermore, when explicit

Bibliography

[BDS+12] Sofien Bouaziz, Mario Deuss, Yuliy Schwartzburg, Thibaut Weise, and MarkPauly. Shape-up: Shaping discrete geometry with projections. In ComputerGraphics Forum, volume 31, pages 1657–1667. Wiley Online Library, 2012.

[BKP+10] Mario Botsch, Leif Kobbelt, Mark Pauly, Pierre Alliez, and Bruno Levy. Poly-gon mesh processing. CRC press, 2010.

[BML+14] Sofien Bouaziz, Sebastian Martin, Tiantian Liu, Ladislav Kavan, and MarkPauly. Projective dynamics: fusing constraint projections for fast simulation.ACM Transactions on Graphics (TOG), 33(4):154, 2014.

[Clo90] Ray W. Clough. Original formulation of the finite element method. FiniteElements in Analysis and Design, 7:89–101, 1990.

[MHHR07] Matthias Muller, Bruno Heidelberger, Marcus Hennix, and John Ratcliff. Po-sition based dynamics. Journal of Visual Communication and Image Repre-sentation, 18(2):109–118, 2007.

[Pre07] William H Press. Numerical recipes 3rd edition: The art of scientific comput-ing. Cambridge university press, 2007.

33