Thanks to visit codestin.com
Credit goes to github.com

Skip to content

I don't believe -1 to 1 represents a "unit cube" #1555

@hrakaroo

Description

@hrakaroo

In the RayTracingInOneWeekend book around line 2314 in the dev branch the text reads:

First, we will use a rejection method to generate the random vector inside of the unit sphere. Pick
a random point in the unit cube, where $x$, $y$, and $z$ all range from -1 to +1, and reject this
point if it is outside the unit sphere.

While a unit sphere is defined as all points within one unit from a point in space, and therefore goes from -1 to 1, I don't believe it is correct that $x$, $y$, and $z$ all range from -1 to +1 represents a unit cube as each side would have a length of 2 units. I believe this is just a "cube" and not a "unit cube".

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions