summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2020-02-19 17:32:21 -0500
committerJaron Kent-Dobias <jaron@kent-dobias.com>2020-02-19 17:32:21 -0500
commit29453228f36e5a0adb579e2c9bdf7f4ddc8a79c0 (patch)
treeb0f9fe75e628f6eac6d920e6377fb7c20c48b7bb
parentcf4dae88483f0f55edf71d1dc4c04bdc93001539 (diff)
downloadspace_wolff-29453228f36e5a0adb579e2c9bdf7f4ddc8a79c0.tar.gz
space_wolff-29453228f36e5a0adb579e2c9bdf7f4ddc8a79c0.tar.bz2
space_wolff-29453228f36e5a0adb579e2c9bdf7f4ddc8a79c0.zip
Fixed printing reflection lines
-rw-r--r--spheres_infinite.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/spheres_infinite.cpp b/spheres_infinite.cpp
index 7879f34..f7e11ad 100644
--- a/spheres_infinite.cpp
+++ b/spheres_infinite.cpp
@@ -74,11 +74,9 @@ public:
glColor3d(1.0, 0.0, 0.0);
glLineWidth(3);
glBegin(GL_LINES);
- Euclidean<double, D> a_tmp = t->r;
- a_tmp.t /= 2;
Euclidean<double, D> r_tmp = t->r;
Vector<double, 2> r_center = r_tmp.t / 2;
- double θ = acos(r_tmp.r(1, 1)) / 2;
+ double θ = atan2(r_center(1), r_center(0));
Vector<double, 2> v1 = s0_tmp.act({r_center(0) + 50*L * sin(θ), r_center(1) - 50*L * cos(θ)});
Vector<double, 2> v2 = s0_tmp.act({r_center(0) - 50*L * sin(θ), r_center(1) + 50*L * cos(θ)});
glVertex2d(v1(0), v1(1));