diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2020-02-25 23:12:31 -0500 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2020-02-25 23:12:31 -0500 |
commit | 98350b34d1826e1d6687f18c45b0fbc6a3488742 (patch) | |
tree | af80185b5db866ad596f9791dc349a9a7e4256bd /spheres.cpp | |
parent | a1c5f64f3c8c9812cb0b4658630f79dab1856c0c (diff) | |
download | space_wolff-98350b34d1826e1d6687f18c45b0fbc6a3488742.tar.gz space_wolff-98350b34d1826e1d6687f18c45b0fbc6a3488742.tar.bz2 space_wolff-98350b34d1826e1d6687f18c45b0fbc6a3488742.zip |
More fixes on new features
Diffstat (limited to 'spheres.cpp')
-rw-r--r-- | spheres.cpp | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/spheres.cpp b/spheres.cpp index 0067cc8..9ca2036 100644 --- a/spheres.cpp +++ b/spheres.cpp @@ -8,30 +8,7 @@ #include "animation.hpp" const unsigned D = 2; -typedef Model<double, D, TorusGroup<double, D>, double> model; - -Gen<double, D, TorusGroup<double, D>, double> eGen(double L) { - std::vector<Vector<double, 2>> torusVectors = torus_vecs<double, 2>(L); - std::vector<Matrix<double, 2>> torusMatrices = torus_mats<double, 2>(); - return [L, torusVectors, - torusMatrices](Model<double, D, TorusGroup<double, D>, double>& M, - Rng& r) -> Transformation<double, D, TorusGroup<double, D>, double>* { - Matrix<double, 2> m; - Vector<double, 2> t; - - m = r.pick(torusMatrices); - t(0) = r.uniform<double>(0, L); - t(1) = r.uniform<double>(0, L); - t = t - m * t; - - TorusGroup<double, 2> g = TorusGroup<double, 2>({(double)L, t, m}); - - Spin<double, 2, double>* ss = r.pick(M.s); - - return new SpinFlip<double, 2, TorusGroup<double, 2>, double>(M, g, ss); - }; -} - +typedef Model<double, D, TorusGroup<double, D>, Radius> model; int main(int argc, char* argv[]) { const unsigned D = 2; @@ -89,7 +66,7 @@ int main(int argc, char* argv[]) { return H * s.x(1); }; - auto g = eGen(L); + auto g = uniformGenTorus<D, Radius>(L); std::ofstream ofile("test.dat"); Animation<double, D, TorusGroup<double, D>, Radius> A(L, 750, argc, argv, 1000, true); model sphere(L, Z, B); |