source: project/wiki/eggref/3/SO31 @ 13621

Last change on this file since 13621 was 13621, checked in by sjamaan, 11 years ago

Move old chicken 3 eggs over to eggref/3

File size: 3.7 KB
Line 
1[[tags: eggs]]
2
3== Documentation for the SO(3,1) egg
4
5[[toc:]]
6
7=== Introduction
8
9The SO31 egg provides functions to manipulate elements of the Lorentz group in four dimensions, commonly denoted SO(3,1).  The group elements can be represented by either the standard 4x4 matrices or by six parameters.
10
11Note that the egg provides a {{syntax-case}} module named SO31, which must be {{import}}ed into the current namespace before any of the listed functions become available.
12
13The parameterization used by the egg is:
14
15 vx, vy, vz, x, y, z :-> M = Bx(vx)*By(vy)*Bz(vz)*Rx(x)*Ry(y)*Rz(z),
16
17where the {{Ri}} are the usual rotation matrices in terms of the angles {{x}},{{y}},{{z}}, and the {{Bi}} are the usual boost matrices, expressed in terms of the rapidity {{vi}}.
18
19=== Examples
20
21==== Rapidity is additive
22
23The following example composes two boosts in the x-direction with rapidity {{1.0}}
24
25<enscript highlight=scheme>
26(use syntax-case)
27(use SO31)
28(import SO31)
29
30(let ((p (f64vector 1 0 0 0 0 0))) ; Boost in x direction w/rapidity 1
31  (params-compose p p))   
32; => close to '#f64(2 0 0 0 0 0) because the rapidity adds
33</enscript>
34
35==== More Examples...
36
37are coming.
38
39=== Authors
40
41[[wmfarr|Will M. Farr]]
42
43=== License
44
45SO31 is released under the [[http://www.gnu.org/copyleft/gpl.html|GPL]]:
46
47<blockquote>
48Copyright (C) 2007 Will M. Farr <farr@mit.edu>
49
50This program is free software; you can redistribute it and/or
51modify it under the terms of the GNU General Public License
52as published by the Free Software Foundation; either version 2
53of the License, or (at your option) any later version.
54
55This program is distributed in the hope that it will be useful,
56but WITHOUT ANY WARRANTY; without even the implied warranty of
57MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
58GNU General Public License for more details.
59
60You should have received a copy of the GNU General Public License
61along with this program; if not, write to the Free Software
62Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
63</blockquote>
64
65=== Requirements
66
67* {{syntax-case}} egg. 
68* {{srfi-42}} egg.
69* {{srfi-4-comprehensions}} egg.
70
71=== Documentation
72
73The following procedures are brought into the local environment when {{(import SO31)}} is issued:
74
75 [procedure] (matrix? obj)
76
77Evaluates to {{#f}} unless {{obj}} is a 4x4 matrix (actually, any 16-element f64vector will do).
78
79 [procedure] (params? obj)
80
81Evaluates to {{#f}} unless {{obj}} is a 6-element f64vector.
82
83 [f64vector] Tvx
84 [f64vector] Tvy
85 [f64vector] Tvz
86 [f64vector] Tx
87 [f64vector] Ty
88 [f64vector] Tz
89
90Values representing the corresponding generator matrices for SO(3,1).
91
92 [procedure] (Bx vx)
93 [procedure] (By vy)
94 [procedure] (Bz vz)
95 [procedure] (Rx x)
96 [procedure] (Ry y)
97 [procedure] (Rz z)
98
99Produce Boost and Rotation matrices with the given parameters.  Boosts are parameterized in terms of the rapidity along a given axis, while rotations are parameterized by an angle of rotation about a given axis.
100
101 [f64vector] eta
102
103The Minkowski metric.  {{eta}} = {{diag(-1,1,1,1)}}.
104
105 [procedure] (params->matrix p)
106
107Takes a 6-element f64vector, {{p}}, and returns the matrix representing the corresponding Lorentz transformation: if {{p}} is {{'#f64(vx vy vz x y z)}}, then the result {{M}} is {{M = Bx(vx)*By(vy)*Bz(vz)*Rx(x)*Ry(y)*Rz(z)}}. 
108
109 [procedure] (matrix->params m)
110
111The inverse of {{params->matrix}}.
112
113 [procedure] (matrix-compose m1 m2)
114
115Returns the matrix product of {{m1}} and {{m2}}---i.e. implements the group multiplication operation.
116
117 [procedure] (params-compose p1 p2)
118
119Implements the group multiplication operation on the parameters {{p1}} and {{p2}}.
120
121 [procedure] (matrix-inverse m)
122 [procedure] (params-inverse p)
123
124Implement the group inverse operation.
125
126=== Version History
127
128; 1.0 : Initial release.
Note: See TracBrowser for help on using the repository browser.