You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 2, 2024. It is now read-only.
The `branch` both a line through the origin and also the principal branch of the logarithm of a rotor.
9
+
10
+
The rotor branch will be most commonly constructed by taking the logarithm of a normalized rotor. The branch may then be linearily scaled to adjust the "strength" of the rotor, and subsequently re-exponentiated to create the adjusted rotor.
11
+
12
+
!!! example
13
+
Suppose we have a rotor $r$ and we wish to produce a rotor
14
+
$\sqrt[4]{r}$ which performs a quarter of the rotation produced by
15
+
$r$. We can construct it like so:
16
+
17
+
```c++
18
+
kln::branch b = r.log();
19
+
kln::rotor r_4 = (0.25f * b).exp();
20
+
```
21
+
22
+
23
+
!!! note
24
+
The branch of a rotor is technically a `line`, but because there are
25
+
no translational components, the branch is given its own type for
`public `[`branch`](#structkln_1_1branch_1a85e647f4c92a2dd6896c5afd849d00a5)`(float a,float b,float c) noexcept` | Construct the branch as the following multivector:
`public `[`entity`](../../api/kln_entity#structkln_1_1entity)``[`exp`](#structkln_1_1branch_1a341d43c4152ba03b8001134962900799)`() const noexcept` | Exponentiate this branch to produce a rotor. To avoid a circular dependency, an `entity<0b10>` is returned but this can be implicitly cast to a rotor.
To convince yourself this is a line through the origin, remember that such a line can be generated using the geometric product of two planes through the origin.
`public `[`entity`](../../api/kln_entity#structkln_1_1entity)`< 0b110 > `[`exp`](#structkln_1_1ideal__line_1a5d355ce61318a118b3e92c67656e6b80)`() const noexcept` | Exponentiate this ideal line to produce a translation. An `entity<0b100>` is returned instead to avoid a cyclic dependency, but this can be implicitly casted to a `translator` .
Exponentiate this ideal line to produce a translation. An `entity<0b100>` is returned instead to avoid a cyclic dependency, but this can be implicitly casted to a `translator` .
35
+
36
+
The exponential of an ideal line $a \mathbf{e}_{01} + b\mathbf{e}_{02} + c\mathbf{e}_{03}$ is given as:
Copy file name to clipboardExpand all lines: docs/api/kln_line.md
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,17 +5,19 @@ struct kln::line
5
5
: public kln::entity< 0b110 >
6
6
```
7
7
8
+
A general line in $\PGA$ is given as a 6-coordinate bivector with a direct correspondence to Plücker coordinates. All lines can be exponentiated using the `exp` method to generate a motor.
`public `[`line`](#structkln_1_1line_1a3a7b1cdde6811a23a30cd5d4082ee5d7)`(float a,float b,float c,float d,float e,float f) noexcept` | A line is specifed by 6 coordinates which correspond to the line's [Plücker coordinates](https://en.wikipedia.org/wiki/Pl%C3%BCcker_coordinates). The coordinates specified in this way correspond to the following multivector:
`public float `[`squared_norm`](#structkln_1_1line_1af9fdfa8ac229420aa1649100ee573bf8)`()` | If a line is constructed as the regressive product (join) of two points, the squared norm provided here is the squared distance between the two points (provided the points are normalized). Returns $d^2 + e^2 + f^2$.
18
-
`public float `[`norm`](#structkln_1_1line_1acbce68119eab96bcc0ec3918dfa4691c)`()` | Returns the square root of the quantity produced by `squared_norm` .
`public float `[`squared_norm`](#structkln_1_1line_1a941c27dc8594f947ecf718160ebb084b)`() noexcept` | If a line is constructed as the regressive product (join) of two points, the squared norm provided here is the squared distance between the two points (provided the points are normalized). Returns $d^2 + e^2 + f^2$.
20
+
`public float `[`norm`](#structkln_1_1line_1ad388b8d134c0c22b1f82026277e39c22)`() noexcept` | Returns the square root of the quantity produced by `squared_norm` .
19
21
`public `[`entity`](../../api/kln_entity#structkln_1_1entity)`< 0b110 > `[`exp`](#structkln_1_1line_1ab81feed09b9c02934914071206bf54d1)`() const noexcept` | Line exponentiation
20
22
21
23
### Members
@@ -28,17 +30,17 @@ A line is specifed by 6 coordinates which correspond to the line's [Plücker coo
If a line is constructed as the regressive product (join) of two points, the squared norm provided here is the squared distance between the two points (provided the points are normalized). Returns $d^2 + e^2 + f^2$.
Copy file name to clipboardExpand all lines: docs/api/kln_rotor.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ The same `*` operator can be used to compose the rotor's action with other tran
53
53
`public void `[`load_normalized`](#structkln_1_1rotor_1ab063d72ca484de581a78ebd7b49e41da)`(float * data) noexcept` | Fast load operation for packed data that is already normalized. The argument `data` should point to a set of 4 float values with layout `(a, b, c, d)` corresponding to the multivector $a + b\mathbf{e}_{23} + c\mathbf{e}_{31} + d\mathbf{e}_{12}$.
54
54
`public void `[`normalize`](#structkln_1_1rotor_1a4c9b04d0a4119e7d6b56b9e1478db5d4)`() noexcept` | Normalize a rotor such that $\mathbf{r}\widetilde{\mathbf{r}} = 1$.
55
55
`public `[`mat4x4`](../../api/kln_mat4x4#structkln_1_1mat4x4)``[`as_matrix`](#structkln_1_1rotor_1a0f13d2649e679220fc79ee7bc0bbea11)`() const noexcept` | Converts the rotor to a 4x4 column-major matrix.
56
-
`public `[`branch`](../../api/kln_rotor::branch#structkln_1_1rotor_1_1branch)``[`log`](#structkln_1_1rotor_1abdb39aa5e358dd4ceef256b48ef91e81)`() const noexcept` | Returns the principal branch of this rotor's logarithm. Invoking `exp` on the returned result maps back to this rotor.
56
+
`public `[`branch`](../../api/kln_branch#structkln_1_1branch)``[`log`](#structkln_1_1rotor_1abdb39aa5e358dd4ceef256b48ef91e81)`() const noexcept` | Returns the principal branch of this rotor's logarithm. Invoking `exp` on the returned result maps back to this rotor.
57
57
`public `[`plane`](../../api/kln_plane#structkln_1_1plane)` KLN_VEC_CALL `[`operator()`](#structkln_1_1rotor_1ae9e58f02352f5241dd94d22353a5e9ec)`(`[`plane`](../../api/kln_plane#structkln_1_1plane)` const & p) const noexcept` | Conjugates a plane $p$ with this rotor and returns the result $rp\widetilde{r}$.
58
58
`public void KLN_VEC_CALL `[`operator()`](#structkln_1_1rotor_1a491f6f2264c6ecf180664e75fc4a159b)`(`[`plane`](../../api/kln_plane#structkln_1_1plane)` * in,`[`plane`](../../api/kln_plane#structkln_1_1plane)` * out,size_t count) const noexcept` | Conjugates an array of planes with this rotor in the input array and stores the result in the output array. Aliasing is only permitted when `in == out` (in place motor application).
59
59
`public `[`line`](../../api/kln_line#structkln_1_1line)` KLN_VEC_CALL `[`operator()`](#structkln_1_1rotor_1ac4d044ea5b98ba540fc5da8d75f43ccc)`(`[`line`](../../api/kln_line#structkln_1_1line)` const & l) const noexcept` | Conjugates a line $\ell$ with this rotor and returns the result $r\ell \widetilde{r}$.
@@ -91,7 +91,7 @@ Normalize a rotor such that $\mathbf{r}\widetilde{\mathbf{r}} = 1$.
`public void `[`load_normalized`](#structkln_1_1translator_1af41d16e554ed66e640671ca9065971b7)`(float * data) noexcept` | Fast load operation for packed data that is already normalized. The argument `data` should point to a set of 4 float values with layout `(0.f, a, b, c)` corresponding to the multivector $a\mathbf{e}_{01} + b\mathbf{e}_{02} + c\mathbf{e}_{03}$.
48
+
`public `[`ideal_line`](../../api/kln_ideal_line#structkln_1_1ideal__line)``[`log`](#structkln_1_1translator_1a29bc3e5e184b1184eb704faca120120a)`() const noexcept` | Compute the logarithm of the translator, producing an ideal line axis. In practice, the logarithm of a translator is simply the ideal partition (without the scalar $1$).
49
+
`public `[`ideal_line`](../../api/kln_ideal_line#structkln_1_1ideal__line)` & `[`log`](#structkln_1_1translator_1a4f8dd15b0b5ce83b03b24e027ccbe1b5)`() noexcept` | Retrieve the ideal line axis of this translator which can be directly manipulated to augment or diminish the weight of this translator.
48
50
`public `[`plane`](../../api/kln_plane#structkln_1_1plane)` KLN_VEC_CALL `[`operator()`](#structkln_1_1translator_1a0e313cc6d057b518bbc8b04ad6baec59)`(`[`plane`](../../api/kln_plane#structkln_1_1plane)` const & p) const noexcept` | Conjugates a plane $p$ with this translator and returns the result $tp\widetilde{t}$.
49
51
`public `[`line`](../../api/kln_line#structkln_1_1line)` KLN_VEC_CALL `[`operator()`](#structkln_1_1translator_1aa0a9ea85643aa7661d52dd477abd76e7)`(`[`line`](../../api/kln_line#structkln_1_1line)` const & l) const noexcept` | Conjugates a line $\ell$ with this translator and returns the result $t\ell\widetilde{t}$.
50
52
`public `[`point`](../../api/kln_point#structkln_1_1point)` KLN_VEC_CALL `[`operator()`](#structkln_1_1translator_1a6d5ee3578eb48f36bf3e21d321899de5)`(`[`point`](../../api/kln_point#structkln_1_1point)` const & p) const noexcept` | Conjugates a point $p$ with this translator and returns the result $tp\widetilde{t}$.
@@ -66,6 +68,14 @@ Fast load operation for packed data that is already normalized. The argument `da
66
68
the quantity $-\sqrt{a^2 + b^2 + c^2}$ must be half the desired
Compute the logarithm of the translator, producing an ideal line axis. In practice, the logarithm of a translator is simply the ideal partition (without the scalar $1$).
0 commit comments