paint-brush
Pseudo-random Beasts and Where to Find Them: A Cheat Sheet for ES6 & Python 3by@PleatherStarfish
636 reads
636 reads

Pseudo-random Beasts and Where to Find Them: A Cheat Sheet for ES6 & Python 3

by Daniel Miller13mAugust 28th, 2018
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

I love generative art, and I frequently use a pseudo-random function to add a bit of noise to an image or behavior, but every time I implement a pseudo-random number function in JavaScript it takes me a second to remember how this works. So I thought I would write a quick post with a few of the most common pseudo-random number functions (henceforth referred to as simply “random” numbers) implemented in both vanilla ES6 and (just for fun) Python 3 as well. Of course there are infinitely many probability distributions and stochastic processes to explore, but I’ll keep this simple and save some useful concepts like <a href="https://en.wikipedia.org/wiki/Markov_chain" target="_blank">Markov chains</a> and <a href="https://en.wikipedia.org/wiki/Template:Coherent_noise" target="_blank">coherent noise</a> for another time.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Pseudo-random Beasts and Where to Find Them: A Cheat Sheet for ES6 & Python 3
Daniel Miller HackerNoon profile picture
Daniel Miller

Daniel Miller

@PleatherStarfish

L O A D I N G
. . . comments & more!

About Author

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Freefoto