diff --git a/docs/documentation.aux b/docs/documentation.aux
index a6516aa35160d38c4dd08aa71286f0704b6a190f..e616d66da8308aef6d3236728e5a4ed9cc59b3bf 100644
--- a/docs/documentation.aux
+++ b/docs/documentation.aux
@@ -87,19 +87,24 @@
 \bibcite{PixarVolumetricHair}{{4}{2006}{{Petrovic et~al\mbox  {.}}}{{Petrovic, Henne, and Pixar}}}
 \bibcite{RappRealTime}{{5}{2014}{{Rapp}}{{Rapp}}}
 \bibcite{UmenhofferSimulation}{{6}{2016}{{Umenhoffer et~al\mbox  {.}}}{{Umenhoffer, Marschal, and Suti}}}
-\newlabel{tocindent-1}{0pt}
-\newlabel{tocindent0}{0pt}
-\newlabel{tocindent1}{6.95pt}
-\newlabel{tocindent2}{12.72998pt}
-\newlabel{tocindent3}{0pt}
+\citation{MullerPBD}
 \@writefile{toc}{\contentsline {section}{Acknowledgments}{7}{section*.10}\protected@file@percent }
 \@writefile{toc}{\contentsline {section}{References}{7}{section*.12}\protected@file@percent }
 \@writefile{toc}{\contentsline {section}{\numberline {A}Constraint Projection}{7}{appendix.A}\protected@file@percent }
 \newlabel{appendix:ConstraintProjection}{{A}{7}{Constraint Projection}{appendix.A}{}}
-\@writefile{toc}{\contentsline {section}{\numberline {B}Supplementary development}{7}{appendix.B}\protected@file@percent }
-\@writefile{toc}{\contentsline {subsection}{\numberline {B.1}OBJ Reader}{7}{subsection.B.1}\protected@file@percent }
-\newlabel{section:appendixOBJ}{{B.1}{7}{OBJ Reader}{subsection.B.1}{}}
-\@writefile{lot}{\contentsline {table}{\numberline {1}{\ignorespaces Supported OBJ Data Types\relax }}{7}{table.caption.13}\protected@file@percent }
-\newlabel{tab:objdatatypes}{{1}{7}{Supported OBJ Data Types\relax }{table.caption.13}{}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {B.2}Recording the simulation on-the-fly}{7}{subsection.B.2}\protected@file@percent }
-\newlabel{TotPages}{{7}{7}{}{page.7}{}}
+\newlabel{eq:linear_momentum}{{2}{7}{Constraint Projection}{equation.A.2}{}}
+\newlabel{eq:angular_momentum}{{3}{7}{Constraint Projection}{equation.A.3}{}}
+\newlabel{eq:approximation}{{4}{7}{Constraint Projection}{equation.A.4}{}}
+\newlabel{eq:restrictingLambda}{{5}{7}{Constraint Projection}{equation.A.5}{}}
+\newlabel{tocindent-1}{0pt}
+\newlabel{tocindent0}{0pt}
+\newlabel{tocindent1}{6.95pt}
+\newlabel{tocindent2}{13.30998pt}
+\newlabel{tocindent3}{0pt}
+\@writefile{toc}{\contentsline {section}{\numberline {B}Supplementary development}{8}{appendix.B}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {B.1}OBJ Reader}{8}{subsection.B.1}\protected@file@percent }
+\newlabel{section:appendixOBJ}{{B.1}{8}{OBJ Reader}{subsection.B.1}{}}
+\@writefile{lot}{\contentsline {table}{\numberline {1}{\ignorespaces Supported OBJ Data Types\relax }}{8}{table.caption.13}\protected@file@percent }
+\newlabel{tab:objdatatypes}{{1}{8}{Supported OBJ Data Types\relax }{table.caption.13}{}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {B.2}Recording the simulation on-the-fly}{8}{subsection.B.2}\protected@file@percent }
+\newlabel{TotPages}{{8}{8}{}{page.8}{}}
diff --git a/docs/documentation.log b/docs/documentation.log
index 298d32a4316cb7b585335770b9eb94c8ba70a385..10590d526fa7244ec14a9e785855433b9ced2d8a 100644
--- a/docs/documentation.log
+++ b/docs/documentation.log
@@ -1,4 +1,4 @@
-This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex 2020.12.8)  10 DEC 2020 21:09
+This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex 2020.12.8)  10 DEC 2020 22:27
 entering extended mode
  restricted \write18 enabled.
  %&-line parsing enabled.
