Skip to content

Instantly share code, notes, and snippets.

View davclark's full-sized avatar

Dav Clark davclark

View GitHub Profile
@geotheory
geotheory / unknown_pleasures.R
Last active January 31, 2022 12:36
Joy Division album cover with ggplot2
require(raster)
require(ggplot2)
pulsar = function(n){
x = seq(0,100, length=n)
norms = dnorm(x, mean=40, sd=6)*100 + dnorm(x, mean=60, sd=6)*50
noise1 = approx(sample(c(rep(0:8,2),18:19)), n = n, y=NULL)$y
noise2 = approx(sample(0:50), n = n, y=NULL)$y
noise3 = rnorm(n)
abs(norms + norms * noise1 + norms * noise2 * .1 + noise3)