Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
10e2e6e
[#75] added tex of comp, notebook, beginning of code modif
lasofivec May 21, 2021
6c60f4d
added notebook and erased useless tex file
lasofivec May 21, 2021
b8eb6e2
new notations
lasofivec May 21, 2021
50e5a8e
[#75] Started updating notes on SA for triangle
Didou09 May 21, 2021
df151fb
corrections in comp
lasofivec May 22, 2021
298ef6e
corrections in comp
lasofivec May 22, 2021
7226d2f
[#75] Advanced formulas for ABC
Didou09 May 23, 2021
a956e5e
update tex
lasofivec May 24, 2021
97fb058
merged with remote
lasofivec May 24, 2021
5dc7c68
updating skeleton
lasofivec May 26, 2021
f1ab24d
[#75] almost done with SA tetra comp
lasofivec May 31, 2021
152c831
[#75] algo complete missing tests
lasofivec Jun 1, 2021
3d87f1d
[#75] added comp only if on right side of poly
lasofivec Jun 1, 2021
175ea37
[#75] solved three mem allocs (with prints)
lasofivec Jun 16, 2021
e16d5b2
[#75] debugging stripes in result
lasofivec Jun 17, 2021
c0876e3
[#75] working but doesnt look like right answer
lasofivec Jun 24, 2021
4917798
Merge branch 'devel' into Issue#75_sa_triangle
lasofivec Jul 1, 2021
f9d103d
pep8
lasofivec Jul 1, 2021
13cce01
[#75] merged with devel
lasofivec Sep 21, 2021
a009f53
merged with remote
lasofivec Sep 21, 2021
6503f35
Merge remote-tracking branch 'origin/master' into Issue#75_sa_triangle
lasofivec Oct 6, 2021
60dd050
Merge remote-tracking branch 'origin/devel' into Issue#75_sa_triangle
lasofivec Oct 6, 2021
88ab750
found one bug
lasofivec Oct 6, 2021
e9b1d43
Merge remote-tracking branch 'origin/devel' into Issue#75_sa_triangle
lasofivec Oct 11, 2021
b642dc4
cleaning
lasofivec Oct 11, 2021
cde3558
all tests passing, corrected isreflex function
lasofivec Oct 12, 2021
320fb8c
found bug since GG is checking memory boundaries
lasofivec Oct 12, 2021
1961a63
corrected bug
lasofivec Oct 12, 2021
c1a071d
reverted back all tests
lasofivec Oct 12, 2021
08624ec
full test sa_map_poly with all option
lasofivec Oct 12, 2021
f3e2766
Merge remote-tracking branch 'origin/devel' into Issue#75_sa_triangle
lasofivec Nov 10, 2021
7a028ab
added pdf
lasofivec Nov 10, 2021
a05983d
added other pdf
lasofivec Nov 10, 2021
8a30c8f
[bf] corrected earclipping of triangle
lasofivec Nov 10, 2021
fdf8344
[notes upgrade] corrected calculus errors in SA_tetra tex/pdf
lasofivec Nov 15, 2021
68e719d
[merge] merged with devel (kevin changes)
lasofivec Nov 29, 2021
87ac8dd
found error in test that was making tests fail
lasofivec Nov 29, 2021
7a76929
fixed a bug
lasofivec Dec 21, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ build/
# Tex files
*.aux
*.log
*.synctex.gz
*.out
*.toc

Expand Down
386 changes: 386 additions & 0 deletions Notebooks/solid_angle_triangle.ipynb

Large diffs are not rendered by default.

Binary file added Notes_Upgrades/SA_tetra/LM_version.pdf
Binary file not shown.
216 changes: 216 additions & 0 deletions Notes_Upgrades/SA_tetra/LM_version.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
\documentclass[10pt,a4paper]{article}
\usepackage[margin=0.5in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{cancel}
\usepackage{graphicx}

\title{Solid angle subtended by a tetrahedron computation}
\begin{document}

\maketitle


\includegraphics[scale=0.4]{tetra.png}


\section{Notations}

Let

\begin{itemize}
\item $A$ be the vector $\vec{OA}$
\item $B$ be the vector $\vec{OB}$
\item $C$ be the vector $\vec{OC}$
\item $a$ be the vector $\vec{GA}$
\item $b$ be the vector $\vec{GB}$
\item $c$ be the vector $c$
\item $\mathbf{A}$ be the magnitude of the vector $\vec{OA}$
\item $\mathbf{B}$ be the magnitude of the vector $\vec{OB}$
\item $\mathbf{C}$ be the magnitude of the vector $\vec{OC}$
\end{itemize}

\section{Computation}

The solid angle $\Omega$ subtended by the triangular surface $ABC$ is:

$$
{\displaystyle \tan \left({\frac {1}{2}}\Omega \right)
= {\frac {\left|{A}\ {B}\ {C}\right|}
{\mathbf{A}\mathbf{B}\mathbf{C} + \left({A}\cdot {B}\right)\mathbf{C}
+ \left({A}\cdot {C}\right)\mathbf{B}
+ \left({B}\cdot {C}\right)\mathbf{A}}}}
$$

where $ \left|{A}\ {B}\ {C}\right|={A}\cdot ({B}\times {C}) $


\subsection{Numerator}


Given that $A = \vec{OA} = G + a$ (and resp.
with $B$ and $C$), we get


\begin{align*}
\left|{A}\ {B}\ {C}\right|
& = {A} \cdot ({B}\times {C}) \\
& = {A} \cdot ({(G + b)} \times {(G + c)}) \\
& = {(G + a)} \cdot (\cancel{G \times G}
+ G \times c
+ b \times G
+ b \times c) \\
& = \cancel{G \cdot (G \times c)}
+ \cancel{G \cdot (b \times G)}\\
& + G \cdot (b \times c)
+ a \cdot (G \times c)
+ a \cdot (b \times G)
+ \cancel{a \cdot (b \times c)} \\
& = G \cdot (b \times c)
+ G \cdot (c \times a)
+ G \cdot (a \times b) \\
& = G \cdot \left(b \times c
+c \times a
+ a \times b \right)
\end{align*}

since $G$ is the centroid of $ABC$,

\begin{equation}
a + b + c= 0
\label{eq1}
\end{equation}. We obtain

\begin{align}
\left|{A}\ {B}\ {C}\right|
& = G \cdot \left(b \times c
+c \times a
+ a \times b \right) \nonumber \\
& = G \cdot \left(b \times c
+c \times (-b - c)
+ (-b - c) \times b \right) \nonumber \\
& = G \cdot \left(b \times c
+c \times (-b) + \cancel{c \times (- c)}
+ \cancel{(-b) \times b} + (- c) \times b \right) \nonumber \\
& = G \cdot \left(3 b \times c \right) \nonumber \\
& = 3 G \cdot \left( b \times c \right)
\end{align}

\subsection{Denominator}


First let's see the term in $\mathbf{C}$
\begin{align*}
\left({A}\cdot {B}\right)\mathbf{C}
=& \left( G + a \right) \cdot \left( G + b \right) \mathbf{C} \\
=& (\mathbf{G}^2 + G \cdot b + a \cdot G + a \cdot b ) \mathbf{C}
\end{align*}

Using \eqref{eq1}

\begin{align}
\left({A}\cdot {B}\right)\mathbf{C}
=& (\mathbf{G}^2 + G \cdot b + (-b - c) \cdot G + (-b - c) \cdot b ) \mathbf{C} \nonumber \\
=& (\mathbf{G}^2 - G \cdot c - c \cdot b -\mathbf{b}^2)\mathbf{C}
\end{align}



Now, the term in $\mathbf{B}$


\begin{align*}
\left({A}\cdot {C}\right)\mathbf{B}
=& \left( G + a \right) \cdot \left( G + c \right) \mathbf{B} \\
=& (\mathbf{G}^2 + G \cdot c + a \cdot G + a \cdot c ) \mathbf{B}
\end{align*}

Using \eqref{eq1}

\begin{align}
\left({A}\cdot {C}\right)\mathbf{B}
=& (\mathbf{G}^2 + G \cdot c + (-b - c) \cdot G + (-b - c) \cdot c ) \mathbf{B} \nonumber \\
=& (\mathbf{G}^2 - G \cdot b - c \cdot b - \mathbf{c}^2)\mathbf{B}
\end{align}


For the third term there is no simplification

\begin{align}
\left({B}\cdot {C}\right)\mathbf{A}
=& \left( G + b \right) \cdot \left( G + c \right) \mathbf{A}\\
=& (\mathbf{G}^2 + G \cdot b + G \cdot c + c \cdot b)\mathbf{A}
\end{align}


For the computation of the norms, we can use:

\begin{align*}
\mathbf{A}^2 &= ||OG||^2 + \mathbf{a}^2 + 2 G \cdot a \\
&= (G+a) \cdot (G+a) \\
&= (G-b-c) \cdot (G-b-c) \\
\end{align*}

and respectively with B and C, we obtain


\begin{align}
(\mathbf{A}\mathbf{B}\mathbf{C}) &= ||G-b-c||^2\,||G+b||^2\,||G+c||^2
\end{align}

and


\begin{align}
\left({A}\cdot {B}\right)\mathbf{C}
+& \left({A}\cdot {C}\right)\mathbf{B}
+ \left({B}\cdot {C}\right)\mathbf{A} \\ \nonumber
=& \mathbf{G}^2 (\mathbf{A} + \mathbf{B} + \mathbf{C})
+ c \cdot b (\mathbf{A} - \mathbf{B} - \mathbf{C})
+ G \cdot b (\mathbf{A} - \mathbf{B})
+ G \cdot c (\mathbf{A} - \mathbf{C})
- ||b||^2\, \mathbf{C} - ||c||^2\, \mathbf{B}
\end{align}


\section{Final formula}


$$
{\displaystyle \tan \left({\frac {1}{2}}\Omega \right)
= {\frac {3 G \cdot \left( b \times c \right)}
{\mathbf{A}\mathbf{B}\mathbf{C} + \left({A}\cdot {B}\right)\mathbf{C}
+ \left({A}\cdot {C}\right)\mathbf{B}
+ \left({B}\cdot {C}\right)\mathbf{A}}}}
$$

we get

$$
{\displaystyle \tan \left({\frac {1}{2}}\Omega \right)
= {\frac {3 G \cdot \left( b \times c \right)}
{\mathbf{A}\mathbf{B}\mathbf{C} +
(\mathbf{G}^2 - G \cdot c - c \cdot b)\mathbf{C}
+ (\mathbf{G}^2 - G \cdot c - c \cdot b)\mathbf{B}
+ \left( G + b \right) \cdot \left( G + c \right) \mathbf{A}
}}}
$$

or

$$
{\displaystyle \tan \left({\frac {1}{2}}\Omega \right)
= {\frac {3 G \cdot \left( b \times c \right)}
{\mathbf{A}\mathbf{B}\mathbf{C} +
\mathbf{G}^2 (\mathbf{A} + \mathbf{B} + \mathbf{C})
+ c \cdot b (\mathbf{A} - \mathbf{B} - \mathbf{C})
+ G \cdot b (\mathbf{A} - \mathbf{B})
+ G \cdot c (\mathbf{A} - \mathbf{C})
}}}
$$


\end{document}
Binary file added Notes_Upgrades/SA_tetra/SA_tetra.pdf
Binary file not shown.
Loading