Matt DesLauriers Profile picture
artist, he/him 🇨🇦

Jul 2, 2018, 11 tweets

A function that produces a scribble.
#generative #code #javascript

So many of my sketches begin with the same function: producing a uniform distribution of values along an array, between [0..1] range. Here's how it looks in JavaScript.

I'm calling it "arcs" (for arc lengths) but perhaps there is a proper name for this sort of thing?

I use this for all sorts of things, like generating an N-sided polygon:

Or distributing N points evenly along a line segment:

Or just making a wavy horizontal line with noise.

Various outputs from the scribble function.

Using a higher dimension noise function (4D) and a walking along the parametric equation of a torus, you can get some interesting dancing motion that loops seamlessly.

Here's another variation using a different random seed.

Code for that...

Drawing out.

(Thanks @slowkow for the idea! Didn't realize how neat it looks while drawing out.)

Drawing out while walking along the torus, and shifting hues.

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling