--- title: trippy perlin noise slug: trippy-perlin-noise publishDate: 2019-11-25T18:16:14.000Z lastmod: 2019-11-29T01:06:04.000Z tags: [Experiments, p5.js] description: "Warning: contains some intensive JavaScript that might break your computer" images: - /images/2019/11/perlin.png ---  
Now that I can easily embed JavaScript on this blog, I should put here some of my experiments and weird code that does nothing, cause why not. This one is some colored Perlin noise made using p5.js, it would be pretty cool as a background for something, isn't it? It is quite simple using the `noise` function, one the simplest things you can do with it is `color = noise(x, y, time)` for each pixel on the canvas, usually you make it grayscale but this time I'm generating 3 of them for each color component (red, green, blue) with a different seed. It looks pretty cool, if you ask me. ```js function setup() { createCanvas(256, 256); background(0); } function draw() { var n = 0; var z = 1; var speed = 0.005; noiseDetail(8, 0.65); loadPixels(); for(a=0; a<3; a++) { noiseSeed(a+n); for(i=0; i