This is a Python3 program to understand and evaluate the structural beauty of the Mandelbrots set and Julia sets.
This implementations is mainly based on matplotlib and geopandas. You can install all the required environment through:
pip install -r requirements.txt
Addtionally, ArcGIS desktop 10.4 (and Axwoman 6.3 if possible http://livablecitylab.hkust-gz.edu.cn/binjiang/axwoman/) is required for visualizing the inherent hierarchy of these fractals.
-
Open Python script
s3_trajectory.py
and set the valuec_pre
in line 6 for the complex number c to draw different Julia sets . The trajectory of sequence {zn} for the Mandelbrot set will be displayed on the left side while the Julia set on the right side. -
Run the Python script in your IDE or run command:
python s3_trajectory.py
-
Click and drag a point from any location to another space within the left complex plane. If the current point belongs to the Mandelbrot set—in other words, if the corresponding sequence remains bounded within the threshold circle—it will be marked as a black point on the visualization. Here is an illustration of the user interface:
-
Open Python script
s3_binary.py
and adjust different sizes of the images where you can see MS and JS at different resolutions. The related parameters are from line 12 to lin 16. -
Run the Python script in your IDE or run command:
python s3_binary.py
-
Click and drag a point (in red) from any location to another space within the complex plane of MS. Each point corresponds to a different JS. Click
save
button to save the current image of JS such as 1-0.10_0.79.png1 under the root folder. The current images of the Mandelbrot set will be saved automatically asms_%max_iter%.png
.
-
Open
s4_beauty.py
and change the parameters of input_path and output_path where there are the input Mandelbrot set polygon shapefile and output contour line shapefile of the identified bends. We have already provided a sample contour insample_data/contour16.shp
. -
Run the Python script in your IDE or run command:
python s4_bends.py
-
The substructures, which are the bends defined by three vertices, will be autormatically indentified and saved as
bends16.shp
. Please follow theTutorial4MSJS.docx
for more details on calculating the degree of substral beauty.