View on GitHub

jmmut

Personal blog

Plotters

Maturas and Attactor

These are two funny projects to plot point data.

Maturas is a height map generator and visualizer, and Attractor allows visualizing 3D points while a function is applied to them, such as attractor functions.

Maturas

Respository here

This is the simplest recursive algorithm I found to create terrains.

The algorithm takes a horizontal square and computes the middle points of it:

unable to load image

Then applies small height changes to those blue points, sampling a gaussian distribution. After that, it subdivides the square in four squares, and repeats recursively.

The program has other simple functions to generate terrain, or load arbitrary matrices from standard input. The color of the points is just the height, set in the fragment shader.

Attractor

Repository here

I got interested in strange attractors such as the Lorenz or the Rossler ones, and experimented with point-based plotting.

Any function f(R^3, dt) -> R^3 can be plotted. The set of points is initially spread over a line or a square, and then the function is applied for every point. Without parallelization, 250 thousand points can be handled at 60 FPS by an i5 processor at 2.5 GHz.

The colors are computed in the shaders. Points close to the camera are blue, and those far away are red.