From 53c6e393173e663cbae6ba6ebd43af12ed6868ea Mon Sep 17 00:00:00 2001 From: Steve Hollasch Date: Sat, 5 Oct 2024 13:29:20 -0700 Subject: [PATCH] Fix equation for refracted rays of non-unit length Resolves #1644 --- CHANGELOG.md | 3 ++- books/RayTracingInOneWeekend.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3d9d49c..e4b90447 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,12 @@ Change Log / Ray Tracing in One Weekend ==================================================================================================== -# v4.0.2 (2024-10-01) +# v4.0.2 (in progress) ### Common ### In One Weekend + - Fix -- Fix equation for refracted rays of non-unit length (#1644) ### The Next Week diff --git a/books/RayTracingInOneWeekend.html b/books/RayTracingInOneWeekend.html index 8b9f651b..ed26c8a7 100644 --- a/books/RayTracingInOneWeekend.html +++ b/books/RayTracingInOneWeekend.html @@ -3310,7 +3310,7 @@ If we solve for $\mathbf{R'}_{\bot}$ and $\mathbf{R'}_{\parallel}$ we get: - $$ \mathbf{R'}_{\bot} = \frac{\eta}{\eta'} (\mathbf{R} + \cos\theta \mathbf{n}) $$ + $$ \mathbf{R'}_{\bot} = \frac{\eta}{\eta'} (\mathbf{R} + |\mathbf{R}| \cos(\theta) \mathbf{n}) $$ $$ \mathbf{R'}_{\parallel} = -\sqrt{1 - |\mathbf{R'}_{\bot}|^2} \mathbf{n} $$ You can go ahead and prove this for yourself if you want, but we will treat it as fact and move on.