Skip to content

Commit

Permalink
fix bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
d0t451 committed Apr 17, 2019
1 parent 65cfd92 commit fbf02fb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,32 @@
根据Mandelbrot集绘制分形图像。Mandelbrot集由一个复变函数**f(z) = z<sup>2</sup> + c**生成,其中c为当前坐标点,z从0开始迭代。

Draw fractal image using Mandelbrot set. The Mandelbrot set is generated by a complex function **f(z) = z<sup>2</sup> + c**, where c is current coordinate point, and z iterates from 0.
![](https://github.com/d0t451/fractal/blob/master/images/mandelbrot.png)
![](https://github.com/d0t451/d0fractal/blob/master/images/mandelbrot.png)

## Julia分形图像
根据Julia集绘制分形图像。Julia集由一个复变函数**f(z) = z<sup>2</sup> + c**生成,其中c为常数,z从当前坐标点开始迭代。

Draw fractal images using Julia set. The Julia set is generated by a complex function **f(z) = z<sup>2</sup> + c**, where c is a constant, and z iterates from current coordinate point.
### c = (0.34-0.05i)
![](https://github.com/d0t451/fractal/blob/master/images/(0.34-0.05j).png)
![](https://github.com/d0t451/d0fractal/blob/master/images/(0.34-0.05j).png)
### c = (-0.52+0.62i)
![](https://github.com/d0t451/fractal/blob/master/images/(-0.52+0.62j).png)
![](https://github.com/d0t451/d0fractal/blob/master/images/(-0.52+0.62j).png)
### c = (-0.54-0.5255i)
![](https://github.com/d0t451/fractal/blob/master/images/(-0.54-0.5255j).png)
![](https://github.com/d0t451/d0fractal/blob/master/images/(-0.54-0.5255j).png)
### c = (-0.55+0.64i)
![](https://github.com/d0t451/fractal/blob/master/images/(-0.55+0.64j).png)
![](https://github.com/d0t451/d0fractal/blob/master/images/(-0.55+0.64j).png)
### c = (0.338+0.489i)
![](https://github.com/d0t451/fractal/blob/master/images/(0.338+0.489j).png)
![](https://github.com/d0t451/d0fractal/blob/master/images/(0.338+0.489j).png)
### c = (0.365-0.37i)
![](https://github.com/d0t451/fractal/blob/master/images/(0.365-0.37j).png)
![](https://github.com/d0t451/d0fractal/blob/master/images/(0.365-0.37j).png)
### c = (0.3593+0.5103i)
![](https://github.com/d0t451/fractal/blob/master/images/(0.3593+0.5103j).png)
![](https://github.com/d0t451/d0fractal/blob/master/images/(0.3593+0.5103j).png)
### c = (0.42413+0.20753i)
![](https://github.com/d0t451/fractal/blob/master/images/(0.42413+0.20753j).png)
![](https://github.com/d0t451/d0fractal/blob/master/images/(0.42413+0.20753j).png)
### c = -1.38
![](https://github.com/d0t451/fractal/blob/master/images/-1.38.png)
![](https://github.com/d0t451/d0fractal/blob/master/images/-1.38.png)
### c = 1i
![](https://github.com/d0t451/fractal/blob/master/images/1j.png)
![](https://github.com/d0t451/d0fractal/blob/master/images/1j.png)

## Koch曲线分形图像
一个边长为1的等边三角形,取每边中间的三分之一,接上去一个形状完全相似的但边长为其三分之一的三角形,结果是一个六角形。取六角形的每个边做同样的变换,即在中间三分之一接上更小的三角形,以此重复,直至无穷。
Expand All @@ -40,11 +40,11 @@ The Koch snowflake can be constructed by starting with an equilateral triangle,
2. draw an equilateral triangle that has the middle segment from step 1 as its base and points outward.
3. remove the line segment that is the base of the triangle from step 2.

![](https://github.com/d0t451/fractal/blob/master/images/koch.png)
![](https://github.com/d0t451/d0fractal/blob/master/images/koch.png)

## 谢尔宾斯基地毯分形图像
将一个实心正方形划分为的9个小正方形,去掉中间的小正方形,再对余下的小正方形重复这一操作便能得到谢尔宾斯基地毯。

Divide a solid square into 9 small squares, remove the middle square, and repeat the operation for remaining small squares to get the Sierpinski carpet.

![](https://github.com/d0t451/fractal/blob/master/images/sierpinski_carpet.png)
![](https://github.com/d0t451/d0fractal/blob/master/images/sierpinski_carpet.png)
2 changes: 1 addition & 1 deletion fractal.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def draw_sierpinski_carpet_image(width, height, is_save_to_file=False):
# draw_julia_image(800, 800)

# 绘制渐变色Julia分形图像
draw_multi_color_julia_image(800, 800, begin_color=(36, 87, 193), end_color=(104, 230, 226), is_save_to_file=True)
draw_multi_color_julia_image(800, 800, begin_color=(0, 64, 64), end_color=(0, 255, 0), is_save_to_file=False)

# 绘制Mandelbrot分形图像
# draw_mandelbrot_image(800, 800)
Expand Down

0 comments on commit fbf02fb

Please sign in to comment.