In part 2 in the example program, there is one if condition
if (ray_on_xy.norm()<sphere_radius)
{
// The ray hit the sphere, compute the exact intersection point
Vector3d ray_intersection(ray_on_xy(0),ray_on_xy(1),
sqrt(sphere_radius*sphere_radius - ray_on_xy.squaredNorm()));
.....
}
Question is: Is this if condition just an optimization or is it part of the ray tracing algorithm?
My understanding from the lecture notes is that for orthographic, all the ray’s starting points formed a square instead of a circle.
In part 2 in the example program, there is one
if
conditionQuestion is: Is this
if
condition just an optimization or is it part of the ray tracing algorithm?My understanding from the lecture notes is that for orthographic, all the ray’s starting points formed a square instead of a circle.
Thank you