Skip to main content

Visualizing Math and Physics with Python

Former Gr@v member Raimon Luna developed a project to visualize many mathematical and physical concepts through images and animations fully generated by short Python scripts. 

Each picture is supposed to introduce a different idea in mathematics or physics in a visually appealing way, without the use of any text or numbers. For those of us who tend to have a visual understanding of these abstract topics, including the author, the pictures can be a nice way to get a different intuition on them. 

The posts include complex fractals, famous differential equations, topics in number theory, physical simulations of fluid dynamics and optics, and Turing machines, among others. The compact syntax of the Python language, together with the remarkable power of any household computer, makes it possible to produce visualizations that would have been a serious computational challenge not so long ago. 

The collection is posted in https://raimonluna.github.io/math-is-beautiful.html and the author's Instagram channel https://www.instagram.com/raimon.luna, where new pictures are added periodically. 

Experimenting with the code can act as a refresher of minor details of each mathematical idea, and even as an example of how to use computational techniques in actual reserch. Each post includes a short story or explanation of the concept, and most importantly, a link to a GitHub repository with the Python code that generates the image. This way, anyone can reproduce the images on their computer and change parameters if they wish: https://github.com/raimonluna/MathIsBeautiful

The project was also featured on the Spanish blog Microsiervos a few months ago: https://www.microsiervos.com/archivo/matematicas/matematicas-bellas-imagenes-demuestran.html