summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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));