A Project
Notes
- In the end, I would like to implement this demo.
- This will cover most of what we need in javascript.
- It will also cover some graphics content.
- And it is a cool demo.
- The Newton Fractal
- Newton's Method is a way to find the roots of a function.
- In general , for a function f(x)
-
- pick a starting point x0
- while f(xi) > ε and iterations < ITERATION_MAX
- xn+1 = xn - f(xn)/f'(xn)
- ++ iterations
- This will either converge to a root f(xi) ≤ ε
- Or it will diverge
- Newton's Method is a way to find the roots of a function.
- Different starting points will give different roots
- And color the starting point
- the color of the root it converges to
- or color the starting point black if it diverges
- Where each root is assigned a color.
- And shade the starting point
- More intense based on the inverse of the number of iterations taken to converge
- Fast convergence -> strong colors
- slow convergence -> weak colors
- a + bi, where
- a and b are floats
- $i = \sqrt{-1}$
- There is no default complex number class in javascript, so we will need to implement a complex number class.
- Specifically we will write colors directly to pixels
- You know how to program in c++
- You will follow along and build this as I do
- You will ask questions
- You will ask me to stop when you get behind
- You are able to find/use reference material.
- You will be able to deal with partially developed concepts
- For example, we need to use colors
- We will do something now
- We will formally discuss color later.