From 8cd2985548c56d0ee1ef8133551bf96e789fc5d8 Mon Sep 17 00:00:00 2001 From: Lily Iliana Luna Ylva Anderson Grigaitis Date: Sun, 24 Aug 2025 12:35:43 -0500 Subject: [PATCH] Pretty sure the lack of an n in the equation was a typo in the reference material. --- src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 2656d07..542a52b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -293,8 +293,8 @@ fn gen_hyperbolic_point(vec: &CGA) -> CGA { if vec_sqr >= 1. { panic!("Vector out of bounds"); } - - let p = 1. / (1. - vec_sqr)*(CGA::new(vec_sqr, SCALAR) + 2.*vec - (CGA::e4() - CGA::e5())); + let n = CGA::e4() + CGA::e5(); + let p = 1. / (1. - vec_sqr)*(vec_sqr*n/*CGA::new(vec_sqr, SCALAR)*/ + 2.*vec - (CGA::e4() - CGA::e5())); p } @@ -390,6 +390,8 @@ impl Game { let p0 = &v0_rotor*&origin*&v0_rotor.Reverse(); //Produce a vertex of the ship in the world frame. let p1 = &v1_rotor*&origin*&v1_rotor.Reverse(); //... let p2 = &v2_rotor*&origin*&v2_rotor.Reverse(); //... + let message = format!("{}", &p2); + console::log_1(&message.into()); draw_point(&self.context, &(com*&origin*com.Reverse())); draw_point(&self.context, &p0);