File Exchange

image thumbnail

Light beam deflection animation

version 1.3 (2.54 KB) by Nicolas Douillet
A function set to make a gif animation of some light beams deflected by the gravity field of a star / planet (pedagogic purpose).


Updated 12 Feb 2020

View License

For pedagogic / scientific diffusion purposes.

F5 in Light_beam_deflection.m to run the main program and create the animation file named 'Light_beam_gravity_deflection.gif' that will appear in the same directory as you registered this .m file.

Some parameters -like the one for display- may be tuned at the top of the file.
For instance set cmap to false to disable the colormap and the colorbar.

Cite As

Nicolas Douillet (2020). Light beam deflection animation (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (1)

Alex Suchik

it's an interesting information



All functions in one file. Added some comments


Cover img again


Cover img + title

MATLAB Release Compatibility
Created with R2019b
Compatible with any release
Platform Compatibility
Windows macOS Linux