-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Jungkwuen An edited this page Aug 31, 2022
·
22 revisions
- init rays
- init objects
- run ray-tracing
- display objects
- display ray paths
function ray_tracing()
for each #ray in #ray_bundle
[#reflect_ray,#refract_ray,#terminated] = find_next_ray(#ray)
unless (#terminated)
add_rays(#reflect_ray)
add_rays(#refract_ray)
end_of_unless
end_of_for
- Calculating a surface normal https://en.wikipedia.org/wiki/Normal_(geometry)
- Optics Book - https://users.physics.ox.ac.uk/~ewart/Optics%20Lectures%202007.pdf