added more explanation of algos

This commit is contained in:
Anson 2022-04-27 22:26:26 -07:00
parent aa1866c6c2
commit 684e980455
3 changed files with 47 additions and 2786 deletions

4
.gitignore vendored
View File

@ -1,3 +1,5 @@
.jupyter_cache
*.log
*.tex
*.tex
*.html
*.pdf

File diff suppressed because one or more lines are too long

View File

@ -39,16 +39,26 @@ of space debris are more thoroughly understood, we can begin mitigating the crea
future space debris by implementing improved satellite construction methods and more advanced debris
avoidance measures.
### Current Progress
## Current Progress
This project aims to fix very difficult issues, and although great progress has been made there is
still plenty of work to be done. Currently, algorithms have been made that are capable of getting
many key features from solid ^[A mesh with a surface that is fully closed and has no holes in its
geometry.] models that are in the `stl` format. The algorithm for processing the 3D meshes is
implemented in the Julia programming language. Syntactically the language is very similar to Python
and Matlab. Julia was chosen because it is nearly as performant as compiled languages like C, while
still having tooling geared towards engineers and scientists. The code produces a struct with all
the calculated properties as follows:
geometry.] models that are in the `stl` format. Processing the 3D scans produced by the scanner in
the RPL lab is no easy task and something I chose to avoid for now. I suspect that the best method
to work with data from the scanner will be to export a point cloud from the scanner software, then
from there use the points to create a triangulated mesh. The amount of scans needed means that the
only real way to hit the order of magnitude required is to have the only part of the workflow that
isn't fully automated by code to be taking the scans. My semester planned to do most of the
processing of the mesh in CATIA which proved to take far too long and isn't scalable.
## Mesh Properties Algorithm Breakdown
The algorithm for processing the 3D meshes is implemented in the Julia programming language.
Syntactically the language is very similar to Python and Matlab, but was chosen because it is nearly
as performant as compiled languages like C, while still having tooling geared towards engineers and
scientists. The current code is quite robust and well tested and for a given `stl` file produces the
following data:
```julia
struct Properties
@ -67,6 +77,34 @@ struct Properties
end
```
### Volume, Center of Gravity, Inertia
These properties all come from [@eberlyPolyhedralMassProperties2002] which provides a great
explanation of the algorithm. The algorithm is quite complicated, but is really robust, accurate and
vectorized which means it is extremely fast. All the other algorithms are implemented from scratch
by me and have plenty of room for improvement, but the algorithm for these properties is probably as
good as it can get.
### Surface Area
Calculating the surface area is currently very simple but does have some shortcomings. The whole
algorithm is one line of code:
```julia
surface_area = sum(norm.(eachrow([x0 y0 z0] - [x1 y1 z1]) .× eachrow([x1 y1 z1] - [x2 y2 z2])) / 2)
```
The algorithm is finding the area of a triangle made up by 3 points in 3D space using some Calculus
3 vector math. The area of a triangle is $S=\dfrac{|\mathbf{AB}\times\mathbf{AC}|}2$, then the sum
of all the triangles that make up the mesh should produce the surface area. This can be inaccurate
if a mesh is missing triangles, has triangles that overlap, or is a mesh that has internal geometry.
### Characteristic Length
### Solid Body Values
### `find_scale` and `fast_volume` Functions
```{julia}
#| echo: false
#| output: false