Ometh Abeyrathne
Email ometha12@gmail.com

Home/Cool Projects/Simulations

Simulations

Two small programs that draw mathematics: the Lorenz attractor, and the value of pi found by throwing random points.

When
2024
Built with
Python, Turtle, Qt 5

The Lorenz attractor

The butterfly-shaped curve of the Lorenz attractor
The Lorenz system, drawn point by point.

The Lorenz system is three simple equations whose solution never repeats and never settles: the standard picture of chaos. This draws it with Python's turtle graphics, one step at a time, so you watch the butterfly shape appear.

Pi by Monte Carlo

A window scattering random points over a circle inside a square, with an estimate of pi
Random points, and pi falling out of them.

A second-year project at Plymouth. Scatter random points over a square with a circle drawn inside it. The share that land inside the circle gives you pi, and the more points you throw, the closer it gets. The program shows the points landing and the estimate settling.