Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 23 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
# STMO-ZOO
# STMO-ZOO: Link between fractals and the Newton method
### by Kim Hayoung and Merckx Anna
![Optional Text](https://github.com/HayoungKim27/STMOZOO/blob/b5a472f096674cef7b7e06b5627d4f09e4259980/figure/readmefractal.png)
Welcome to the 'Link between fractals and the Newton method' repository in STMO zoo! This is the final assignment for the course Selected Topics in Mathematical Optimization. The goal is to implement an optimization method in Julia and contribute this to this repository.

Welcome to the STMO zoo! This is your final assignment for the course Selected Topics in Mathematical Optimization. Your goal is to implement an optimization method in Julia and contribute this to this repository. To pass, you have to:
## Guideline
All the necessary project contents are in the Pluto notebook (notebook/NewtonFractals.jl).

- fork this repo and create a pull request;
- add a module to `src` with **at least one function**
- add at least one unit test to the folder `test`;
- document all your functions and add a page to the documentation page;
- make a notebook in [Pluto](https://github.com/fonsp/Pluto.jl) and add it to `notebooks`;
- perform a small code review of two other students.
**Table of contents**
- Introduction
- Fractals
- Roots of Polynomials
- Newton's method
- Newton's fractal
- The boundary property
- Reference

Depending on the project you choose some of these individual assignments might be really minimalistic, with other parts larger. For example, if you want to develop an application, say solving the graph coloring problem with Tabu Search, you might have only a single function in the source code (e.g., generating an instance) but have a fairly large notebook with a tutorial. On the other hand, if you work on a method, e.g., implementing Bee Colony Optimization, you might have many functions in the source code, while your notebook is only a demonstration on the test functions.
In this notebook we discuss the link between fractals and the Newton method. First, we explain what fractals are and where these factals can be found. We then explain what roots of polynomials are and how the Newton's method can approximate these roots. Finally, the link between fractals and the Newton method is made. Here, the important concept called the boundary property will be introduced.

[![Build Status](https://travis-ci.org/MichielStock/STMOZOO.svg?branch=master)](https://travis-ci.org/MichielStock/STMOZOO)[![Coverage Status](https://coveralls.io/repos/github/MichielStock/STMOZOO/badge.svg?branch=master)](https://coveralls.io/github/MichielStock/STMOZOO?branch=master)
![Optional Text](https://github.com/HayoungKim27/STMOZOO/blob/b5a472f096674cef7b7e06b5627d4f09e4259980/figure/widget_checkbox.png)

![Optional Text](https://github.com/HayoungKim27/STMOZOO/blob/b5a472f096674cef7b7e06b5627d4f09e4259980/figure/widget_slider.png)

As you can see above, there are many **widgets** such as checkboxes or sliders when you read each line, so please participate and learn from it.


[![Build Status](https://travis-ci.org/MichielStock/STMOZOO.svg?branch=master)](https://travis-ci.org/MichielStock/STMOZOO)[![Coverage Status](https://coveralls.io/repos/github/MichielStock/STMOZOO/badge.svg?branch=master)](https://coveralls.io/github/MichielStock/STMOZOO?branch=master)
55 changes: 51 additions & 4 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,54 @@
# STMO ZOO documentation
# STMO ZOO documentation: Link between fractals and the Newton method

This is the documentation page for the STMO ZOO packages (edition 2020-2021). This is the place for the **documentation**
of your function. So explain the main functionality of your module and list the documentation of your funtions.
This is the documentation page for the STMO ZOO packages (edition 2021-2022). This is the place for the **documentation**
of two functions, Newtonsmethod and next_guess_zygote.

1. Newtonsmethod
This function will apply the Newton's method to the real point until the difference between two consecutive guesses smaller than ϵ. Some points won't converge, when 10000 steps are made the function stops running.

```@contents
function Newtonsmethod(f, x₀, ϵ = 0.00001)

x = x₀
steps = 0

while true

Δx = f(x)/f'(x)
if abs(Δx) < ϵ
break
end
x -= Δx
steps = steps + 1

if steps == 10000
break
end

end

return x, steps

end
```

2. next_guess_zygote
This function will apply the Newton's method to the real and the complex points the algorithm stops running after n steps. The default is n = 100.

```@contents
```
function next_guess_zygote(f, x₀, n = 100)

@variables z
fr(z) = real(f(z))

x = x₀

for i = 1:n
df = gradient(fr, x)[1] |> conj
x = x - f(x) / df
end

return x

end
```
Binary file added figure/fractal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figure/readmefractal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figure/widget_checkbox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figure/widget_slider.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading