Skip to content

Conversation

@suluke
Copy link
Owner

@suluke suluke commented Dec 2, 2018

This effect does the following:

  • During setup, a web-worker is used for computing a displacement map
  • The first step of this computation renders a grayscale Mandelbrot texture
  • The grayscale image data is interpreted as a gradient map where following lower brightnesses should eventually lead to the black area of the Mandelbrot fractal
  • Using BFS and gradient-descent, the closest black pixel is computed for each particle
  • The displacement vector is simply the difference between the original coordinate and the black pixel destination coordinate.

There are still many parameters left to be made user-configurable. I.e.:

  • lookAt
  • zoom
  • iterations (+auto mode)

Furthermore, we should maybe add a random displacement and/or improve the algorithm that tries to prevent all particles to converge on the edges.
This approach should also be generalizable to arbitrary gradient textures. Maybe we want to build an effect that takes an image, processes it with edge-filter and gauss-blur and then uses that as input - ConvergeToImageEdges

This adds basic caching facilities to reduce waiting times, especially
when running in random timeline mode.
Also, this prepares the Mandelbrot rendering process to be parameterized
(which may make caching a problematic later).
@suluke suluke changed the title Fractal Effect [WIP] Fractal Effect Dec 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants