Create Galactic Artwork with Tkinter. Mannequin Mom Nature with Logarithmic… | by Lee Vaughan | Sep, 2023


Mannequin Mom Nature with Logarithmic Spirals

A mannequin of a spiral galaxy (by creator)

One of many wonders of our world is that it may be described with math. The connection is so sturdy that MIT physicist Max Tegmark believes that the universe isn’t simply described by math, however that it is math within the sense that we’re all components of a large mathematical object [1].

What this implies is that many seemingly complicated objects — throughout mind-boggling scales — may be decreased to easy equations. Why does a hurricane appear to be a galaxy? Why is the sample in a nautilus shell repeated in a pinecone? The reply is math.

Examples of logarithmic spirals in nature (from “Python Instruments for Scientists” [2])

In addition to their look, the objects pictured above have one thing in frequent: all of them develop, and development in nature is a geometric development. Spirals that improve geometrically are thought-about to be logarithmic, as a consequence of the usage of the bottom of the pure logarithm (e) within the equation that describes them. Whereas commonly known as logarithmic spirals, their ubiquity in nature has earned them a further title: spira mirabilis — “miraculous spiral.”

On this Fast Success Knowledge Science mission, we’ll use logarithmic spirals and Python’s Tkinter GUI module to simulate a spiral galaxy. Within the course of, we’ll generate some enticing and distinctive digital artwork.

Modeling a spiral galaxy is all about modeling spiral arms. Every spiral arm may be approximated by a logarithmic spiral.

Schematic plan view of spiral galaxy (by creator)

As a result of spirals radiate out from a central level or pole, you’ll extra simply graph them with polar coordinates. On this system, the (x, y) coordinates used within the extra acquainted Cartesian coordinate system are changed by (r, Ɵ), the place r is the gap from the middle and Ɵ (theta) is the angle made by r and the x-axis. The coordinates for the pole are (0, 0).

Leave a Reply

Your email address will not be published. Required fields are marked *