You are viewing the course site for a past offering of this course. The current offering may be found here.
Lecture 13: Global Illumination & Path Tracing (22)
JefferyYC

I'm wondering how would the direction omega be represented in our implementation? Would we be representing it using (theta, phi)? Or (x,y,z)?

cchendyc

I think because the omega represents the direction of the light coming in, it should be a vector or in other words (x, y, z) given what dimension we are in.

kevintli

I believe either representation would work — spherical coordinates should technically require (r, theta, phi), but if we assume we're only working with unit vectors then (theta, phi) would be a valid representation. However, as we saw in Project 3-1, there are a few benefits to using the (x, y, z) representation. For example, if w_i is a unit vector, and we are working in a local coordinate system where the normal vector points along the z axis, then cos(w_i) is just the z component of w_i. I thought this was pretty interesting to see, and I'm curious whether we'll see scenarios in which the spherical coordinate representation might be more useful in the future!

You must be enrolled in the course to comment