Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fractals help.

Similar presentations


Presentation on theme: "Fractals help."— Presentation transcript:

1 Fractals help

2 Overview Last lecture: Modules Variable scope Packages This time
Work through results from the lab Additional problems

3 Task 1 Create a directory to store you new modules and packages
Add the directory to your module path using the .bashrc file Write a module that when given a 2D array of 1 and 0s saves a pbm file to disk

4 Mandelbrot set: plotting module

5 Using the plotting module

6 Putting the module in the path
On the Linux terminal: mkdir ~/python_bin export PYTHONPATH="${PYTHONPATH}:/home/users/tom00/python_bin" cp mypbm.py mypbm_backup.py # save a backup just in case mv mypbm.py ~/python_bin Make sure you do not duplicate modules. If you have one in your working directory and one in the PYTHONPATH which is the system using?

7 The Mandelbrot set

8 Koch snowflake Part 1 Koch curve

9 Order 2 Koch curve

10 Order n Koch curve

11 Snowflake

12 New task: Julia Sets For each c a Julia Set can be constructed.
The Mandelbrot set acts as an index for the Julia set Based on the Mandelbrot code calculate the Julia set for c= i i i i

13 Extra problems Write a code to evaluate the area of the Mandelbrot and Julia sets Add colour/grey scale to the Mandelbrot plot. The Julia set is not always connected, write a code to calculate a histogram for the size of domains.


Download ppt "Fractals help."

Similar presentations


Ads by Google