Challenges

Featured Challenge:
#183 — Mathematical Marbling

All aboard as I attempt to simulate the artistic process of paper marbling. The algorithm is based on the paper 'Mathematical Marbling' by S. Lu, A. Jaffer, X. Jin, H. Zhao, and X. Mao. The code is written in JavaScript using the p5.js library.

may 02, 2024

Mathematical Marbling

Filter by Language

Pick a language to filter

Filter by Topic

Pick a topic to filter

In this coding challenge, I simulate a blob-like shape with wobbly edges using beginShape(), endShape(), polar coordinates, and perlin noise.

Blobby!

In Part 1 of this multi-part coding challenge, I introduce the classic computer science problem of the Traveling Salesperson (TSP) and discuss the pitfalls with a brute force solution. In Part 2, I discuss Lexicographic Ordering and demonstrate one algorithm to iterate over all the permutations of an array. In Part 3, I apply this algorithm to a brute-force solution of the TSP problem. Every single route permutation is checked one by one. In Part 4, I attempt to create a solution to the TSP problem with a genetic algorithm, and then I add a “crossover” algorithm in Part 5.

Traveling Salesperson

In this coding challenge, I implement a "Poisson-disc Sampling" algorithm to evenly (but randomly) distribute a set of seed points throughout a canvas. The algorithm is implemented in JavaScript using p5.js.

Poisson-disc Sampling

In this coding challenge, I explore the generative algorithm "Diffusion-Limited Aggregation". The pattern is generated from random walkers clustering around a seed (or set of seed) point(s).

Diffusion-Limited Aggregation

In this multi-part coding challenge, I create a clone of the multiplayer online game Agar.io with JavaScript, node.js and websockets.

Agar.io

It's time to attempt to build a Flappy Bird clone in JavaScript with the p5.js!

Flappy Bird

In this coding challenge, I continue one of my favorite subjects: Algorithmic botany! This video covers the subject of Phyllotaxis, what it is and how it can be used to generate sunflower-like patterns inspired by nature.

Phyllotaxis

In this coding challenge, I implement a "smart rockets" algorithm (based on a simulation by Jer Thorp).

Smart Rockets in p5.js

Let's code some Metaballs (aka Isosurfaces) in Processing and how to control them using the Blob Detection methodology from my computer vision tutorial!

Metaballs

In this 4th of July themed coding challenge, I build an HTML5 canvas fireworks simulation from scratch using the p5.js JavaScript library. I also show how to use Processing to create 3D Fireworks.

Fireworks

In this coding challenge, I use the "superformula" to make a 3D "supershape" in Processing. This is part 4 of a multi-part series on superformulas, superellipses and supershapes

3D Supershapes

In this coding challenge, I create a sphere in Processing using spherical coordinates and triangle strips. This is the 3rd part of a multi-part series on superformulas, superellipses and supershapes.

Spherical Geometry

In this coding challenge, I use Perlin noise to create a two-dimensional flow field with the p5.js library.

Perlin Noise Flow Field

In this coding challenge, I show you how to make 2D supershapes in p5.js.

2D Supershapes

Boing! Using some particles and some springs with the Toxiclibs physics library, I create a 3D cloth simulation in Processing. Toxiclibs can now be downloaded from Processing's library manager.

3D Cloth with Toxiclibs

In this coding challenge, I’m going to use superformulas to create a superellipse in p5.js. This is part 1 of a multi-part series on superformulas, superellipses and supershapes.

Superellipse

In this coding challenge, I'm building on top of the Space Colonization video and creating a 3D Fractal Tree, using the same algorithm, in Processing.

3D Fractal Trees

In this third installment of my series on algorithmic botany, I discuss L-systems and how they can be used to generate trees and other fractal patterns in p5.js.

Fractal Trees - L-System

In this coding challenge, I'm using the space colonization algorithm to make a tree generator. This is the 4th part of my algorithmic botany series.

Space Colonization

In this coding challenge, I'll implement fractal trees with recursion in p5.js. This is the first part of a series on algorithmic botany.

Recursive Fractal Trees

More algorithmic botany! Another way to generate a fractal tree is to consider every part of the tree an object, so that we can apply forces and attributes to all the branches and leaves and more!

Object-Oriented Fractal Trees

In this coding challenge, I visualize a Reaction Diffusion simulation using the Gray Scott model in JavaScript (with the p5.js library).

Reaction Diffusion Algorithm

In this coding challenge, I show you how to visualization the Lorenz Attractor in Processing.

The Lorenz Attractor

Let's fly to new heights with a 3D terrain coding challenge! Using Perlin Noise and beginShape() + endShape() with triangle strips, I'll guide you through visualizing a 3D procedural terrain in Processing.

3D Terrain Generation with Perlin Noise

Choo choo! In this multi-part coding challenge, I create a maze generator using a depth-first search algorithm with recursive backtracking. The idea is to walk through a grid of cells, removing walls as we go to build a maze.

Maze Generator

In the second part of this coding challenge, using Processing, I take the code from the 2D Solar System and turn it three-dimensional.

Solar System (3D)

In part 3 of this coding challenge, using Processing, I add textures to the 3D objects created in part 2. The PShape class and createShape() functions are covered.

Solar System (3D) with textures

In this viewer submitted coding challenge, I make a 2D Solar System Generator in Processing.

Solar System (2D)

In this viewer submitted coding challenge, I program a cellular mitosis simulation in p5.js.

Mitosis Simulation

This is my attempt to make a Space Invaders type game in the browser with JavaScript and the p5.js library

Space Invaders

In this viewer submitted coding challenge, I attempt to code a Purple Rain Simulator in Processing.

Purple Rain

In this coding challenge, I code a p5.js version of the Snake Game.

The Snake Game

In this coding challenge, I attempt to code the Menger Sponge (fractals) using Processing.

Menger Sponge Fractal

This is the first in a new series of videos. In this video I attempt to program a "star field" or "warp speed" visualization in Processing.

Starfield in Processing