Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Some interesting patterns were drawn with Python


Jun 01, 2021 Article blog



This article was reproduced to Know ID: Charles (Bai Lu) knows his personal column

Download the W3Cschool Mobile App, 0 Foundation Anytime, Anywhere Learning Programming >> Poke this to learn

Lead

It took a while to use Python to draw some interesting patterns, and to explore Python's visualization capabilities...

PS:

Some of the patterns refer to some of the source code of some blogs.

By the way, prove a wave of my aesthetic T_T...

That's right, it's time to prove a wave

Let's Go!


Related documents

Baidu web download link: https://pan.baidu.com/s/1ZOaw7JmZ2dNvw0BDCcaTcA

Password: grsp


Develop tools

Python version: 3.6.4

Related modules:

numpy module;

matplotlib module;

numba module;

PIL module;

and some Python's own modules.


Environment construction

Install Python and add it to the environment variable, and pip installs the relevant modules that are required.


Effect display

The principle has nothing to say, just show it

First of all, of course, there are some mathematical fractal patterns against the sky

(1) Julia Fractal

 Some interesting patterns were drawn with Python1

(2) a kaleidoscope of twenty-sided symmetry

 Some interesting patterns were drawn with Python2

(3) Mandebro set

 Some interesting patterns were drawn with Python3

(4) Newton fractal

 Some interesting patterns were drawn with Python4

Second, I also used Python's turtle module to draw some interesting patterns.

(1) Snowflakes in the sky

 Some interesting patterns were drawn with Python5


(2) Roses

Scenario 1:

Scenario II:

(3) Love (T_T okay some non-mainstream)

That's all... Later have the opportunity to draw other bar


more

Python's visual library is still very rich and powerful, so that friends in need can learn on their own.

such as:

Matplotlib;

Pandas;

Bokeh;

Pygal and so on.