/Refraction

Let Photons pass through a mediom with inhomogenuous refraction index, reflecting and refracting accordingly.

Primary LanguageJavaApache License 2.0Apache-2.0

Refraction

Java Project consiting of 3 classes. The main method is in LightShow.

One can change the medium, which encodes the refraction index at each point.

Secondly one can change the starting configuation of the Photons. I have a ray and a radial version coded. Radial is a pulse in all directions.

The attribute bb in Photon describes the boundary behavior, if a photon would leave the canvas. "ray" channels it back into a... , well, ray- "torus" lets the photon reappear on the opposite sid with same direction. "reflect" lets the boundary act as mirrors.

Please feel free to ask questions if you try to play with it. For example in my discord: https://discord.gg/y2sbtQuaJU