6.1 Manifolds
| (require sicm/calculus/manifold) | package: rktsicm |
Although the OO-like implementation is procedure/message based, for the purpose of this document the racket-class syntax has been used.
But there are (currently) no manifold% or other classes actualy defined, and there is no good way to check if something is-a? manifold%.
Methods, like ((manifold-spec%__’new-patch) rst ...) should be called as ((manifold-spec% 'new-patch) rst ...).
6.1.1 (Fake) classes
|
superclass: procedure? |
constructor
(specify-manifold spec [type]) → manifold-spec%
spec : symbol? type : symbol? = Real The constructor function for a new manifold-spec%. Predefined manifold-spec%s include R^n for n-dimensional space, S^n for surface of an n-dimensional sphere. an "^n" within the spec will be used to attach the dimension to a manifold% generated by this manifold-spec%
method
((manifold-spec%__’new-patch patch-name generator setup) → void? patch-name : symbol? generator : any setup : any Attaches a new patch to the manifold. Don’t use directly but use attach-patch.Get the patch-generator for a patch linked to the manifold-spec%. It should not be necessary to call this directly.
method
((manifold-spec%__’generator dimension [ embedding-dimension]) → manifold% dimension : positive-integer? embedding-dimension : positive-integer? = dimension Set up a new manifold%. Don’t use directly but use make-manifold.
|
superclass: procedure? |
A manifold is ...???.
field
(manifold%__’name) → symbol?
Returns itself
field
(manifold%__’type) → symbol?
field
field
field
method
name : symbol? Get the patch from a manifold. Don’t use directly but use patch
field
(manifold%__’distinguished-points) → (listof ???)
¿leftovers?¿leftovers?
|
superclass: procedure? |
A patch is ...???. ... linked to a manifold ... and one or more coordinate systems. Messages not handled by the patch will be passed to the manifold. A new patch should be added via attach-patch.
field
(patch%__’name) → symbol?
The name of the patch.Returns itselfAll the defined coordinate systems for a patch.
method
name : symbol? Get the coordinate system on a patch. Don’t use directly but use coordinate-system-at
|
superclass: procedure? |
A coordinate-system is ...???. ... linked to a manifold and a patch. Messages not handled by the coordinate-system will be passed to the manifold. A new coordinate-system should be added via attach-coordinate-system.
field
(coord-sys%__’name) → symbol?
The name of the coordinate-system.The patch the coordinate-system belongs to.
method
((coord-sys%__’check-coords) coord) → boolean?
coord : structure?
method
((coord-sys%__’check-point) point) → boolean?
point : manifold-point%
|
superclass: procedure? |
6.1.2 Functions
|
superclass: procedure? |
procedure
(temp) → number?
procedure
(attach-patch patch-name manifold-spec) → void?
patch-name : symbol? manifold-spec : manifold-spec%
procedure
(make-manifold manifold-spec dimension [ embedding-dimension]) → manifold% manifold-spec : manifold-spec% dimension : positive-integer? embedding-dimension : positive-integer? = dimension
procedure
(coordinate-system name patch) → coord-sys%
name : symbol? patch : patch%
procedure
(coordinate-system-at coord-name patch-name manifold) → coord-sys% coord-name : symbol? patch-name : symbol? manifold : manifold%
procedure
(attach-coordinate-system name patch-name spec transformations [ prototype]) → void? name : symbol? patch-name : symbol? spec : manifold-spec% transformations : (-> manifold% coord-transformer%) prototype : structure? = (up 'x0 'x1 ...)
procedure
(transfer-point embedded embedding)
→ (-> manifold-point% manifold-point%) embedded : manifold% embedding : manifold%
6.1.3 Predefined elements
value
R^n : manifold-spec%
Pre-installed patch%es:'origin
Pre-installed coordinate-system generators:
'rectangular 'polar/cylindrical 'spherical/cylindrical 'spacetime-spherical With names for folowing manifold%s and coord-sys%tems:
value
R1 : manifold%
value
R1-rect : coord-sys%
value
the-real-line : coord-sys%
value
R2 : manifold%
value
R2-rect : coord-sys%
value
R2-polar : coord-sys%
value
R3 : manifold%
value
R3-rect : coord-sys%
value
R3-cyl : coord-sys%
value
R3-spherical : coord-sys%
value
R4 : manifold%
value
R4-rect : coord-sys%
value
R4-cyl : coord-sys%
value
spacetime : manifold%
value
spacetime-rect : coord-sys%
value
spacetime-sphere : coord-sys%
value
S^n : manifold-spec%
Pre-installed patch%es:
'north-pole 'tilted 'south-pole Pre-installed coordinate-system generators:
'spherical 'stereographic 'gnomic With names for folowing manifold%s and coord-sys%tems:
value
S1 : manifold%
value
S1-circular : (coord-sys% 'spherical 'north-pole)
value
S1-tilted : (coord-sys% 'spherical 'tilted)
value
value
S1-gnomic : (coord-sys% 'gnomic 'north-pole)
value
S2p : manifold%
value
S2p-spherical : (coord-sys% 'spherical 'north-pole)
value
S2p-tilted : (coord-sys% 'spherical 'tilted)
value
value
S2p-Riemann : (coord-sys% 'stereographic 'north-pole)
value
S2p-gnomic : (coord-sys% 'gnomic 'north-pole)
value
S3 : manifold%
value
S3-spherical : (coord-sys% 'spherical 'north-pole)
value
S3-tilted : (coord-sys% 'spherical 'tilted)
value
S3-gnomic : (coord-sys% 'gnomic 'north-pole)
value
S3-stereographic : (coord-sys% 'stereographic 'south-pole)
value
S^2 : manifold-spec%
Pre-installed patch%es:
'north-pole 'tilted 'south-pole Pre-installed coordinate-system generators:
'spherical 'stereographic 'gnomic With names for folowing manifold%s and coord-sys%tems:
value
S2 : manifold%
value
S2-spherical : (coord-sys% 'spherical 'north-pole)
value
S2-tilted : (coord-sys% 'spherical 'tilted)
value
S2-stereographic : (coord-sys% 'stereographic 'north-pole)
value
S2-Riemann : (coord-sys% 'stereographic 'north-pole)
value
S2-gnomic : (coord-sys% 'gnomic 'north-pole)
value
SO3-type : manifold-spec%
Pre-installed patch%es:
'Euler-patch 'alternate-patch Pre-installed coordinate-system generators:
'Euler 'alternate With names for folowing manifold%s and coord-sys%tems:
value
SO3 : manifold%
value
Euler-angles : (coord-sys% 'Euler 'Euler-patch)
value
alternate-angles : (coord-sys% 'alternate 'alternate-patch)
6.1.4 Examples
> (define P ((R3-spherical '->point) (up 'r 'θ 'ϕ))) > (expression ((R3-rect '->coords) P)) '(up (* r (cos ϕ) (sin θ)) (* r (sin θ) (sin ϕ)) (* r (cos θ)))
> (define P ((R3-rect '->point) (up 'x 'y 'z)))
> (expression ((S2-spherical '->coords) ((transfer-point R3-rect S2-spherical) P))) '(up (acos z) (atan y x))