Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub pages documentation #36

Merged
merged 27 commits into from
Aug 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
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
18 changes: 18 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Master

on:
push:
branches: [master]

jobs:
mkdocs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Deploy Docs
uses: mhausenblas/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONFIG_FILE: mkdocs.yml
19 changes: 19 additions & 0 deletions docs/development/math/derivatives.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Derivatives

The following is a table of first order derivatives.

| Description | Derivative | Result |
| ----------- | ---------- | ------ |
| Constant | $c'$ | $0$ |
| Variable | $x'$ | $1$ |
| Scaled variable | $(cx)'$ | $cx'$ |
| Sum | $(x+y)'$ | $x' + y'$ |
| Product | $(xy)'$ | $xy'+x'y$ |
| Quot | $\frac{x}{y}$ | $\frac{x.y'+x'.y}{y^2}$ |
| Reciprocal | $\frac{1}{x}$ | $\frac{-x'}{x^2}$ |
| Power | $(x^y)'$ | $yx^{y-1}$ |
| Square root | $\sqrt{x}'$ | $\frac{1}{2\sqrt{x}}$ |
| Chained rule | $\frac{\partial f(g(x))}{\partial x}$ | $\frac{\partial f(g(x))}{\partial g(x)} \frac{\partial g(x)}{\partial x} $ |
| Multivariable rule | $\frac{\partial f(u(x), v(x))}{\partial x}$ | $\frac{\partial f(u(x), v(x))}{\partial u(x)}\frac{\partial f(u(x), v(x))}{\partial u(x)} + \frac{\partial f(u(x), v(x))}{\partial x}$ |
| Vector square length | $(\vec{v}.\vec{v})'$ | $2\vec{v}\vec{v}'$ |
| Vector length | $\|\vec{v}\|'$ | $\hat{v}\vec{v}'$ |
146 changes: 146 additions & 0 deletions docs/development/math/vectors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
# Vectors

This page presents equations for working with vectors.

## Length preservation

$$
|c\vec{a}| = c|\vec{a}|
$$

## Dot Product

$$
\vec{a} \cdot \vec{b} = |a||b|\cos{\alpha}
$$

The dot product is very useful in determining if two vectors are perpendicular or whether they point in the same direction. A value of $0$ indicates that they are perpendicular. A positive value indicates that they point in the same half-space direction. A negataive value indicates that they point in opposite half-space directions.

Furthermore, if one of the vectors is unit (has length of one), it returns the length of the other vector's component that is along the first vector's direction. This can be used to measure the distance of a point to a plane if we have the normal of the plane and an arbitrary point on it.

## Cross Product

$$
\vec{a} \times \vec{b} = |\vec{a}||\vec{b}|\sin(\alpha)\vec{n}
$$

The cross product returns a new vector that is perpendicular to both of the initial vectors and has a length equal to the surface area that is bounded by the initial vectors. If the initial vectors are collinear, the resulting vector is the zero vector.

This is very useful in physics equations where the resulting concept is perpendicular to the two initial vectors (e.g. the torque vector is perpendicular to the force and the radius).

The order of the two vectors matters and flipping the order results in the inverse output vector.

$$
\vec{a} \times \vec{b} = - \vec{b} \times \vec{a}
$$

The cross product is distributable over addition.

$$
\vec{a} \times (\vec{b} + \vec{c}) = \vec{a} \times \vec{b} + \vec{a} \times \vec{c}
$$

## Triple Product

$$
\vec{a} \cdot (\vec{b} \times \vec{c})
=
\vec{b} \cdot (\vec{c} \times \vec{a})
=
\vec{c} \cdot (\vec{a} \times \vec{b})
$$

This gives the signed volume of the parallelepiped formed by the three vectors.

## Matrix - Vector multiplication

The standard formula for matrix to vector multiplication is as follows:

$$
\begin{bmatrix}
m_1 & m_2 & m_3 \\
m_4 & m_5 & m_6 \\
m_7 & m_8 & m_9 \\
\end{bmatrix}
\begin{bmatrix}
a_1 \\
a_2 \\
a_3 \\
\end{bmatrix}
=
\begin{bmatrix}
m_1a_1+m_2a_2+m_3a_3 \\
m_4a_1+m_5a_2+m_6a_3 \\
m_7a_1+m_8a_2+m_9a_3 \\
\end{bmatrix}
$$

This can be expressed in terms of vector dot products:

$$
\begin{bmatrix}
m_1 & m_2 & m_3 \\
m_4 & m_5 & m_6 \\
m_7 & m_8 & m_9 \\
\end{bmatrix}
\begin{bmatrix}
a_1 \\
a_2 \\
a_3 \\
\end{bmatrix}
=
\begin{bmatrix}
\vec{row_1} \\
\vec{row_2} \\
\vec{row_3} \\
\end{bmatrix}
\vec{a}
=
\begin{bmatrix}
\vec{row_1} \cdot \vec{a} \\
\vec{row_2} \cdot \vec{a} \\
\vec{row_3} \cdot \vec{a} \\
\end{bmatrix}
$$

Or it can also be expressed in terms of scaled vector sums:

$$
\begin{bmatrix}
m_1 & m_2 & m_3 \\
m_4 & m_5 & m_6 \\
m_7 & m_8 & m_9 \\
\end{bmatrix}
\begin{bmatrix}
a_1 \\
a_2 \\
a_3 \\
\end{bmatrix}
=
\begin{bmatrix}
m_1 \\
m_4 \\
m_7 \\
\end{bmatrix}
a_1
+
\begin{bmatrix}
m_2 \\
m_5 \\
m_8 \\
\end{bmatrix}
a_2
+
\begin{bmatrix}
m_3 \\
m_6 \\
m_9 \\
\end{bmatrix}
a_3
=
\vec{col_1}a_1
+
\vec{col_2}a_2
+
\vec{col_3}a_3
$$
210 changes: 210 additions & 0 deletions docs/development/physics/derivations/effective-mass-derivation-01.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading