See notice on dept
home page, http://www.geneseo.edu/math/home
Colloquia
Dawood, “Mathematical Methods in Equity Research”
Thursday, February 19, 3:00 - 4:00, Newton 203
Dickerson, “Mathematics Majors’ Understandings of the
Concept of Mathematical Definition”
Monday, February 23, 4:00 - 5:00, Newton 201
Extra credit for summaries
Questions?
Speeding up ray tracer?
Use profiler!
Replace loops with vectorized computation!
Move code out of loops where possible
Evaluate common subexpressions only once
Intersecting Non-Triangles with Rays
Spheres
Use canonical sphere with equation x2 + y2
+ z2 = 1, plug in x, y, and z coordinates from ray,
and solve for t
Ray coordinates have form sx + tdx, etc.
With 2 real solutions, use smaller positive one for t
Two complex solutions mean ray misses sphere
Cylinders
Use canonical cylinder aligned with z axis such that x2
+ y2 = 1
But need to consider whether cylinder is infinite (unlikely)
or has bounds on z coordinates, and whether its ends are closed
or open
Closed ends involve more complicated code for intersections,
because ray can intersect in an end plane, whereas for open
cylinders intersections are only with sides
Next
Can you also handle distorted version of these shapes, e.g.,
ellipsoids, non-right-circular cylinders, etc?