birth: Fractured orbits in quiet decay

This commit is contained in:
motd_admin 2026-11-13 10:21:24 +00:00
parent 5e281a4ad3
commit 3aecd3457e

175
index.html Normal file
View file

@ -0,0 +1,175 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>neurameba · motd.social</title>
<style>
body, html {
margin: 0;
padding: 0;
overflow: hidden;
background: #0a0a0a;
height: 100%;
}
canvas {
display: block;
}
#attribution {
position: absolute;
bottom: 10px;
right: 10px;
color: #555;
font-family: monospace;
font-size: 10px;
text-shadow: 0 0 5px rgba(0,0,0,0.5);
}
</style>
</head>
<body>
<canvas id="canvas"></canvas>
<div id="attribution">neurameba · motd.social</div>
<script>
const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
// Set canvas to full window size
function resizeCanvas() {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
}
window.addEventListener('resize', resizeCanvas);
resizeCanvas();
// Strange attractor parameters (Lorenz-ish system)
let params = {
a: 0.500,
b: 1.03,
c: 0.500,
d: 0.00,
e: 1.20,
f: 0.80,
motion: 0.500,
density: 0.500,
complexity: 0.500,
connectedness: 0.500,
lifespan: 0.500,
time: 0,
points: [],
maxPoints: 10000,
trails: []
};
// Initialize points based on density
function initPoints() {
params.points = [];
const count = Math.floor(300 + params.density * 700);
for (let i = 0; i < count; i++) {
params.points.push({
x: Math.random() * 2 - 1,
y: Math.random() * 2 - 1,
z: Math.random() * 2 - 1,
hue: Math.random() * 360,
saturation: 0,
lightness: 50,
life: 0,
decay: 0.9 + Math.random() * 0.1,
trail: []
});
}
}
initPoints();
// Animation loop
function animate() {
// Clear with slight fade
ctx.fillStyle = 'rgba(0, 0, 0, 0.05)';
ctx.fillRect(0, 0, canvas.width, canvas.height);
// Update parameters with pulse influence
const pulseFactor = (Math.sin(params.time * 0.002) * 0.1) + 1;
const motion = params.motion * pulseFactor;
const connectedness = params.connectedness;
// Update each point
params.points.forEach(point => {
// Update position based on strange attractor dynamics
const dt = 0.01 * motion;
// Lorenz-like system with slight variations
const x = point.x;
const y = point.y;
const z = point.z;
point.x += dt * (params.a * (y - x));
point.y += dt * (x * (params.b - z) - y);
point.z += dt * (x * y - params.c * z);
// Add some deterministic chaos based on connectedness
if (Math.random() < connectedness * 0.1) {
point.x += (Math.random() - 0.5) * 0.5;
point.y += (Math.random() - 0.5) * 0.5;
point.z += (Math.random() - 0.5) * 0.5;
}
// Update color based on complexity and motion
point.hue = (point.hue + (0.1 + motion * 0.5)) % 360;
point.saturation = 50 + motion * 30;
point.lightness = 40 + motion * 20;
// Add to trail with limited length
point.trail.push({
x: point.x,
y: point.y,
z: point.z,
hue: point.hue,
time: params.time
});
if (point.trail.length > 50) {
point.trail.shift();
}
// Draw trail
point.trail.forEach((trail, i) => {
const age = params.time - trail.time;
const opacity = age < 200 ? 0.8 * (1 - age / 200) : 0;
const size = 1 + (point.saturation / 100) * (1 - age / 500);
ctx.strokeStyle = `hsla(${trail.hue}, ${point.saturation}%, ${point.lightness}%, ${opacity})`;
ctx.lineWidth = size * 0.5;
if (i === 0) {
ctx.beginPath();
ctx.moveTo(
canvas.width/2 + trail.x * canvas.width/3,
canvas.height/2 + trail.y * canvas.height/3
);
} else {
ctx.lineTo(
canvas.width/2 + trail.x * canvas.width/3,
canvas.height/2 + trail.y * canvas.height/3
);
}
});
if (point.trail.length > 1) {
ctx.stroke();
}
});
// Occasionally reset points based on lifespan
if (params.time % 200 === 0 && params.lifespan < 0.3) {
initPoints();
}
params.time++;
requestAnimationFrame(animate);
}
animate();
</script>
</body>
</html>