Skip to content

Use python openCV and C svpng to show Mandelbrot set.使用python openCV和C svpng显示曼德博集合。

Notifications You must be signed in to change notification settings

Kevin0412/Mandelbrot_set

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Mandelbrot_set 曼德博集合

Use python openCV and C svpng to show Mandelbrot set.

使用python openCV和C svpng显示曼德博集合。

Installation 安装方法

git clone https://github.com/Kevin0412/Mandelbrot_set.git -b Kevin0412-patch-1

cd Mandelbrot_set

git clone https://github.com/miloyip/svpng.git

pip install opencv-python

Varieties 类型

Variety 0: mandelbrot (mandelbrot set) 曼德勃罗集

mandelbrot

Variety 1: tri (triangular fractal) 三角分形

tri

Variety 2: boat (burning boat fractal) 燃烧船分形

boat

Variety 3: duck (duck fractal) 鸭子分形

duck

Variety 4: bell (bell fractal) 铃铛分形

bell

Variety 5: fish (tropical fish fractal) 热带鱼分形

fish

Variety 6: vase (vase fractral) 花瓶分形

vase

Variety 7: bird (bird fractral) 小鸟分形

bird

Variety 8: mask (mask fractral) 面具分形

mask

Variety 9: ship (ship fractral) 轮船分形

ship

Usage 使用方法

mandelbrot.py

python mandelbrot.py

Double click the window and the image will be enlarged. Press esc to exit. Your runs will be seen in runs dir. Alter variety in line 62.

双击窗口以放大图像。 按esc退出。 运行结果保存于runs文件夹。 可在第62行修改类型。

0_0j 2_(0 17578125+0 60546875j) 4_(0 1240234375+0 6142578125j) 6_(0 107177734375+0 637451171875j) 8_(0 10675048828125+0 63714599609375j) 10_(0 1068878173828125+0 6374053955078125j)

big_png.py

python big_png.py

You can get a big picture of fractral. Alter value n in line 6 can change size. size=256*2^n. Alter variety in line 5.

获得一张大的分形图片。 改变第6行n的值可以改变图像尺寸。尺寸=256*2^n. 可在第5行修改类型。

Mandelbrot_python.c

Windows:

gcc -lm Mandelbrot_python.c -o Mandelbrot_python.exe

Mandelbrot_python 0 0.0 0.0 test.png 0

Linux:

gcc -lm Mandelbrot_python.c -o Mandelbrot_python.out

./Mandelbrot_python.out 0 0.0 0.0 "test.png" 0

argv[1]: enlarge size 放大尺寸

argv[2]: real part of enlarge center 放大中心实部

argv[3]: imaginary part of enlarge center 放大中心虚部

argv[4]: file name 文件名

argv[5]: varieties (default 0) 类型 (默认0)

About

Use python openCV and C svpng to show Mandelbrot set.使用python openCV和C svpng显示曼德博集合。

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published