summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spheres_infinite.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/spheres_infinite.cpp b/spheres_infinite.cpp
index dba7ab3..9bc86d7 100644
--- a/spheres_infinite.cpp
+++ b/spheres_infinite.cpp
@@ -73,18 +73,18 @@ std::function<Euclidean<double, D>(const model&, randutils::mt19937_rng&)> eGen(
Matrix<double, D> m;
double θ = rng.uniform((double)0.0, 2 * M_PI);
- m(0, 0) = cos(θ);
- m(1, 1) = cos(θ);
- m(0, 1) = sin(θ);
- m(1, 0) = -sin(θ);
+ m(0, 0) = -cos(2 * θ);
+ m(1, 1) = cos(2 * θ);
+ m(0, 1) = -2 * cos(θ) * sin(θ);
+ m(1, 0) = -2 * cos(θ) * sin(θ);
unsigned f_ind = rng.uniform((unsigned)0, (unsigned)M.s.size());
- t = M.s[f_ind].x;
+ t = M.s[f_ind].x;
for (unsigned j = 0; j < D; j++) {
- t(j) = rng.variate<double, std::normal_distribution>(0.0, ε);
+ t(j) += rng.variate<double, std::normal_distribution>(0.0, ε);
}
- Euclidean<double, D> g(t, m);
+ Euclidean<double, D> g(t - m * t, m);
return g;
};
}
@@ -145,7 +145,7 @@ int main(int argc, char* argv[]) {
return H * s.x.norm();
};
- auto g = eGen(0.25);
+ auto g = eGen(0.05);
animation A(L, 750, argc, argv);
model sphere(1, Z, B);