2023-05-19 10:24:58 +02:00
|
|
|
\documentclass{usiinfbachelorproject}
|
|
|
|
|
2023-05-28 10:10:28 +02:00
|
|
|
\usepackage[]{caption}
|
|
|
|
\usepackage[]{url}
|
|
|
|
\usepackage[]{subcaption}
|
|
|
|
\usepackage[]{float}
|
2023-06-13 13:44:11 +02:00
|
|
|
\usepackage[]{multicol}
|
2023-05-28 10:10:28 +02:00
|
|
|
|
|
|
|
\usepackage{tikz}
|
|
|
|
\usepackage{tkz-euclide}
|
|
|
|
\usetikzlibrary{external,shapes,through}
|
|
|
|
|
|
|
|
\tikzexternalize[prefix=figures/]
|
|
|
|
\tikzstyle{none}=[]
|
|
|
|
\input{./tikzs/styles.tikzstyles}
|
|
|
|
|
|
|
|
\pgfdeclarelayer{nodelayer}
|
|
|
|
\pgfdeclarelayer{edgelayer}
|
|
|
|
\pgfsetlayers{edgelayer,nodelayer,main}
|
|
|
|
|
|
|
|
\graphicspath{{../figures/}{./figures/}}
|
|
|
|
|
|
|
|
|
2023-06-06 11:24:25 +02:00
|
|
|
\newcommand*{\vv}[1]{\overrightarrow{#1}}
|
|
|
|
|
|
|
|
|
2023-05-28 10:10:28 +02:00
|
|
|
\newcommand*{\figref}[1]{\figurename~\ref{#1}}
|
|
|
|
|
2023-05-19 10:24:58 +02:00
|
|
|
\captionsetup{labelfont={bf}}
|
2023-05-28 10:10:28 +02:00
|
|
|
\newcommand{\diff}{\mathop{}\!\mathrm{d}}
|
2023-05-19 10:24:58 +02:00
|
|
|
|
|
|
|
\author{Arnaud Fauconnet}
|
|
|
|
|
2023-05-28 10:10:28 +02:00
|
|
|
\title{From Flying Balls to Colliding Polygons}
|
2023-05-19 10:24:58 +02:00
|
|
|
\subtitle{2D Physics Engine: Rigid Body Simulation}
|
|
|
|
\versiondate{\today}
|
|
|
|
|
|
|
|
\begin{committee}
|
|
|
|
\advisor[Universit\`a della Svizzera Italiana,
|
|
|
|
Switzerland]{Prof.}{Antonio}{Carzaniga}
|
|
|
|
\end{committee}
|
|
|
|
|
2023-05-28 10:10:28 +02:00
|
|
|
\newcommand{\inputtikz}[2][1]{
|
|
|
|
\resizebox{#1 \textwidth}{!}{
|
|
|
|
\tikzsetnextfilename{#2}
|
|
|
|
\input{../tikzs/#2.tikz}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-19 10:24:58 +02:00
|
|
|
\abstract {
|
|
|
|
Physics engines are a fun and interesting way to learn about a lot of
|
|
|
|
different subjects. First the theoretical concepts, such as the equations
|
|
|
|
that dictate the motion of the objects, together with their components, need
|
|
|
|
to be thoroughly understood. Then there is the necessity of finding a way to
|
|
|
|
represent all of those concepts in a given programming language and to
|
|
|
|
make them as efficient as possible so that the simulation runs fluidly.
|
|
|
|
The task to be completed here was to extend an already existing
|
|
|
|
physics engine that only made circles bounce off each other. The extension
|
|
|
|
was focused on having the ability to generate some arbitrary polygons and
|
|
|
|
make them bounce off each other in a physically accurate way. The main
|
|
|
|
issues that rose up during the development of the extension: determining the
|
|
|
|
inertia of a arbitrary polygon, which is important for realistic
|
|
|
|
impacts; having an accurate collision detection system, which allows the
|
|
|
|
engine to know when to make two polygons bounce off each other. Once those
|
|
|
|
aspects were worked on and polished, the rest of the implementation went
|
|
|
|
smoothly.
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2023-06-13 13:44:11 +02:00
|
|
|
\counterwithin{figure}{section}
|
|
|
|
\counterwithin{equation}{section}
|
2023-05-19 10:24:58 +02:00
|
|
|
|
|
|
|
\usepackage{subfiles} % Best loaded last in the preamble
|
|
|
|
|
|
|
|
\begin{document}
|
|
|
|
\maketitle
|
|
|
|
\tableofcontents
|
2023-05-28 10:14:47 +02:00
|
|
|
\newpage
|
2023-05-19 10:24:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
\subfile{./sections/intro.tex}
|
2023-05-28 10:14:47 +02:00
|
|
|
\newpage
|
2023-05-19 10:24:58 +02:00
|
|
|
\subfile{./sections/tech_background.tex}
|
2023-05-28 10:14:47 +02:00
|
|
|
\newpage
|
2023-05-19 10:24:58 +02:00
|
|
|
\subfile{./sections/theoretical_background.tex}
|
2023-05-28 10:14:47 +02:00
|
|
|
\newpage
|
2023-06-13 22:56:32 +02:00
|
|
|
\subfile{./sections/implementation.tex}
|
2023-05-28 10:14:47 +02:00
|
|
|
\newpage
|
2023-05-19 10:24:58 +02:00
|
|
|
\subfile{./sections/conclusion.tex}
|
2023-05-28 10:14:47 +02:00
|
|
|
\newpage
|
2023-05-19 10:24:58 +02:00
|
|
|
|
|
|
|
%%%%%
|
2023-05-28 10:14:47 +02:00
|
|
|
\bibliographystyle{unsrt}
|
2023-05-19 10:24:58 +02:00
|
|
|
\bibliography{references}
|
2023-05-28 10:14:47 +02:00
|
|
|
\newpage
|
|
|
|
\subfile{./sections/appendix.tex}
|
2023-05-19 10:24:58 +02:00
|
|
|
|
|
|
|
\end{document}
|