This program visualizes a basic raytracing algorithm.This can be helpful for understanding how raytracing works. For the algorithm, I follow chapter-4 of this book: https://www.cs.cornell.edu/~srm/fcg4/. All the parameters are kept similar to the book. The program is written in Matlab.
Run rayvis.m
The program starts with some example inputs.
Press 'Go' to see the simulated ray for current inputs.
You can change values and press 'Go' to see how the ray works.
However, you can press 'Dafault' to reload the initial setup.
Check/ uncheck "show grid" before pressing "Go" to toggle between grid/ gridless visualization of the image plane.
Feel free to notify me any bug! :)