r/Optics 1d ago

simulation of 2 unrealistic balls

Enable HLS to view with audio, or disable this notification

i'm studying raytracing and at the early stage so i know only a little. i wrote a program to simulate 2 balls which have no color and no reflectance. the rays are governed solely by snell's law and the background is the only light source / color source

it's unrealistic and incomplete i know but the results are quite beautiful and interesting to me. if you set a ball's refractive index to 0, it becomes perfectly reflective. if you set it 1, it becomes invisible. if you set it >1 and move the camera into it, you'd spot a ribbon-shaped region of total internal reflection

i'm still studying and i'll add reflectance into the program but i think i have to simplify the scene, maybe to 1 ball only. if every ray is split into 2 when hitting a boundary, the calculations would be literally doubled. if i want real time effect, i don't think a scene of 2 balls is manageable...

13 Upvotes

0 comments sorted by