MetaBalls
04 Dec 2019
Metaballs are, in computer graphics, organic-looking n-dimensional objects. The technique for rendering metaballs was invented by Jim Blinn in the early 1980s.
It always surprises me how even the simplest of maths results in wonderful looking effects.
The Metaballs below are defined by the function F(X,Y) = MetaBallRadius/( (X−X0)2 + (Y−Y0)2 ). X and Y are the center of the metaball. X0 and Y0 is the individual pixel on the screen being evaluated. The value returned by the function is used to highlight set the pixel intesity.
Sorry, your browser does not support Canvas.
VariableValue
Psychedelics

Note that the canvas above is small because this requires pixel processing.
1. metaballs.js - Download, index.html
//Code goes here

Javascript Demos

Here's a bunch of javascript... things I wrote over the years whenever time permitted.