This project is a work in progress and may have limitations or incomplete features. Use it at your own discretion. To be included:
- Total Internal Reflection support and angle calculations.
- Colour boundary between mediums.
- Arrow heads to show light propagation direction.
Simulate Snell's Law and visualize the behavior of light rays at a medium division.
This application provides a graphical simulation of Snell's Law, which describes how light rays behave when they cross the boundary between two media with different refractive indices. The simulator allows you to input the incident angle and refractive indices of the two media to visualize the reflection and transmission of light.
- Clone this repository to your local machine using: git clone https://github.com/georgeh1ll/Snells-Law-Simulator.git
- Install the required dependencies using the following command: pip install numpy matplotlib tkinter
- Run the simulator by executing the
Snell's Law Simulator.py
script:
-
Launch the simulator using the instructions above.
-
Enter the incident angle in degrees, refractive index of Medium 1, and refractive index of Medium 2 in the respective entry fields.
-
Click the "Simulate" button to visualize the behavior of light rays at the medium division.
-
The simulation plot will show the incident, reflected, and transmitted rays along with the normal line and medium division. The reflection and transmission intensities will also be displayed on the plot.
Pull requests are welcome.