algebra.frame
Key vectors, bivectors, and frames defining the location, orientation and geometry of a sundial.
See Setup and Definitions for the algebraic form taken by these objects.
base(base_symbol)
cached
The set of basis vectors from the Geometric Algebra (GA) with basis vectors identified by base_symbol
See also Fixed Stars and Earth Frames
.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_symbol
|
str
|
Symbol to identify the basis vectors, eg supplying '\(e\)' gives \(e_1, e_2, e_3\) |
required |
Returns:
| Type | Description |
|---|---|
Tuple[Mv]
|
A 3-tuple of galgebra.mv.Mv objects each representing a basis vector |
Source code in src/analemma/algebra/frame.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |
base_bivec(base_symbol)
cached
The set of basis bivectors from the Geometric Algebra (GA) with basis vectors identified by base_symbol
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_symbol
|
str
|
Symbol to identify the basis bivectors, eg supplying 'e' gives \(e_1\wedge e_2,\; e_1\wedge e_3,\; e_2\wedge e_3\) |
required |
Returns:
| Type | Description |
|---|---|
Tuple[Mv]
|
A 3-tuple of galgebra.mv.Mv objects each representing a basis bivector |
Source code in src/analemma/algebra/frame.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 | |
dial(incl_symbol=i, decl_symbol=d)
cached
The dial frame
This vector frame is aligned with the face of the sundial such that \(m_3\) is perpendicular pointing up. It is formed by applying the rotor \(R_dR_i\) to the surface frame, where
\(R_i = \exp( - n_1 \wedge n_3 \frac{1}{2} i )\)
and
\(R_d = \exp( - n_1 \wedge n_2 \frac{1}{2} d )\)
See also Dial Face and Gnomon
.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
incl_symbol
|
Symbol
|
The inclination angle of the dial face relative to the surface frame |
i
|
decl_symbol
|
Symbol
|
The declination angle of the dial face relative to the surface frame |
d
|
Returns:
| Type | Description |
|---|---|
Tuple[Mv]
|
A 3-tuple of vectors forming the dial frame |
Source code in src/analemma/algebra/frame.py
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | |
dialface()
cached
The dial face as a unit bivector
Given \(m_1\) and \(m_2\) from the dial frame, form:
\(m_1 \wedge m_2\)
See also Dial Face and Gnomon
Returns:
| Type | Description |
|---|---|
Mv
|
A bivector representing the face of the sundial |
Source code in src/analemma/algebra/frame.py
278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | |
gnomon(base_symbol='n', zero_decl=True, incl_symbol=iota, decl_symbol=delta)
cached
Form the gnomon on the sundial
The gnomon (silent g) is the part of a sundial that casts the shadow. Here we assume it is a rod or stick of unit length, and calculate it by rotating the surface vector \(n_3\) (pointing overhead) by two angles via \(g = R_\delta R_\iota n_3 \tilde{\)\iota}\tilde{R\delta}$ where
\(R_\iota = \exp( - n_1 \wedge n_3 \frac{1}{2} \iota )\)
and
\(R_\delta = \exp( - n_1 \wedge n_2 \frac{1}{2} \delta )\)
See also Dial Face and Gnomon
.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_symbol
|
str
|
Symbol identifing the basis on which to project the gnomon
|
'n'
|
zero_decl
|
bool
|
Indicates whether declination is assumed to be zero, which gives simpler results |
True
|
incl_symbol
|
Symbol
|
The inclination angle of the gnomon relative to the surface frame |
iota
|
decl_symbol
|
Symbol
|
The declination angle of the gnomon relative to the surface frame |
delta
|
Returns:
| Type | Description |
|---|---|
Mv
|
A vector representing the gnomon |
Source code in src/analemma/algebra/frame.py
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 | |
meridian_plane()
cached
The meridian plane encoded as a bivector
The meridian plane contains a line of longitude and is perpendicular to all lines of latitude. It is therefore parallel to North-South lines and is formed as \(n_1\wedge n_3\). Note that while \(n_1\) and \(n_3\) are both functions of latitude, this dependency cancels in the meridian plane and it depends on the planet parameters (axis tilt and rotation angles) only. See also Orbit Rotor and Meridian Plane
Returns:
| Type | Description |
|---|---|
Mv
|
Bivector representing the meridian plane |
Source code in src/analemma/algebra/frame.py
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | |
planet(axis_tilt_symbol=alpha, rotation_symbol=psi)
cached
A vector frame embedded in a planet
This frame accounts for the tilt of the planet's axis of rotation relative to the plane of its orbit around a star
(via axis_tilt_symbol), and encodes the rotation itself via rotation_symbol. The frame is calculated by forming
the two rotors
\(R_\alpha = \exp(-e_1 \wedge e_3\frac{1}{2}\alpha)\)
\(R_\psi = \exp(-R_\alpha e_1 \tilde{R}_\alpha \wedge e_2\frac{1}{2}\psi)\)
and applying them together as \(R_\psi R_\alpha\) to the fixed \(\{e_i\}\) frame from analemma.algebra.frame.base.
.
See also Fixed Stars and Earth Frames
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
axis_tilt_symbol
|
Symbol
|
Symbol denoting the angle of tilt of the planet's axis of rotation |
alpha
|
rotation_symbol
|
Symbol
|
Symbol denoting the planet's angle of rotation, starting when \(f_1\) is parallel to \(e_1\) |
psi
|
Returns:
| Type | Description |
|---|---|
Tuple[Mv]
|
Tuple of 3 basis vectors (as galgebra.mv.Mv objects) embedded in the planet with \(f_3\) parallel to the axis of rotation |
Source code in src/analemma/algebra/frame.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | |
scalar_element(value, base_symbol=_fixed_stars_symbol)
cached
The unit scalar element of the Geometric Algebra (GA) scaled by value
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
float
|
The numerical value of the returned scalar |
required |
base_symbol
|
str
|
Symbol to identify the basis vectors of the GA |
_fixed_stars_symbol
|
Returns:
| Type | Description |
|---|---|
Mv
|
The scalar element of the GA with value |
Source code in src/analemma/algebra/frame.py
75 76 77 78 79 80 81 82 83 84 85 86 87 | |
space_algebra(symbol)
cached
The Geometric Algebra (GA) of 3-dimensional Euclidean space
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
symbol
|
str
|
Symbol to use for the basis vectors, eg 'e' gives \(e_1, e_2, e_3\) The vectors are one-based because zero is reserved for time, but relativitic effects are negligible in this analysis. |
required |
Returns:
| Type | Description |
|---|---|
Ga
|
A galgebra.ga.Ga object representing the Geometric Algebra |
Source code in src/analemma/algebra/frame.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | |
sunray(orbit_symbol=sigma)
cached
A vector parallel to rays of sun light traveling toward the center of the planet
This vector is formed by rotating \(e_1\) by the orbit angle using the rotor
\(R_\sigma = \exp(-e_1 \wedge e_2 \frac{1}{2}\sigma)\)
to give
\(s = R_\sigma e_1 \tilde{R}_\sigma = \cos\sigma \, e_1 + \sin\sigma e_2\)
See also Orbit Rotor and Meridian Plane
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
orbit_symbol
|
Symbol
|
The planet's orbit angle |
sigma
|
Returns:
| Type | Description |
|---|---|
Mv
|
The vector \(s\) parallel to sun rays traveling directly toward a planet from its star |
Source code in src/analemma/algebra/frame.py
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 | |
surface(latitude_symbol=theta)
cached
A vector frame embedded in the surface of a planet
The frame is formed by rotating the frame given by analemma.algebra.frame.planet by an angle latitude_symbol
in the \(f_1 \wedge f_3\) plane, using the rotor \(R_\theta = \exp(-f_3 \wedge f_1\frac{1}{2}\theta)\).
See also Surface Frame
.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
latitude_symbol
|
Symbol
|
\(90^\circ\) minus the latitude at which the frame is embedded |
theta
|
Returns:
| Type | Description |
|---|---|
Tuple[Mv]
|
Tuple of 3 basis vectors (as galgebra.mv.Mv objects) at the surface of the planet with \(n_3\) pointing overhead |
Note
latitude_symbol is only directly related to latitude. It is \(90^\circ\) minus the latitude at which the frame is embedded.
Source code in src/analemma/algebra/frame.py
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | |
surface_bivec(latitude_symbol=theta)
cached
Frame of bivectors contructed from the surface vector frame
Given the vector frame \(n_1, n_2, n_3\), the bivector frame is formed as:
\(n_1\wedge n_2,\; n_1\wedge n_3,\; n_2\wedge n_3\)
See also Setup and Definitions
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
latitude_symbol
|
Symbol
|
\(90^\circ\) minus the latitude at which the frame is embedded |
theta
|
Returns:
| Type | Description |
|---|---|
Tuple[Mv]
|
Tuple of 3 basis bivectors (as galgebra.mv.Mv objects) at the surface of the planet with \(n_3\) pointing overhead |
Note
latitude_symbol is only directly related to latitude. It is \(90^\circ\) minus the latitude at which the frame is embedded.
Source code in src/analemma/algebra/frame.py
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | |