Skip to content

Commit

Permalink
Updated the typesetting for the exercises, and added cheat sheets to …
Browse files Browse the repository at this point in the history
…the launcher.
  • Loading branch information
tBuLi committed Dec 6, 2024
1 parent c515cdd commit ca68627
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 34 deletions.
28 changes: 14 additions & 14 deletions content/exercises/spider1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -225,23 +225,23 @@
"source": [
"## Exercises\n",
"\n",
"1. add a second point called point2, and render it in a different color. (Hint, select a hex number to get a color selector)\n",
"2. create a second line called line2, by joining (& = join) point1 to point2.\n",
"3. create a third point called point3 by intersecting (^ = meet) line1 and line2.\n",
"4. calculate line2 and point3 inside graph, so they update when you drag point1 and point2.\n",
"5. change line1 so that it is no longer through the origin\n",
" (Hint, lines through the origin have e0 = 0)\n",
"6. calculate a point called point4 by reflecting point1 in line1. (>> = sandwich!)\n",
"7. calculate a line called line3 that is orthogonal to line1 and through point4 (| = dot)\n",
"8. calculate a line called line4 that is halfway between line2 and line3. (...normalize!)\n",
"1. add a second point called `point2`, and render it in a different color. (Integers are interpreted as hexadecimal colors.)\n",
"2. create a second line called `line2`, by joining (`&` = join) point1 to point2.\n",
"3. create a third point called `point3` by intersecting (`^` = meet) `line1` and `line2`.\n",
"4. calculate `line2` and `point3` inside `graph_func`, so they update when you drag `point1` and `point2`.\n",
"5. change `line1` so that it is no longer through the origin\n",
" (Hint, lines through the origin have `e0 = 0`)\n",
"6. calculate a point called `point4` by reflecting `point1` in `line1`. (`>>` = group conjugation aka sandwich)\n",
"7. calculate a line called `line3` that is orthogonal to `line1` and through `point4` (`|` = dot)\n",
"8. calculate a line called `line4` that is halfway between `line2` and `line3`.\n",
" (Hint the normalized version of `x` is written `x.normalized()`)\n",
"\n",
"Self-Reflection - we've learned :\n",
"1. how to create points and lines directly. (dual operator for points)\n",
"2. how to create points by meeting ^ lines and lines by joining & points.\n",
"3. how to find orthogonal elements with the dot | product.\n",
"4. how to apply >> a reflection in a line\n",
"5. how to use addition + to find the bisector of two (.normalized()) lines. \n",
"2. how to create points by meeting `^` lines and lines by joining `&` points.\n",
"3. how to find orthogonal elements with the dot `|` product.\n",
"4. how to apply `>>` a reflection in a line\n",
"5. how to use addition `+` to find the bisector of two (`.normalized()`) lines. \n",
"\n",
"BONUS\n",
"1. Change the algebra from 2D to 3D PGA on line 10. Study what happens !"
Expand Down Expand Up @@ -296,7 +296,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.12.8"
}
},
"nbformat": 4,
Expand Down
24 changes: 12 additions & 12 deletions content/exercises/spider2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -247,19 +247,19 @@
"source": [
"## Exercises\n",
"\n",
"1. create and render triangle2 by reflecting triangle1 in L1\n",
"1. create and render `triangle2` by reflecting `triangle1` in `L1`\n",
" (Hint: recall that the triangle is just a list of points, so each point must be transformed seperatelly.)\n",
"2. create and render triangle3 by reflecting triangle2 in L2\n",
"3. now change the creation of triangle3 by first multiplying L2 and L1, then applying that to triangle1.\n",
"4. (L2*L1) is a bireflection, drag the points to see how you can use this to make :\n",
"2. create and render `triangle3` by reflecting `triangle2` in `L2`\n",
"3. now change the creation of `triangle3` by first multiplying `L2` and `L1`, then applying that to `triangle1`.\n",
"4. (`L2*L1`) is a bireflection, drag the points to see how you can use this to make :\n",
"- A) the identity operation.\n",
"- B) any rotation\n",
"- C) any translation\n",
"- D) Note how the resulting translation/rotation is twice that between the original reflections!\n",
"5. create a line L3 by normalizing the sum of (normalized) L1 and L2. (observe this is indeed always the bisector)\n",
"6. create triangle4 by applying (L3*L1) to triangle;\n",
"7. create triangle5 by applying P2 to triangle1.\n",
"8. How do you have to move L2 so that triangle5 and triangle3 overlap?\n",
"5. create a line L3 by normalizing the sum of (normalized) `L1` and `L2`. (observe this is indeed always the bisector)\n",
"6. create `triangle4` by applying `(L3*L1)` to triangle;\n",
"7. create `triangle5` by applying `P2` to `triangle1`.\n",
"8. How do you have to move `L2` so that `triangle5` and `triangle3` overlap?\n",
"\n",
"## Self-reflection: We've learned ...\n",
"\n",
Expand All @@ -273,9 +273,9 @@
"\n",
"Note - this is a difficult question - we have not covered the details needed for this.\n",
"\n",
"1. Change the dimensionality of the algebra from 2 to 3. Why is triangle3 still there but triangle4 isn't?\n",
"2. Try to fix it (hint: first render (L2|alg.blades.e012.dual())) - in 2D e012.dual(), or the dual of the pseudoscalar is\n",
" just the scalar '1' - but in 3D it represents the plane we are working in - an assumption\n",
"1. Change the dimensionality of the algebra from 2 to 3. Why is `triangle3` still there but `triangle4` isn't?\n",
"2. Try to fix it (hint: first render `(L2|alg.blades.e012.dual()))` - in 2D `e012.dual()`, or the dual of the pseudoscalar is\n",
" just the scalar `1` - but in 3D it represents the plane we are working in - an assumption\n",
" we must formalize for things to keep working unmodified."
]
},
Expand Down Expand Up @@ -328,7 +328,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.12.8"
}
},
"nbformat": 4,
Expand Down
16 changes: 8 additions & 8 deletions content/exercises/spider3.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -258,15 +258,15 @@
"source": [
"## Exercises:\n",
"\n",
"1. Create the rotor R that spins around P1 with the formula $e^{- t P_1 / 2}$, which in kingdon code is `(-0.5 * time * P1).exp()`.\n",
"2. Create and render triangle2 by Applying (>>) R to triangle.\n",
" -> Drag point P1 around!\n",
"3. Create a line L2 by dotting L1 with any point (use P1 or the origin)\n",
"4. Create a point at infinity called P2 by intersecting 1e0 (the infinite line) with L2.normalized().\n",
"1. Create the rotor `R` that spins around `P1` with the formula $e^{- t P_1 / 2}$, which in kingdon code is `(-0.5 * time * P1).exp()`.\n",
"2. Create and render `triangle2` by Applying (`>>`) $R$ to triangle.\n",
" -> Drag point `P1` around!\n",
"3. Create a line `L2` by dotting `L1` with any point (use `P1` or the origin)\n",
"4. Create a point at infinity called `P2` by intersecting `e0` (the infinite line) with `L2.normalized()`.\n",
" -> Note that we would find the same infinite point no matter which point we pick in step 3.\n",
"5. Create a translator T along L1 with the formula $e^{- t P_2 / 2}$, which in kingdon code is `(-0.5 * time * P2).exp()`\n",
"5. Create a translator `T` along `L1` with the formula $e^{- t P_2 / 2}$, which in kingdon code is `(-0.5 * time * P2).exp()`\n",
" -> translating is just like rotating, but 'around' infinite points.\n",
"6. Create and render triangle3 by applying T to triangle.\n",
"6. Create and render `triangle3` by applying `T` to triangle.\n",
"\n",
"## Self-reflection: we have learned \n",
"\n",
Expand Down Expand Up @@ -338,7 +338,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.12.8"
}
},
"nbformat": 4,
Expand Down
15 changes: 15 additions & 0 deletions jp_app_launcher_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@
type: markdown
catalog: Other

- title: 2DPGA Cheat Sheet
source: https://bivector.net/2DPGA.pdf
type: url
catalog: Other
args:
createNewWindow: true

- title: 3DPGA Cheat Sheet
source: https://bivector.net/3DPGA.pdf
type: url
catalog: Other
args:
createNewWindow: true


# 2DPGA

- title: Distances and Angles
Expand Down

0 comments on commit ca68627

Please sign in to comment.