@@ -1454,14 +1454,14 @@ Underfull \hbox (badness 10000) in paragraph at lines 111--118
 / MarkusRapp -[] MasterThesis -[]
  []
 
-)
-Overfull \hbox (11.38634pt too wide) in paragraph at lines 809--812
+) [7.7]
+Overfull \hbox (11.38634pt too wide) in paragraph at lines 913--916
 \T1/LinuxLibertineT-TLF/m/n/10 (-20) at 24 FPS, with the nam-ing con-ven-tion r
 en-derXXXX[.bmp/.png],
  []
 
 
-Overfull \hbox (3.58836pt too wide) in paragraph at lines 814--818
+Overfull \hbox (3.58836pt too wide) in paragraph at lines 918--922
 \T1/zi4/m/n/10 make_video.sh \T1/LinuxLibertineT-TLF/m/n/10 (-20) script to as-
 sem-ble the \T1/zi4/m/n/10 output.mp4 \T1/LinuxLibertineT-TLF/m/n/10 (-20) and 
 delete
@@ -1474,21 +1474,21 @@ Class acmart Warning: Some images may lack descriptions.
 Package balance Warning: You have called \balance in second column
 (balance)                Columns might not be balanced.
 
-[7.7]
-Package atveryend Info: Empty hook `BeforeClearDocument' on input line 820.
-Package atveryend Info: Empty hook `AfterLastShipout' on input line 820.
+[8.8]
+Package atveryend Info: Empty hook `BeforeClearDocument' on input line 924.
+Package atveryend Info: Empty hook `AfterLastShipout' on input line 924.
  (./documentation.aux)
-Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 820.
-Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 820.
+Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 924.
+Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 924.
 Package rerunfilecheck Info: File `documentation.out' has not changed.
 (rerunfilecheck)             Checksum: 3021049AB3DFF0EFC2B5D39C69F0AB95;5688.
  ) 
 Here is how much of TeX's memory you used:
- 30698 strings out of 481239
- 535417 string characters out of 5920377
- 819662 words of memory out of 5000000
- 44727 multiletter control sequences out of 15000+600000
- 722235 words of font info for 369 fonts, out of 8000000 for 9000
+ 30722 strings out of 481239
+ 535825 string characters out of 5920377
+ 819874 words of memory out of 5000000
+ 44731 multiletter control sequences out of 15000+600000
+ 724208 words of font info for 377 fonts, out of 8000000 for 9000
  1302 hyphenation exceptions out of 8191
  63i,18n,100p,804b,719s stack positions out of 5000i,500n,10000p,200000b,80000s
 {/usr/share/texlive/texmf-dist/fonts/enc/dvips/libertine/lbtn_fygcup.enc}{/us
@@ -1502,24 +1502,26 @@ vips/libertine/lbtn_76gpa5.enc}{/usr/share/texlive/texmf-dist/fonts/enc/dvips/l
 ibertine/lbtn_nh77jq.enc}</usr/share/texlive/texmf-dist/fonts/type1/public/inco
 nsolata/Inconsolata-zi4r.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/
 newtx/LibertineMathBMI.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/ne
-wtx/LibertineMathBMI7.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/new
-tx/LibertineMathBRM.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/newtx
-/LibertineMathMI.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/newtx/Li
-bertineMathMI5.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/newtx/Libe
-rtineMathMI7.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/newtx/Libert
-ineMathRM.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/libertine/LinBi
-olinumT.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/libertine/LinLibe
-rtineT.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/libertine/LinLiber
-tineTB.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/libertine/LinLiber
-tineTBI.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/libertine/LinLibe
-rtineTI.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/libertine/LinLibe
-rtineTZ.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/newtx/txmiaX.pfb>
-</usr/share/texlive/texmf-dist/fonts/type1/public/txfonts/txsyb.pfb></usr/share
-/texlive/texmf-dist/fonts/type1/public/newtx/txsys.pfb>
-Output written on documentation.pdf (7 pages, 609498 bytes).
+wtx/LibertineMathBMI5.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/new
+tx/LibertineMathBMI7.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/newt
+x/LibertineMathBRM.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/newtx/
+LibertineMathMI.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/newtx/Lib
+ertineMathMI5.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/newtx/Liber
+tineMathMI7.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/newtx/Liberti
+neMathRM.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/libertine/LinBio
+linumT.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/libertine/LinLiber
+tineT.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/libertine/LinLibert
+ineTB.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/libertine/LinLibert
+ineTBI.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/libertine/LinLiber
+tineTI.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/libertine/LinLiber
+tineTZ.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/newtx/txexs.pfb></
+usr/share/texlive/texmf-dist/fonts/type1/public/newtx/txmiaX.pfb></usr/share/te
+xlive/texmf-dist/fonts/type1/public/txfonts/txsyb.pfb></usr/share/texlive/texmf
+-dist/fonts/type1/public/newtx/txsys.pfb>
+Output written on documentation.pdf (8 pages, 624343 bytes).
 PDF statistics:
- 435 PDF objects out of 1000 (max. 8388607)
- 377 compressed objects within 4 object streams
- 93 named destinations out of 1000 (max. 500000)
+ 467 PDF objects out of 1000 (max. 8388607)
+ 403 compressed objects within 5 object streams
+ 103 named destinations out of 1000 (max. 500000)
  54590 words of extra memory for PDF output out of 61914 (max. 10000000)
 
diff --git a/docs/documentation.pdf b/docs/documentation.pdf
index fa1070241417dcf3db65b4394be5540d2f0f62f9..2bf0c6012304def2dec425ec1869d1e74407cf64 100644
Binary files a/docs/documentation.pdf and b/docs/documentation.pdf differ
diff --git a/docs/documentation.tex b/docs/documentation.tex
index 42dab1617597bf3e9b8cf42daee445f6a6a77b45..ad7954e7257020decc5a40c07d6e26940b40479a 100644
--- a/docs/documentation.tex
+++ b/docs/documentation.tex
@@ -365,7 +365,7 @@ and moving outwards from there.
 
 For projecting the constraints, we utilize the method proposed by
 \citet{MullerPBD}. The details of computing the desired delta positions are
-explained in the Appendix \ref{appendix:ConstraintProjection}
+explained in Appendix \ref{appendix:ConstraintProjection}
 \nameref{appendix:ConstraintProjection}. An example derivation is given in
 Section \ref{section:DistanceConstraint} \nameref{section:DistanceConstraint}.
 
@@ -731,7 +731,111 @@ method and properties.
 \appendix
 
 \section{Constraint Projection} \label{appendix:ConstraintProjection}
-asd
+Projecting a set of points according to a constraint means moving the points
+such that they satisfy the constraint. As we move the points in the
+simulation loop directly, the most important issue is the conservation of linear and
+angular momentum. Let $\Delta \b{p_i}$ be the displacement of particle $i$ by the
+projection. Linear momentum is conserved if 
+
+\begin{equation}
+    \label{eq:linear_momentum}
+    \sum\limits_{i} m_i \Delta \b{p_i} = \b{0},
+\end{equation}
+
+which amounts to conserving the center of mass. Angular momentum is conserved if
+
+\begin{equation}
+    \label{eq:angular_momentum}
+    \sum\limits_{i} \b{r_i} \times m_i \Delta \b{p_i} = 0,
+\end{equation}
+
+where the $\b{r_i}$ are the distances of the $\b{p_i}$ to an arbitrary common
+rotation center. If a projection violates either the preservation of 
+linear or angular momentum, \emph{ghost
+forces} get introduced into the system, which act like external forces dragging
+and rotating the object. However, only internal constraints need to conserve the
+momenta. As we reduce the problem of collision handling to simply moving the
+vertex to a valid point, it is somewhat trivial that for example collision
+constraints are allowed to have global effects on the object.
+
+The method that \citet{MullerPBD} propose conserves both momenta for internal
+constraints. Let us look at a constraint $C$ with cardinality $n$ on the points
+$\b{p_1}, \ldots, \b{p_n}$ with stiffness $k$. We let $\b{p}$ be the
+concatenation $[\b{p_1}^T, \ldots, \b{p_n}^T]^T$. For internal constraints, $C$ is
+independent of translation and rotation, which means that rotating or
+translating the points does not change the value of the constraint function.
+Therefore, the gradient $\nabla_{\b{p}} C$ is the direction of maximal change. If the
+correction $\Delta \b{p}$ is chosen to be along $\nabla C_{\b{p}}$ both momenta
+are automatically conserved if all masses are equal (we handle different masses
+later). Given $\b{p}$ we want to find a correction $\Delta \b{p}$ such that
+$C(\b{p}+\Delta\b{p})=0$. This equation can be approximated by
+
+\begin{equation}
+    C(\b{p}+\Delta\b{p}) \approx C(\b{p}) + \nabla_{\b{p}} C(p)\cdot\Delta
+    p = 0.
+    \label{eq:approximation}
+\end{equation}
+
+Restricting $\Delta \b{p}$ to be in the direction of $\nabla_{\b{p}}C$ means
+choosing a scalar $\lambda$ such that
+
+\begin{equation}
+    \Delta{\b{p}} = \lambda \nabla_{\b{p}}C(\b{p}).
+    \label{eq:restrictingLambda}
+\end{equation}
+
+Substituing Equation \ref{eq:restrictingLambda} into Equation
+\ref{eq:approximation}, solving for $\lambda$ and subsituting back into Equation
+\ref{eq:restrictingLambda} gives us the final formula for $\Delta\b{p}$:
+
+\begin{equation}
+    \Delta \b{p} = - \frac{C(\b{p})}{\lvert \nabla_{\b{p}} C(\b{p})\rvert^2}
+    \nabla_{\b{p}}C(\b{p})
+\end{equation}
+
+which is a regular Newton-Raphson step for the iterative solution of the
+non-linear equation given by a single constraint. For the correction of an
+individual point $\b{p_i}$ we have
+
+\begin{equation}
+    \Delta \b{p_i} = -s\nabla_{\b{p_i}}C(\b{p_1},\ldots,\b{p_n}),
+\end{equation}
+
+where the scaling factor
+
+\begin{equation}
+    s = \frac{C(\b{p_1},\ldots,\b{p_n})}{
+        \sum\limits_{j} \lvert\nabla_{\b{p_j}}C(\b{p_1},\ldots,\b{p_n})\rvert^2
+    }
+\end{equation}
+
+is the same for all points. If the points have individual masses, we weight the
+corrections $\Delta \b{p_i}$ by the inverse masses $w_i = 1/m_i$. In this case
+a point with infinite mass, i.e. $w_i = 0$ for example does not move, just as
+expected. Now Equation \ref{eq:restrictingLambda} is replaced by 
+$$
+\Delta \b{p_i} = \lambda w_i \nabla_{\b{p_i}}C(\b{p})
+$$
+yielding
+
+\begin{equation}
+    s = \frac{
+        C(\b{p_1}, \ldots, \b{p_n})
+    }{
+        \sum\limits_{j}w_j\lvert\nabla_{\b{p_j}}C(\b{p_1},\ldots,\b{p_n})\rvert^2
+    }
+\end{equation}
+
+for the scaling factor and for the final correction 
+
+\begin{equation}
+    \Delta \b{p_i} = -s w_i \nabla_{\b{p_i}}C(\b{p}).
+\end{equation}
+
+
+Section \ref{section:DistanceConstraint} gives an example by considering the
+distance constraint function $C(\b{p_1},\b{p_2}) = \lvert\b{p_1}-\b{p_2}\rvert
+- d$.
 
 
 \section{Supplementary development}