Skip to content
Simple implementations of sampling patterns, with objective tests to compare them
Branch: master
Clone or download
Latest commit 4539f46 Mar 3, 2019


Table of Contents



Blue Noise - Randomized sequences that have only high frequency content

Irrational Numbers - Multiply an irrational number by the squence index and take that mod 1 to make it be in [0,1)

LDS - Low discrepancy sequences

Regular - Uniformly spaced samples

Uniform Random - Randomized sample positions using a uniform random number distribution.


DFT - Transforms sampling patterns into frequency space

Discrepancy - Calculate metrics about actual point density compared to expected point density if the points were uniformly spaced.

Integration - Use sample points to integrate 1d functions

Numberline - Makes numberlines


Simple copy/paste-able implementations of sampling patterns, with objective and subjective tests to compare them, along with understandable explanations.

Created by Alan Wolfe



Building and running this code: building

Everything in this repository is under the MIT License unless otherwise stated in the source file.

Full list of contributors here: credits

Information on how to contribute to this project: contributing

Why Does This Exist??

My interest in sampling patterns is mainly for use in numerical integration techniques in real time graphics. In that situation, you usually want a sequence that will converge with as few samples as possible, and give a pleasing error pattern when it hasn't fully converged.

This stuff is surprisingly nuanced, and new sampling techniques come out every year as researchers continue to push the envelope.

It can be hard to find implementations for some sampling patterns, especially if they are newly published. Furthermore, each sampling paper seems to use different testing methods to show properties of their sequences, which can make it hard to compare against other sample sequences.

My goal is to get as many implemented and tested as possible, including new ones as they come out, so this stuff is more accessible and usable by the folks who could benefit from it.

It's a lot of work for one person though, so Sample Zoo need your help!

Other Software Used

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.