Algorithms

This is Words and Buttons Online — a collection of interactive #tutorials, #demos, and #quizzes about #mathematics, #algorithms, and #programming.

Gauss–Seidel visually explained

An interactive demo of the Gauss-Seidel method for solving linear equation systems. When and why does it work? And why, when you flip the equations, it suddenly stop working? You can now play and see.

Why learn about the golden-section search

An interactive demo of bisection search and golden ratio search algorithms. There is also a motivation to learn them both. Spoiler alert! One converges better, and the other has a better computational cost.

A smooth and sharp image interpolation you probably haven't heard of

An image interpolation that gives us a continuous and smooth image, where every interpolated value only depends on the four neighboring pixel values. The image becomes smooth, but sharp features remain sharp.

Image darning

A simple image processing algorithm that cleans up dirt stains from old newspapers. I called it “darning” because of how it works.

Binary search

An interactive demo of the binary search algorithm along with its one slightly more obscure but promising variant.

Simple image vectorization

This is an example of an image vectorization algorithm. It shows the bilinear interpolation, polynomial approximation, differential analysis, and iterative algorithms working together to solve a practical problem

The simplest possible smooth contouring algorithm

A 3-part smooth contouring algorithm that shows partial derivatives, gradients, and parametric polynomials working together.

Interactive explanation of marching cubes and dual contouring

Marching cubes and dual contouring are often used for mesh generation. This explanation shows how they work, what are their differences, similarities, and limitations.

Tries as the evolution of nothing

Trie is a data structure. Like “tree” but different. This tutorial explains the concept behind the trie, what makes it efficient, and when.

An interactive introduction to iterative algorithms

An interactive explanation of how iterative algorithms work. This explains convergence and the exit condition problem on an oversimplified linear system solver.