-
Notifications
You must be signed in to change notification settings - Fork 0
/
caams.mac
29 lines (23 loc) · 838 Bytes
/
caams.mac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
G(p) := matrix(
[-p[2][1], p[1][1],-p[4][1], p[3][1]],
[-p[3][1], p[4][1], p[1][1],-p[2][1]],
[-p[4][1],-p[3][1], p[2][1], p[1][1]]);
L(p) := matrix(
[-p[2][1], p[1][1], p[4][1],-p[3][1]],
[-p[3][1],-p[4][1], p[1][1], p[2][1]],
[-p[4][1], p[3][1],-p[2][1], p[1][1]]);
Ap(p) := G(p).transpose(L(p));
a_cross(a) := matrix (
[ 0,-a[3][1], a[2][1]],
[ a[3][1], 0,-a[1][1]],
[-a[2][1], a[1][1], 0]);
a_plus(s) := matrix (
[ 0,-s[1][1],-s[2][1],-s[3][1]],
[s[1][1], 0,-s[3][1], s[2][1]],
[s[2][1], s[3][1], 0,-s[1][1]],
[s[3][1],-s[2][1], s[1][1], 0]);
a_minus(s) := matrix (
[ 0,-s[1][1],-s[2][1],-s[3][1]],
[s[1][1], 0, s[3][1],-s[2][1]],
[s[2][1],-s[3][1], 0, s[1][1]],
[s[3][1], s[2][1],-s[1][1], 0]);