Browse Source

Beleg_Mandelbrotmenge v1.0.1

Version 1.0.1
log
- Größe der 'Canvas' wird parametrisiert
Chen Yuan 7 years ago
parent
commit
d2df558cf5
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Beleg_Mandelbrotmenge.py

+ 2 - 1
Beleg_Mandelbrotmenge.py

@@ -75,6 +75,7 @@ Xmin = -2.0
75 75
 Xmax = 0.5                                                                      # The maxmimum of real part set 0.5
76 76
 Ymin = -1                                                                       # The minimum of imaginary part set -1
77 77
 Ymax = 1                                                                        # The maximum of imaginary part set 1
78
+lenth = 400                                                                     # Set the width and the height of the canvas 400
78 79
 
79 80
 iter = 0                                                                        # Iterations has been initialized
80 81
 colorlist = []                                                                  # Colorlist has been initialized
@@ -83,7 +84,7 @@ getColor(iter)
83 84
 root = Tk()                                                                     # The TK class has been initialized
84 85
 root.title("Mandelbrotmenge - By Yuan Chen")                                    # The title has been set
85 86
 
86
-canvas = Canvas(root, width=400, height=400, bg="white")                        # The size and background of the window has been set
87
+canvas = Canvas(root, width=lenth, height=lenth, bg="white")                    # The size and background of the window has been set
87 88
 canvas.pack()                                                                   # The window will be showed
88 89
 
89 90
 Mandelbrot(Xmin, Xmax, Ymin, Ymax)                                              # The color of every pixel in the canvas has been calculated with help of the Mandelbrot funktion