8000 GitHub - zeltbrennt/random_vis: Some visualisations of algorithms and math made in processing / java
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

zeltbrennt/random_vis

Repository files navigation

Random Visualizations

Some visualizations of algorithms and math made in processing / java

Mandelbrot & Julia

A simple visualization of the Mandelbrot-Set. Any complex number $c$ is part of the set, if the function $f(z) = z^2 + c$ starting from $z_0 = 0$ does not diverge. The interactive part is inspired by Ben Sparks work. The mouse position corresponds to the value of $c$, while the points on the graph represent the values for $z$ for iteration 0 to 10. Numbers that are part of the set are colored black, while for any other number, the color represents the number of iterations it takes for $z$ to reach infinity1.

On the right side is the corresponding Julia-Set. It uses the same formula as the Mandelbrot-Set, but instead of starting at $z_0 = 0$ every complex number is considered. The constant $c$ is still arbitrary chosen.

The graph for the first 10 values of $z$ for every given $c$ is only shown on the Mandelbrot-Set and can be disabled by pressing x.

Raycasting

This is a recreation of the Coding challange #146 from codingtrain. I might expand this further in the future. Basic movement is possible via WASD. I could integrate the maze creating algorithm to have a more interesting scene.

Labyrinth creating algorithm

A simple recursive backtracking algorithm using depth first search to generate a maze. Recreation of Coding Challange #10 from codingtrain.

Quadtree

Another codingtraing Coding Challenge (#98). Here it's to demonstrate the Quadtree data-structure, to minimize the load of other algorithms.

Rose

Still have to find the name of this thing. The idea is basically to have a circle of radius $r$ be bounded by $n$ tangents. The intersections of each tangent make a shape of $n$ vertices and $n$ edges. Each vertex lies on another circle, that is bound by $n+1$ tangents and so on. The radius $r_{n+1}$ is defined by $r_{n+1} = r_n \div \cos(\frac{\pi}{n})$.

Each shape rotates based on the number of vertices: if prime, it rotates clockwise, if even, it rotates counter-clockwise.

Warpspeed

2D-Animation like the Warp-Speed-Effect from Star Trek. Points just speed up and increase in size depending on its distance to the center of the frame.

Recamán-Sequence

$a_n = a_{n-1} -n \text{ if } a_{n-1} -n > 0 \text{ and not alredy in sequence, }a_{n-1} + n \text{ otherwise}$. It's assumed, but not proven, that this will eventually reach every Number in $\N^+$

Feigenbaum-Diagram

Shows the Feigenbaum-Diagram of the function $x_{n+1} = rx_n(1-x_n)$, where $x$ is a population-size relative to a maximum and $r$ is a growth-rate over a certain period. For different values of $r$ the population either stabilizes, oscillates between $2^i$ values or shows chaotic behavior. The starting conditions have little to no influence on the populations after a few iterations.

Footnotes

  1. infinity in this case is defined as a certain threshold, at wich the algorithm stops.

About

Some visualisations of algorithms and math made in processing / java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0