raytracing.github.io icon indicating copy to clipboard operation
raytracing.github.io copied to clipboard

[Book 1] Listing 76 Section 12.2 Wrong lookfrom and lookat default values

Open solimm4sks opened this issue 2 years ago • 0 comments

Snippet of the listing:

...
    double vfov     = 90;              // Vertical view angle (field of view)
    point3 lookfrom = point3(0,0,-1);  // Point camera is looking from
    point3 lookat   = point3(0,0,0);   // Point camera is looking at
    vec3   vup      = vec3(0,1,0);     // Camera-relative "up" direction
...

This is also currently the state of camera.h on the dev branch. Before implementing the movable camera, the camera center position (lookfrom) was (0, 0, 0), and it was looking at (0, 0, -1). This was reversed in this listing without any discernable reason or explanation in the text.

solimm4sks avatar Dec 07 '23 11:12 solimm4sks