diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2021-11-12 09:28:08 +0100 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2021-11-12 09:28:08 +0100 |
commit | 4beb0e8597060852dc82a2e2da43eaa5926d24a2 (patch) | |
tree | 53adab9e8dcd07b46ed6ac9764101713ce3b150f | |
parent | 3140c22dc32ae525b491bcb9653ec755762321d2 (diff) | |
download | spheres-4beb0e8597060852dc82a2e2da43eaa5926d24a2.tar.gz spheres-4beb0e8597060852dc82a2e2da43eaa5926d24a2.tar.bz2 spheres-4beb0e8597060852dc82a2e2da43eaa5926d24a2.zip |
Work.
-rw-r--r-- | soft_spheres.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/soft_spheres.cpp b/soft_spheres.cpp index 7944aa0..148812f 100644 --- a/soft_spheres.cpp +++ b/soft_spheres.cpp @@ -24,7 +24,7 @@ int main(int argc, char* argv[]) { unsigned N = 1200; double R = 0.025; double ε = 0.005; - unsigned steps = 1e6; + unsigned steps = 1e4; double β = 0.5; initializeAnimation(argc, argv); @@ -45,5 +45,19 @@ int main(int argc, char* argv[]) { draw(m); } + for (unsigned i = 0; i < steps; i++) { + for (unsigned j = 0; j < N; j++) { + m.randomMove(β, ε, r); + } + + unsigned k = m.randomClusterSwap(β, r); + if (k != 0 && k != N) { + std::cout << k << std::endl; + } + + if (i % 3 == 0) + draw(m); + } + return 0; } |