Algorithms

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

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.