mandelbrot分形图像生成程序
mandelbrot的Python项目详细描述
这是一个生成给定宽度和高度的mandelbrot分形集的程序。 对于给定的迭代次数。
它使用pillow,python图像库fork来渲染图像并将其保存到文件中。
示例用法。
要查看所有命令行参数,请将-h传递给程序。
$曼德尔布罗特-H 用法:mandelbrot[-h[-w宽度][-h高度][-n单位][-o输出]
mandelbrot分形生成器
- 可选参数:
-h, --help show this help message and exit -W WIDTH, --width WIDTH Width of the image -H HEIGHT, --height HEIGHT Height of the image -n NITER, --niter NITER Number of iterations -o OUTPUT, --output OUTPUT Name of output image file
默认情况下,程序会将大小为640x480像素的mandelbrot分形图像生成到名为mandelbrot.png的文件,并对名为mandelbrot.png的文件进行1000次迭代。
$曼德尔布罗特 创建大小为640x480的mandelbrot集,迭代次数=1000
下面是一个创建一个大小为1280x720像素、迭代次数为5000次的图像并将其保存到 mandelbrot_big.png
$mandelbrot-w 1280-h 720-n 5000-o mandelbrot_big.png
该软件包还包括“mandelbrot_mp”程序,该程序使用pymp通过 如果可用,在机器中的多个核心上并行执行。命令行参数保持不变。