4) lowres
Perlin noise, but … really lowres? You can play with how low res or how many colors you want.
Perlin noise, but … really lowres? You can play with how low res or how many colors you want.
This is entirely based around this Fibonacci generator function:
function makeFibber(maxValue = 1000) {
let a = 1;
let b = 1;
return () => {
let n = a + b;
a = b;
b = n;
if (b > maxValue) {
a = 1;
b = 1;
}
return a;
};
}
Make a fibber and then just keep calling it for next values.
All sorts of exciting options here!
Twelve principles of animation
That … is a lot. And I’m not really an animator. But let’s see what we can do!
It’s been a couple years since I last did Genuary. Let’s do it again. I don’t expect to make any masterpieces, but I enjoy making tiny pretty pictures. It’s something I’ve been doing honestly as long as I’ve been programming (I remember making brownian motion ‘bugs’ in QBasic in the 90s…).
Spend a month making one beautiful thing per day, given a bunch of prompts. A month late, but as they say, ’the second best time is now'.
Let’s do it!
Spend a month making one beautiful thing per day, given a bunch of prompts. A month late, but as they say, ’the second best time is now'.
Let’s do it!
let gui;
let params = {
lineWidth: 10,
minWidth: 50,
maxWidth: 100, maxWidthMax: 400,
minHeight: 50,
maxHeight: 100, maxHeightMax: 400,
colorChance: 0.1, colorChanceMin: 0, colorChanceMax: 1, colorChanceStep: 0.01,
}
let box;
let colors = [
"red",
"blue",
"yellow",
]
function setup() {
createCanvas(400, 400);
box = {
x: -params.lineWidth,
y: -params.lineWidth,
width: random(params.minWidth, params.maxWidth),
height: random(params.minHeight, params.maxHeight),
}
gui = createGuiPanel('params');
gui.addObject(params);
gui.setPosition(420, 0);
}
function draw() {
strokeWeight(params.lineWidth);
stroke("black");
if (random() < params.colorChance) {
fill(random(colors));
} else {
fill("white");
}
rect(box.x, box.y, box.width, box.height);
box.y += box.height;
box.height = random(params.minHeight, params.maxHeight);
if (box.y > height) {
box.x += box.width;
box.y = -params.lineWidth;
box.width = random(params.minWidth, params.maxWidth);
box.height = random(params.minHeight, params.maxHeight);
}
if (box.x > width) {
noLoop();
}
}
I did have a sketch before that that ended up getting a little un-minimal:
Spend a month making one beautiful thing per day, given a bunch of prompts. A month late, but as they say, ’the second best time is now'.
Let’s do it!
Spend a month making one beautiful thing per day, given a bunch of prompts. A month late, but as they say, ’the second best time is now'.
Let’s do it!
Spend a month making one beautiful thing per day, given a bunch of prompts. A month late, but as they say, ’the second best time is now'.
Let’s do it!
Spend a month making one beautiful thing per day, given a bunch of prompts. A month late, but as they say, ’the second best time is now'.
Let’s do it!