Skip to content
Jungkwuen An edited this page Aug 31, 2022 · 22 revisions

Welcome to the OTO wiki!

Code architecture:

  1. init rays
  2. init objects
  3. run ray-tracing
  4. display objects
  5. display ray paths

Pseudo-code for Ray-tracing

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

whitepapers for the basic knowledge on geometry and optics.

Clone this wiki locally