

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Professor: Beveridge; Class: Image Computation; Subject: Computer Science; University: Colorado State University; Term: Summer 1999;
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!


CS510 - Computer Graphics, Spring 1999CS510 - Computer Graphics, Spring 1999 J. Ross Beveridge, February 9, 1999 Page:7-
w Refraction w Face Normals w Ray Intersection with a Cone w Ray Intersection with an Axis Aligned Box w Loading and Retrieving from a Grid w Examples
CS510 - Computer Graphics, Spring 1999CS510 - Computer Graphics, Spring 1999 J. Ross Beveridge, February 9, 1999 Page:7-
w Key is snell’s law: w Where:
sin θ (^) r ηη i sinθ r
θ θ η η
i r i r
efraction
angle of incidence angle of r index of refraction outside index of refraction inside
θ i θ i
θ r T T i N L r
i r i r
η − η
θ θ η η
cos cos
w The refraction ray is:
CS510 - Computer Graphics, Spring 1999CS510 - Computer Graphics, Spring 1999 J. Ross Beveridge, February 9, 1999 Page:7-
CS510 - Computer Graphics, Spring 1999CS510 - Computer Graphics, Spring 1999 J. Ross Beveridge, February 9, 1999 Page:7-
w Using the CS510 File Format … ü Refraction only possible with spheres. ü Need faces tied to solids to do polygons.
Vertex Vertex Vertex Vertex Vertex Vertex Vertex Vertex
Face Face Face Face
Solid
Face Face
CS510 - Computer Graphics, Spring 1999CS510 - Computer Graphics, Spring 1999 J. Ross Beveridge, February 9, 1999 Page:7-
w Computing the Face Normal. ü Rule one: pick successive vertices
w The normal is the cross product of two vectors:
w Problems??
2 1 3 1 2 1 3 1
CS510 - Computer Graphics, Spring 1999CS510 - Computer Graphics, Spring 1999 J. Ross Beveridge, February 9, 1999 Page:7-
w Take the intersection of the cylinder and ray equations: w This is best done in Maple - so we will ...
CS510 - Computer Graphics, Spring 1999CS510 - Computer Graphics, Spring 1999 J. Ross Beveridge, February 9, 1999 Page:7-
w Again, this is actually very simple, although the result below does not make it seem so. w Step through the Maple worksheet to see how this is done.
CS510 - Computer Graphics, Spring 1999CS510 - Computer Graphics, Spring 1999 J. Ross Beveridge, February 9, 1999 Page:7-
w Recall that a ray is just a parameterized line segment. w Breshenham’s algorithm enumerates cells (pixels). w So, to list out the cells through which the ray passes. w Use Breshenham’s algorithm with the following changes. ü Find the axis of greatest travel ü Without loss of generality, assume it is the z axis. ü Use z as the independent variable (x in standard alg.) ü Enumerate the x and y values in parallel to get 3D cell coordinates. w This approach is very efficient and does not intersections.
CS510 - Computer Graphics, Spring 1999CS510 - Computer Graphics, Spring 1999 J. Ross Beveridge, February 9, 1999 Page:7-
w Let’s do some interactive experimentation with ray tracing. w Here is the first example from the assignment.