You need to enable JavaScript to run this app.
utilspalooza
start here
examples
copy code
api
projects
lerp — live canvas animation example
motion & easing
8
+
ball bounce
docs
full function
ball orbiting a sun
docs
full function
lerp (smooth follow)
docs
full function
easing functions
docs
full function
spring (damped harmonic motion)
docs
full function
move object to changing point
docs
full function
quadratic bezier curve
docs
full function
Bézier curves
docs
full function
trig, angles & vectors
8
+
sine curve
docs
full function
demystify sine and cosine
docs
full function
find points on a circle
docs
full function
point object towards another
docs
full function
distribute around circle
docs
full function
vector reflection (bounce)
docs
full function
vector rotation
docs
full function
angle interpolation (shortest turn)
docs
full function
collision detection
11
+
point to circle collision
docs
full function
point to polygon collision
docs
full function
rectangle to rectangle collision
docs
full function
circle to rectangle collision
docs
full function
circle to circle collision
docs
full function
line to circle collision
docs
full function
line to line collision
docs
full function
line to point collision
docs
full function
line to rectangle collision
docs
full function
polygon to polygon collision
docs
full function
circle field (collision at scale)
docs
full function
numbers in motion
7
-
lerp
docs
full function
inverse lerp
docs
full function
map range
docs
full function
clamp
docs
full function
wrap
docs
full function
ping pong
docs
full function
smoothstep
docs
full function
geometry & shapes
8
+
get a point on a line
docs
full function
get line length
docs
full function
get triangle data from line
docs
full function
draw star
docs
full function
draw rectangle (using trig, not rect())
docs
full function
draw equilateral triangle (from radius and center point)
docs
full function
get circle from three points
docs
full function
center on parent
docs
full function
generative showpieces
13
+
Fourier epicycles
docs
full function
Conway's Game of Life
docs
full function
Perlin noise flow field
docs
full function
Wave interference
docs
full function
Gravitational lensing
docs
full function
Orbital precession (GR)
docs
full function
Phyllotaxis (golden angle)
docs
full function
Murmuration (flocking starlings)
docs
full function
Sierpinski Triangle
docs
full function
Glitter
docs
full function
Pretty Ring
docs
full function
Sparklies
docs
full function
Klimt-Inspired Swirls
docs
full function
handy helpers
7
+
degrees to radians
docs
full function
radians to degrees
docs
full function
format number with commas
docs
full function
random integer between
docs
full function
random number between
docs
full function
color lerp (RGB vs HSL)
docs
full function
color families (pick a range by name)
docs
full function
{ } view code
lerp blends from one number to another. The input on the left is a 0→1 dial; the output on the right slides at a steady pace from 0 to 100 as the dial turns. A plain straight-line blend — the workhorse behind almost every smooth motion.