# The Ray Tracer Challenger: unnecessary normalization (page 73)

**URL:** <https://forum.devtalk.com/t/the-ray-tracer-challenger-unnecessary-normalization-page-73/3858>\
**Category:** PragProg Customers\
**Tags:** book-the-ray-tracer-challenge, pragprog\
**Created:** [8 November 2020 18:07 UTC](https://forum.devtalk.com/t/the-ray-tracer-challenger-unnecessary-normalization-page-73/3858 "2020-11-08T18:07:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![64kramsystem](https://forum.devtalk.com/user_avatar/forum.devtalk.com/64kramsystem/32/1211_2.png) [@64kramsystem](https://forum.devtalk.com/u/64kramsystem)\
**Post date:** [8 November 2020 18:07 UTC](https://forum.devtalk.com/t/the-ray-tracer-challenger-unnecessary-normalization-page-73/3858/1 "2020-11-08T18:07:17Z")

</div>

In the last hint (#4) of Chapter 5, the pseudocode applies a normalization to the origin ray:

- r ← ray(ray\_origin, normalize(position - ray\_origin))

normalizing in this case unnecessary, since with or without, the intersections detected are going to be the same.

My supposition is that this it was an accidental addition, or that it’s a common practice, so it’s been added even if it’s not necessary.

I think it should be either removed, or, if the case is the second, some explanation should be given, in particular, because at this stage of the book, it’s not entirely clear when normalization should be performed (there is only a generic explanation at page 30), so I find it (at least, personally) confusing.

---

<div class="post-metadata">

**Author:** ![jamis](https://forum.devtalk.com/user_avatar/forum.devtalk.com/jamis/32/1083_2.png) [@jamis](https://forum.devtalk.com/u/jamis)\
**Post date:** [3 March 2021 03:04 UTC](https://forum.devtalk.com/t/the-ray-tracer-challenger-unnecessary-normalization-page-73/3858/2 "2021-03-03T03:04:23Z")

</div>

You’re right that I should explained that better. As it is: yes, you’ll detect an intersection whether the ray is normalized or not, but the _distance_ to that intersection will differ depending on whether or not the ray is normalized. For this example, the distance doesn’t matter, just the fact of an intersection is sufficient.

So, yeah, maybe I could have left that off here. But the thinking was that for the _next_ chapter, it would carry over. (See step #3 of “Putting It Together” in Chapter 6.)
