66 lines
4 KiB
TeX
66 lines
4 KiB
TeX
\documentclass[12pt, a4paper]{article}
|
|
|
|
%packages
|
|
\usepackage[ngerman]{babel}
|
|
\usepackage[utf8x]{inputenc}
|
|
%Formel packages
|
|
\usepackage{amsmath}
|
|
\usepackage{amsthm}
|
|
\usepackage{amsbsy}
|
|
\usepackage{amssymb}
|
|
|
|
|
|
\usepackage{enumerate}
|
|
\usepackage{geometry}
|
|
\geometry{a4paper, top=25mm, left=18mm, right=15mm, bottom=30mm,
|
|
headsep=10mm, footskip=12mm}
|
|
|
|
|
|
\begin{document}
|
|
|
|
\section*{Computer Graphics - Excercise 2}
|
|
\subsection*{3.1.1}
|
|
\subsection*{(a)}
|
|
The more obtuse the triangle, the more acute the angle of the corner of the voronoi area gets. Because the both sides of this corner have to be in a 90° angle to the sides of the traingle.
|
|
\subsection*{(b)}
|
|
The formula for calculating the surface of a triangle is: $\frac{1}{2}*h*b$
|
|
As for the red triangle: $\frac{1}{2}*h*b$
|
|
We define: $h=\frac{||\underline{p}_i - \underline{p}_j||}{2}$ and $b=b_1 + b_2$ where $b_1$ is left part of the baseline facing $\alpha_{ij}$ and $b_2$ is the right one facing $\beta_{ij}$. In addition we define the vertex of the traingle facing $\alpha_{ij}$ to be $A$ and the vertex of the triangle facing $\beta_{ij}$ to be $B$. The distance between $p_i$ and $A$ (R) is equal to $\frac{||\underline{p}_i-\underline{p}_j||}{2 sin(\alpha_{ij}}$. It can be assumed that the angle $\underline{p}_S \underline{A} \underline{p}_i=\alpha_{ij}$ with $p_S$ as the vertex where the red triangle crosses the edge from $\underline{p}_i$ to $\underline{p}_j$. As a result it can be assumed that $cos(\alpha_{ij})= \frac{b_1}{R}$ and also $b_1 = cos(\alpha_{ij}) \times R$\\
|
|
As a result the surface of the left part of the red triangle can be calculated:
|
|
\begin{align*}
|
|
A_{\alpha}(i,j)&=\frac{1}{2}\times b_1 \times \frac{||\underline{p}_i- \underline{p}_j||}{2}\\
|
|
A_{\alpha}(i,j)&=\frac{1}{4}\times cos(\alpha_{ij}) \times R\times ||\underline{p}_i- \underline{p}_j||\\
|
|
A_{\alpha}(i,j)&=\frac{1}{4}\times \frac{cos(\alpha_{ij})}{2\times sin(\alpha_{ij})} \times R \times {||\underline{p}_i- \underline{p}_j||}^2\\
|
|
A_{\alpha}(i,j)&=\frac{1}{8}\times cot(\alpha_{ij}) \times R \times {||\underline{p}_i- \underline{p}_j||}^2\\
|
|
\end{align*}
|
|
The same goes for the right side and as a result if we combine both:
|
|
\begin{align*}
|
|
A(i,j)&=\frac{1}{8}\times cot(\alpha_{ij}) \times R \times {||\underline{p}_i- \underline{p}_j||}^2 + \frac{1}{8}\times cot(\beta_{ij}) \times R \times {||\underline{p}_i- \underline{p}_j||}^2\\
|
|
A(i,j)&=\frac{1}{8}\times (cot(\alpha_{ij})+cot(\beta_{ij})) \times R \times {||\underline{p}_i- \underline{p}_j||}^2\\
|
|
\end{align*}
|
|
If we sum up all the triangles T with the index $j$ of the voronoi-area this is the result:
|
|
\begin{align*}
|
|
A_{voronoi-area}(i)&=\sum_{j\in T(i)} \frac{1}{8}\times (cot(\alpha_{ij})+cot(\beta_{ij})) \times R \times {||\underline{p}_i- \underline{p}_j||}^2\\
|
|
A_{voronoi-area}(i)&=\frac{1}{8}\times \sum_{j\in T(i)} (cot(\alpha_{ij})+cot(\beta_{ij})) \times R \times {||\underline{p}_i- \underline{p}_j||}^2\\
|
|
\end{align*}
|
|
\subsection*{3.1.2}
|
|
\subsection*{(a)}
|
|
We know every vertex($v$) has three edges($e$) and 2 faces($f$). In addition every edge($e$) can separated into two half edges ($e_h$), this means $e_h = 2*e = 6*v$.\\
|
|
If we add the memory for every part it results in a formula:\\
|
|
\begin{center}
|
|
memory $= v*16\text{bytes} + e*4\text{bytes} + e_h*16\text{bytes} + f*4\text{bytes}$\\
|
|
$\rightarrow \text{through assumptions:}$\\
|
|
memory $= v*(16+3*4+6*16+2*4)\text{bytes}=v*132\text{bytes}$
|
|
\end{center}
|
|
\subsection*{(b)}
|
|
Because in a quad mash two triangles are combined into one quad, the resulting faces will be reduced by a half. The resulting ratio will be 1:3:1 (for v : e : f)
|
|
\subsection*{(c)}
|
|
We know every vertex($v$) has three edges($e$) and one face($f$). In addition every edge($e$) can separated into two half edges ($e_h$), this means $e_h = 2*e = 6*v$.\\
|
|
If we add the memory for every part it results in a formula:\\
|
|
\begin{center}
|
|
memory $= v*16\text{bytes} + e*4\text{bytes} + e_h*16\text{bytes} + f*4\text{bytes}$\\
|
|
$\rightarrow \text{through assumptions:}$\\
|
|
memory $= v*(16+3*4+6*16+1*4)\text{bytes}=v*132\text{bytes}$
|
|
\end{center}
|
|
\end{document}
|
|
|