This commit is contained in:
John Gatward committed 2026-10-04 15:24:17 +01:00
1 parent d0f27f276b
commit d6f54d4ec2
103 files changed
+3663 -3779

No files matched your search

+10 -10
View File
@@ -3,14 +3,14 @@
### Vectors
- The n-dimensional Euclidean Space is $\mathbb{R}^n$
- $\mathbb{R}^n = \{(v_0, v_1, ... v_{n-1}) | v_0, v_1, ...v_{n-1} \in \mathbb{R}\}$
- A vector is an n-turple
- $\mathbb{R}^n = \{(v_0, v_1, ... v_{n-1}) | v_0, v_1, ...v_{n-1} \in \mathbb{R}\}$
- A vector is an n-tuple
- $v\in \mathbb{R}^n \Longleftrightarrow v=(v_0, v_1, ...v_{n-1}) | v_0, v_1, ...v_{n-1} \in \mathbb{R}$
- In computer graphics we normally deal with 3-Dimensional Euclidean space $\mathbb{R}^3$
- vec3 notation:
- $v=(v_0, v_1, v_2)$
- $v = \begin{pmatrix} {v_0}\\{v_1}\\{v_2} \end{pmatrix}$
- Where $v_0$ represents x, $v_1$ represents y, and $v_2$ represents z axis
- vec3 notation:
- $v=(v_0, v_1, v_2)$
- $v = \begin{pmatrix} {v_0}\\{v_1}\\{v_2} \end{pmatrix}$
- Where $v_0$ represents the x axis, $v_1$ represents the y axis, and $v_2$ represents the z axis
##### Vector Scaling
@@ -104,18 +104,18 @@ Two matrices can only be multiplied if they both have the same number of columns
To get the resulting matrix, for each $(x,y)$ pair, is the cross product of the $x^{th}$ column and the $y^{th}$ row.
- Matrix multiplication is not communative
- $MN \neq NM$
- Matrix multiplication is not commutative
- $MN \neq NM$
###### Matrix-Vector Multiplication
A matrix multiplied by vector gives new vector
A matrix multiplied by a vector gives a new vector
Each row of the resulting vector is that row of the vector, dot producted with that row on the matrix.
##### Trigonometry
If $p=(p_x, p_y)$ is a unit vector, we can write them as:
If $p=(p_x, p_y)$ is a unit vector, we can write its components as:
$$
p_x = cos \space \alpha \\