Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasKristensen committed Apr 26, 2023
2 parents babed7d + 3bb59d6 commit 1836f28
Show file tree
Hide file tree
Showing 13 changed files with 61 additions and 24 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python application

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
38 changes: 18 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# Mandelbrot-Mini-Project
Implementation of the Mandelbrot set for the Numerical Scientific Computing Course (Computer Engineering 8th semester, AAU)

- To compare the performance between the algorithms run the [``main.py``](main.py) file.
- To generate a plot showing the mandelbrot set configure one of the parameters to ``show_figure=True`` in [``main.py``](main.py).
## Features
- Compare the different algorithm approaches: [``main.py``](main.py)
- Mandelbrot Interactive Navigator [``mandelbrot_navigator.py``](mandelbrot_navigator.py)
- Mandelbrot Zoom Animation [``Zoom Animation/mandelbrot_animation.py``](<Zoom Animation/mandelbrot_animation.py>)
- Video: https://www.youtube.com/watch?v=L2zKIrriDfI
- Mandelbrot Iteration Animation [``Iterations Animation/mandelbrot_iteration_animation.py``](<Iterations Animation/mandelbrot_iteration_animation.py>)
- Video: https://www.youtube.com/watch?v=8BjqgaIuses

</br>

Expand Down Expand Up @@ -36,6 +41,14 @@ Generated sequence of zoom into fractal [``mandelbrot_iteration_animation.py``](

</br>

## Interactive Navigator

Navigation through the Mandelbrot Set by using keyboard controls [``mandelbrot_navigator.py``](mandelbrot_navigator.py)

![img](<interactive_screenshot.png>)

</br>


<!----------------------------------------->

Expand All @@ -47,6 +60,9 @@ Generated sequence of zoom into fractal [``mandelbrot_iteration_animation.py``](
| [``mandelbrot_numba.py``](mandelbrot_numba.py)| 115.25 |
| [``mandelbrot_multicore.py``](mandelbrot_multicore.py)| 37.89 |
| [``mandelbrot_dask.py``](mandelbrot_dask.py)| 25.07 |
| [``mandelbrot_opencl.py``*](mandelbrot_opencl.py)| 1.07 |

*Limited to float64 precision


| | Complex64 | Complex128 |
Expand Down Expand Up @@ -76,24 +92,6 @@ pip install -r requirements.txt
```
</br>

<!----------------------------------------->

## Project Hand Ins
**Mini-Project Part 1** ([``Hand-In``](Part%201%20-%20Algorithms%20with%20performance%20analysis/Mini%20Project%20Report%20Part%201.pdf))</br>
- Naive
- Vectorized
- Numba-optimized
- Parallel using multi-processing
- Computation analysis of speedup between parameters</br>

**Mini-Project Part 2** ([``Hand-In``](Part%202%20-%20DASK%20and%20Datatypes/Numerical%20Scientific%20Computing%20Mini%20Project%20Part%202.pdf))</br>
- Performance of data types (Numpy.Float64, Numpy.Float32, Numpy.Float16)
- Dask compared to numpy
- Dask local execution
- Dask distributed execution
- Performance optimizations (Early stopping, data types, lazy loading)

</br>

<!----------------------------------------->

Expand Down
Binary file added interactive_screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dask==2023.3.0
matplotlib==3.5.2
numba==0.53.0
numpy==1.21.6
dask==2022.2.1
matplotlib==3.5.3
numba==0.56.3
numpy==1.22.3
opencv_python==4.5.3.56
pyopencl==2022.3.1

0 comments on commit 1836f28

Please sign in to comment.