Skip to content

georgeh1ll/Snells-Law-Simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Disclaimer

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.

Snell's Law Simulator

Simulate Snell's Law and visualize the behavior of light rays at a medium division. snell

Description

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.

Getting Started

  1. Clone this repository to your local machine using: git clone https://github.com/georgeh1ll/Snells-Law-Simulator.git
  2. Install the required dependencies using the following command: pip install numpy matplotlib tkinter
  3. Run the simulator by executing the Snell's Law Simulator.py script:

Usage

  1. Launch the simulator using the instructions above.

  2. Enter the incident angle in degrees, refractive index of Medium 1, and refractive index of Medium 2 in the respective entry fields.

  3. Click the "Simulate" button to visualize the behavior of light rays at the medium division.

  4. 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.

Developed by

George Hill

Contributing

Pull requests are welcome.

About

Work in progress

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages