cs4620-08fa-final_soln

cs4620-08fa-final_soln - CS4620 Fall 2008 Final Exam...

Info icon This preview shows pages 1–2. Sign up to view the full content.

CS4620 Fall 2008 Final Exam Solution Problem 1. 1.1: The surface is an elliptical cylinder, with its center axis along the z axis and its ends at z = 0 and z = 1. The elliptical cross section has major diameter 2 and minor diameter 1. It works by transforming the ray into the local coordinates of a circular cylinder using a scale by 2 along the x axis. The values r1 and r2 are the ray parameters for the two intersections with the infinite cylinder; t1 and t2 are the intersections with the planes z = 0 and z = 1. The variables tmin and tmax describe where the ray enters and exits the capped cylinder -- and if it exits before it enters, it misses. 1.2: If quadraticRoots returns +infinity for both roots when there are no roots, then tmin will be +infinity and the function will return +infinity regardless of the values of t1 and t2. Returning two numbers <= 0 also works, since that will cause the computed hit points to be before the start of the ray. 1.3: when p = (-2, 0, 0.5) and d = (1, 0, 0), it will hit the surface. In this case, t1 and t2 are both infinity but have different signs, i.e. one is +inf and the other is -inf. In this case tmin = min(r1, r2) and tmax = max(r1, r2), in which r1 = 1.5 and r2 = 2.5, thus the function will return 1.5. So generally, if the ray is parallel to the x-y plane, and starts between z = 0 and z = 1, then t1 and t2 are two infinities with different signs, which causes the function to return a finite value if and only if the ray hits the infinite cylinder.
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern