|
LdsGen 1.2.6
|
S(3) sequence generator by Hopf fibration. More...
#include <lds.hpp>
Public Member Functions | |
| Sphere3Hopf (const unsigned long base0, const unsigned long base1, const unsigned long base2) | |
| Construct a new Sphere 3 Hopf object. | |
| auto | value_at (unsigned long n) const -> std::array< double, 4 > |
| Evaluate the point on the 3-sphere at a given index (pure, no state change) | |
Public Member Functions inherited from ldsgen::GeneratorIterable< Sphere3Hopf, std::array< double, 4 > > | |
| auto | begin () -> GeneratorIterator< Sphere3Hopf, std::array< double, 4 > > |
| Get iterator to beginning. | |
| auto | end () const -> GeneratorIterator< Sphere3Hopf, std::array< double, 4 > > |
| Get iterator to end (infinite sequence) | |
Public Member Functions inherited from ldsgen::GeneratorBase< Derived, Value > | |
| auto | pop () -> Value |
| Generate the next value in the sequence (advances state). | |
| auto | peek () -> Value |
| Peek at the next value without advancing state. | |
| auto | skip (unsigned int n) -> void |
| Skip n values in the sequence. | |
| auto | reseed (const unsigned long &seed) -> void |
| Reset the generator to a specific seed value. | |
| auto | get_index () const -> unsigned long |
| Get current index in the sequence. | |
Additional Inherited Members | |
Protected Attributes inherited from ldsgen::GeneratorBase< Derived, Value > | |
| std::atomic< unsigned long > | count_ {0} |
| Current sequence index (single source of state) | |
S(3) sequence generator by Hopf fibration.
The Sphere3Hopf class is a sequence generator that generates points on a 3-sphere using the Hopf fibration. It uses three instances of the VdCorput class to generate the sequence values and maps them to points on the 3-sphere. The pop() method returns the next point on the 3-sphere as a std::array<double, 4>, where the first three elements represent the x, y, and z coordinates of the point, and the fourth element represents the w coordinate. The reseed() method is used to reset the state of the sequence generator to a specific seed value.
* 3-Sphere (S3) visualization: * A 4D hypersphere where points (x,y,z,w) * satisfy x²+y²+z²+w² = 1 * * 4D hypersurface * _____ * .-' '-. * ,' ', * / \ * | O | (4D analog of sphere) * \ / * '. .' * '-.....-' *
|
inline |
Construct a new Sphere 3 Hopf object.
Constructs a 3-sphere sequence generator using the Hopf fibration with the specified bases.
| [in] | base0 | the base for the first Van der Corput generator (phi coordinate) |
| [in] | base1 | the base for the second Van der Corput generator (psi coordinate) |
| [in] | base2 | the base for the third Van der Corput generator (eta coordinate) |
|
inline |
Evaluate the point on the 3-sphere at a given index (pure, no state change)
Uses the Hopf fibration parametrization:
\[ \begin{aligned} x &= \cos\eta\cos\psi \\ y &= \cos\eta\sin\psi \\ z &= \sin\eta\cos(\phi + \psi) \\ w &= \sin\eta\sin(\phi + \psi) \end{aligned} \]
where \( \phi = 2\pi\phi_{b_0}(n) \), \( \psi = 2\pi\phi_{b_1}(n) \), and \( \eta = \arccos\sqrt{\phi_{b_2}(n)} \).
| [in] | n | The sequence index. |