VISION-DEMOS

Computer vision algorithms visualized.

Perlin Noise

Perlin Noise is a gradient noise function, used to generate natural-looking terrains or patterns.

It is pseudo-random and smooth, better suited for, e.g, simulating smoke than genuinely random generation. It uses dot product over each corner of the grid on which it assumes its lay out, which, once interpolated, yields such noise.

The interpolation function choice affects the visual result. For this visualization, the function used is the fade function, aka Ken Perlin's quintic smoothing function, with formula:

\( f(t) \) = 6 \( t^5 \) - 15 \( t^4 \) + 10 \( t^3 \)

Collision detection for AABB objects

Collision detection consists in detecting the intersection of two or more objects.

One of the simplest set-ups for collision detection is as follows: working in a 2D space with said objects being axis-aligned.

In this case, detecting whether two such Axis-Aligned Bounding Boxes (AABBs) collide boils down to checking for overlap in the intervals that each box yields when projected on the x and y axes, respectively.

Collision Detection on circles: the Radius Method

One of the other simplest scenarios in which one can perform collision detection is in a 2D space, when handling circles.

To do so, one simply checks the distance between the centers of each circle. If that distance is less than the sum of their radii, they must be colliding. This equates checking:

distance = \( \sqrt{(x_{\text{1}} - x_2)^2 + (y_{1} - y_2)^2} < r_{1} + r_{2} \)