Created
February 10, 2016 20:12
-
-
Save jacobjoaquin/1a75ad68e76d9e3820d3 to your computer and use it in GitHub Desktop.
Perlin Rainbow Tube for p5js.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var nx = 0, | |
ny = 1000, | |
nz = 2000, | |
nInc = 0.008; | |
function setup() { | |
createCanvas(500, 500); | |
colorMode(HSB); | |
} | |
function draw() { | |
fill(frameCount % 360, 255, 255); | |
var x = noise(nx) * width; | |
var y = noise(ny) * height; | |
var z = map(noise(nz), 0, 1, 0, 75); | |
ellipse(x, y, z, z); | |
nx += nInc; | |
ny += nInc; | |
nz += nInc; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment