
let points = []
let pointsNumber = 100
let noiseScale = .01
function setup() {
createCanvas(400, 400)
background(220)
noStroke()
fill(0)
for (let i = 0; i < pointsNumber; i++) {
points[i] = {
x: random(width),
y: random(height),
}
}
}
function draw() {
for (let i = 0; i < pointsNumber; i++) {
circle(points[i].x, points[i].y, 1)
points[i].x += 10 * (noise(points[i].x * noiseScale,
points[i].y * noiseScale, 0) * 2 - 1)
points[i].y += 10 * (noise(points[i].x * noiseScale,
points[i].y * noiseScale, 9) * 2 - 1)
if (random() < 0.1) {
points[i] = {
x: random(width),
y: random(height),
}
}
}
}

let points = []
const pointsNumber = 1000
const noiseScale = .01
// console.log(points[1])
function setup() {
createCanvas(400, 400)
background(220)
noiseSeed(0)
fill(0)
for (let i = 0; i < pointsNumber; i++) {
points[i] = {
x: random(width),
y: random(height),
}
}
for(let x = 0; x < width; x++)
for(let y = 0; y < height; y+=4) {
stroke(255 * noise(x*noiseScale, y*noiseScale)*2-1,0,0)
point(x, y)
point(x, y+1)
stroke(0,255 * noise(x*noiseScale, y*noiseScale + .4)*2-1,0)
point(x, y+2)
point(x, y+3)
}
noStroke()
}
function draw() {
for (let i = 0; i < pointsNumber; i++) {
circle(points[i].x, points[i].y, 1)
points[i].x += 2 * (noise(points[i].x * noiseScale,
points[i].y * noiseScale) * 2 - 1)
points[i].y += 2 * (noise(points[i].x * noiseScale,
points[i].y * noiseScale + 1) * 2 - .4)
if (random() < 0.001) {
points[i] = {
x: random(width),
y: random(height),
}
}
}
}

let points = []
const pointsNumber = 1000
const noiseScale = .05
// console.log(points[1])
function setup() {
createCanvas(400, 400)
background(220)
noiseSeed(0)
fill(0)
for (let i = 0; i < pointsNumber; i++) {
points[i] = {
x: random(width),
y: random(height),
}
}
// for(let x = 0; x < width; x++)
// for(let y = 0; y < height; y+=4) {
// stroke(255 * noise(x*noiseScale, y*noiseScale)*2-1,0,0)
// point(x, y)
// point(x, y+1)
// stroke(0,255 * noise(x*noiseScale, y*noiseScale + .4)*2-1,0)
// point(x, y+2)
// point(x, y+3)
// }
noStroke()
}
function draw() {
for (let i = 0; i < pointsNumber; i++) {
circle(points[i].x, points[i].y, 1)
points[i].x += 2 * (noise(points[i].x * noiseScale,
points[i].y * noiseScale) * 2 - 1)
points[i].y += 2 * (noise(points[i].x * noiseScale,
points[i].y * noiseScale + 1) * 2 - .4)
if (random() < 0.01) {
points[i] = {
x: random(width),
y: random(height),
}
}
}
}

let points = []
const pointsNumber = 1000
const noiseScale = .01
const respawnProbability = 0.01
const noiseShift = 1
const maxStep = 1
// console.log(points[1])
function setup() {
createCanvas(400, 400)
frameRate(100)
background(220)
noiseSeed(0)
fill(0)
for (let i = 0; i < pointsNumber; i++) {
points[i] = {
x: random(width),
y: random(height),
}
}
// for(let x = 0; x < width; x++)
// for(let y = 0; y < height; y+=4) {
// stroke(255 * noise(x*noiseScale, y*noiseScale)*2-1,0,0)
// point(x, y)
// point(x, y+1)
// stroke(0,255 * noise(x*noiseScale, y*noiseScale + .4)*2-1,0)
// point(x, y+2)
// point(x, y+3)
// }
noStroke()
}
function draw() {
background(200, 10)
for (let i = 0; i < pointsNumber; i++) {
circle(points[i].x, points[i].y, 1)
points[i].x += maxStep * (noise(points[i].x * noiseScale,
points[i].y * noiseScale) * 2 - 1)
points[i].y += maxStep * (noise(points[i].x * noiseScale,
points[i].y * noiseScale + noiseShift) * 2 - 1)
if (random() < respawnProbability) {
points[i] = {
x: random(width),
y: random(height),
}
}
}
}

let N = 5
function setup() {
createCanvas(400, 400)
// noFill()
noStroke()
colorMode(HSB)
}
function draw() {
fill(random(100), 100, 100)
background(220)
translate(width/2, height/2)
rotate(PI/5)
beginShape()
for (let i = 0; i < N*2; i+=2) {
let a = i * 2 * PI / N
let x = 100 * sin(a)
let y = 100 * cos(a)
vertex(x, y)
}
endShape(CLOSE)
}