Sunday, October 6, 2024

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

Must read


Mannequin Mom Nature with Logarithmic Spirals

Towards Data Science

11 min learn

23 hours in the past

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 elements of an enormous mathematical object [1].

What this implies is that many seemingly complicated objects — throughout mind-boggling scales — might be lowered to easy equations. Why does a hurricane seem like 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 widespread: 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 generally called logarithmic spirals, their ubiquity in nature has earned them an extra title: spira mirabilis — “miraculous spiral.”

On this Fast Success Knowledge Science undertaking, 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 might 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 space from the middle and Ɵ (theta) is the angle made by r and the x-axis. The coordinates for the pole are (0, 0).



Supply hyperlink

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article