From 29453228f36e5a0adb579e2c9bdf7f4ddc8a79c0 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Wed, 19 Feb 2020 17:32:21 -0500 Subject: Fixed printing reflection lines --- spheres_infinite.cpp | 4 +--- 1 file changed, 1 insertion(+), 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 a_tmp = t->r; - a_tmp.t /= 2; Euclidean r_tmp = t->r; Vector r_center = r_tmp.t / 2; - double θ = acos(r_tmp.r(1, 1)) / 2; + double θ = atan2(r_center(1), r_center(0)); Vector v1 = s0_tmp.act({r_center(0) + 50*L * sin(θ), r_center(1) - 50*L * cos(θ)}); Vector v2 = s0_tmp.act({r_center(0) - 50*L * sin(θ), r_center(1) + 50*L * cos(θ)}); glVertex2d(v1(0), v1(1)); -- cgit v1.2.3-54-g00ecf