Datacentres on the Moon

Ever though of the kinks, yet:

It’s

Perhaps,

1 Like

Definitely

Have you?

Have you ever been?

Better alternative?

Ubethejudge

What are you on about Meno?

Just stuck on this music, that’s all , trying to cut down on diversions, though

And You?

How’s the pubs?

Do You know that once I went to a pub?

Anyway summer lover and it has become deearily pleasing after a long hiatus of heat, no sun out, and the refreshing rain is a welcome sign of what they predict w to be a long wet winter.

Thanks for checking in, oh the zombies have more to show hole saying the same thing.

Do you agree it adds optical depth with Beethoven staring down patriarchal?

1 Like

I can’t afford to go to the pub Meno, not these days. I just drink at home, me myself and I. I never saw Beethoven as a patriarchal character.

I do have a lot to say, like usual, I don’t know if you know I always have a lot to say, but will try to keep it short, Niell.Forgive if I got that short. Don’t know if You got to the psych forums lately. I have been thinking about death lately, partly out of altruism, but I though as my friend Pilot
did as well, but another poster superseded me there and curiously I read through some of it, oh remember the man, but not his name, he is also afraid to take the plunge, that plunge into the icy waters which befalls all participants here and now: I was sympathetic to him as I am now as well, quoting a large array of cited stuff, and thought his method does not foreclose my main point, it augments it. In particular the part about multiple sources describing the themes and and current problems facing today.

(Just glanced @ ‘quantum mysticism’ where you were either the a participant and or author, fascinating: then I stopped away for an urgancy( call to breakfast)

Back nor trying to recollect and reconnect)Null, by bits and pieces, and that is the author of ‘astrology’ who superseded my opus, and found repeatedly paralleling the inherent idea that many sources will integrate to a common theme, this one about ceasing to exist, hit the bucket, etc- and proving beyond a shadow of doubt the premise

There’s a psych forum for bipolar I’ve been to, I didn’t post but it’s interesting to read what the other manic swingers write, going back to being a lurker, it suits me better. Hope you are well.

Yes because I’m adding to my safe space not any more of constructing additional footage, but by minimizing to the near absolute to escape non objects getting in my way

60 some years ago, it’s fading but am intensional and pressed sole survivor

I don’t mind when people use AI to answer a post, it really doesn’t bother me. As long as it is made clear it’s LLM output, what’s the harm? AI is often better at explaining a concept than a human, it’s at least more concise and to the point.

Dunno.

Nematodal app

In bloom.

Now with presets / pallets

Nematodal 2

Source
// script.js
const canvas = document.getElementById("nematodeCanvas");
const ctx = canvas.getContext("2d");

let width, height;
function resize() {
  width = canvas.width = window.innerWidth;
  height = canvas.height = window.innerHeight;
}
window.addEventListener("resize", resize);
resize();

// --- Worm Configuration Object (Mutable via UI) ---
const CONFIG = {
  EGGS: 100,
  SENSE_DISTANCE: 3,
  SENSE_ANGLE: 0.45,
  TURN_SPEED: 0.40,
  MOVE_SPEED: 1.2,
  INVERSE_LENGTH: 0.009,
  EXPRESSION: 0.5,
  MIN_LIFESPAN: 100,
  MAX_LIFESPAN: 20000,
  INVERT: false,
  WRAP: false // [NEW] Infinite Canvas Toggle
};

// --- Presets Object ---
const PRESETS = {
  "Default Nematode": {
    EGGS: 100, SENSE_DISTANCE: 3, SENSE_ANGLE: 0.45, TURN_SPEED: 0.40, MOVE_SPEED: 1.2,
    INVERSE_LENGTH: 0.009, EXPRESSION: 0.5, MIN_LIFESPAN: 100, MAX_LIFESPAN: 20000, INVERT: false, WRAP: false
  },
  "The Web": {
    EGGS: 1000, SENSE_DISTANCE: 18, SENSE_ANGLE: 0.45, TURN_SPEED: 0.40, MOVE_SPEED: 1.2,
    INVERSE_LENGTH: 0.001, EXPRESSION: 0.5, MIN_LIFESPAN: 10000, MAX_LIFESPAN: 20000, INVERT: false, WRAP: false
  },
  "Embryo (Blastula)": {
    EGGS: 300000, SENSE_DISTANCE: 18, SENSE_ANGLE: 0.45, TURN_SPEED: 0.40, MOVE_SPEED: 0.5,
    INVERSE_LENGTH: 0.9, EXPRESSION: 0.5, MIN_LIFESPAN: 10000, MAX_LIFESPAN: 20000, INVERT: false, WRAP: false
  },
  "Reactor Core": {
    EGGS: 300000, SENSE_DISTANCE: 30, SENSE_ANGLE: 0.45, TURN_SPEED: 0.3, MOVE_SPEED: 1.0,
    INVERSE_LENGTH: 0.9, EXPRESSION: 0.9, MIN_LIFESPAN: 100, MAX_LIFESPAN: 900, INVERT: false, WRAP: false
  },
  "Nerve Tissue": {
    EGGS: 300000, SENSE_DISTANCE: 30, SENSE_ANGLE: 0.15, TURN_SPEED: 0.3, MOVE_SPEED: 2.0,
    INVERSE_LENGTH: 0.1, EXPRESSION: 0.5, MIN_LIFESPAN: 10000, MAX_LIFESPAN: 90000, INVERT: false, WRAP: false
  },
  "The Sprig": {
    EGGS: 300000, SENSE_DISTANCE: 30, SENSE_ANGLE: 0.65, TURN_SPEED: 0.9, MOVE_SPEED: 1.0,
    INVERSE_LENGTH: 0.1, EXPRESSION: 0.5, MIN_LIFESPAN: 10000, MAX_LIFESPAN: 90000, INVERT: false, WRAP: false
  },
  "Infinite Web": { // A preset specifically built for wrapping
    EGGS: 5000, SENSE_DISTANCE: 12, SENSE_ANGLE: 0.45, TURN_SPEED: 0.4, MOVE_SPEED: 1.0,
    INVERSE_LENGTH: 0.005, EXPRESSION: 0.5, MIN_LIFESPAN: 10000, MAX_LIFESPAN: 20000, INVERT: false, WRAP: true
  }
};

// --- Color Palettes ---
const PALETTES = {
  "Original Gold": { r: 1.0, g: 0.8, b: 0.4 },
  "Cyberpunk":     { r: 0.1, g: 1.0, b: 0.9 },
  "Toxic Slime":   { r: 0.3, g: 1.0, b: 0.1 },
  "Blood Red":     { r: 1.0, g: 0.1, b: 0.1 },
  "Ghostly White": { r: 1.0, g: 1.0, b: 1.0 },
  "Deep Sea":      { r: 0.1, g: 0.4, b: 1.0 }
};

let currentPalette = PALETTES["Original Gold"];

// Organic mapping dictionary for UI display labels
const LABELS = {
  EGGS: "Spawning Potential",
  SENSE_DISTANCE: "Vision Range",
  SENSE_ANGLE: "Perception Arc",
  TURN_SPEED: "Agility / Agitation",
  MOVE_SPEED: "Kinetic Velocity",
  INVERSE_LENGTH: "Memory Decay",
  EXPRESSION: "Fractal Bloom",
  MIN_LIFESPAN: "Lifespan (Min)",
  MAX_LIFESPAN: "Lifespan (Max)",
  INVERT: "Microscope Light",
  WRAP: "Infinite Canvas" // [NEW] Label
};

canvas.style.filter = CONFIG.INVERT ? "invert(1)" : "invert(0)";

const uiInputs = {};

// --- Dynamic UI Implementation ---
function createUI() {
  
  // ==========================================
  // RIGHT SIDE: CONTROLS
  // ==========================================
  const controlsContainer = document.createElement("div");
  controlsContainer.style.position = "absolute";
  controlsContainer.style.top = "10px";
  controlsContainer.style.right = "10px";
  controlsContainer.style.display = "flex";
  controlsContainer.style.flexDirection = "column";
  controlsContainer.style.alignItems = "flex-end";
  controlsContainer.style.gap = "6px";
  controlsContainer.style.zIndex = "1000";
  controlsContainer.style.filter = "invert(1)";

  const controlsToggleBtn = document.createElement("button");
  controlsToggleBtn.innerText = "Hide Controls";
  controlsToggleBtn.style.padding = "6px 12px";
  controlsToggleBtn.style.background = "rgba(0, 0, 0, 0.85)";
  controlsToggleBtn.style.color = "#fff";
  controlsToggleBtn.style.border = "1px solid #555";
  controlsToggleBtn.style.cursor = "pointer";
  controlsToggleBtn.style.borderRadius = "3px";
  controlsToggleBtn.style.fontFamily = "monospace";
  controlsToggleBtn.style.fontSize = "11px";

  const controlsPanel = document.createElement("div");
  controlsPanel.style.background = "rgba(0, 0, 0, 0.85)";
  controlsPanel.style.color = "#fff";
  controlsPanel.style.fontFamily = "monospace";
  controlsPanel.style.padding = "12px";
  controlsPanel.style.borderRadius = "6px";
  controlsPanel.style.display = "flex";
  controlsPanel.style.flexDirection = "column";
  controlsPanel.style.gap = "8px";
  controlsPanel.style.fontSize = "12px";

  controlsToggleBtn.addEventListener("click", () => {
    if (controlsPanel.style.display === "none") {
      controlsPanel.style.display = "flex";
      controlsToggleBtn.innerText = "Hide Controls";
    } else {
      controlsPanel.style.display = "none";
      controlsToggleBtn.innerText = "Show Controls";
    }
  });

  controlsContainer.appendChild(controlsToggleBtn);
  controlsContainer.appendChild(controlsPanel);

  for (const key in CONFIG) {
    const row = document.createElement("div");
    row.style.display = "flex";
    row.style.justifyContent = "space-between";
    row.style.alignItems = "center";
    row.style.gap = "15px";

    const label = document.createElement("label");
    label.innerText = LABELS[key] || key; 
    label.style.width = "160px"; 

    const input = document.createElement("input");
    
    if (typeof CONFIG[key] === "boolean") {
      input.type = "checkbox";
      input.checked = CONFIG[key];
      input.style.cursor = "pointer";
      
      input.addEventListener("change", (e) => {
        CONFIG[key] = e.target.checked;
        if (key === "INVERT") {
          canvas.style.filter = CONFIG[key] ? "invert(1)" : "invert(0)";
        }
        // [NEW] Clear the canvas when turning WRAP on/off to prevent ugly edge artifacts
        if (key === "WRAP") {
            trail.data.fill(0);
        }
      });
    } else {
      input.type = "text";
      input.value = CONFIG[key];
      input.style.width = "60px";
      input.style.background = "#222";
      input.style.color = "#fff";
      input.style.border = "1px solid #555";
      input.style.padding = "2px 4px";
      input.style.borderRadius = "3px";

      input.addEventListener("input", (e) => {
        const val = parseFloat(e.target.value);
        if (!isNaN(val)) {
          CONFIG[key] = val;
        }
      });
    }

    uiInputs[key] = input; 
    row.appendChild(label);
    row.appendChild(input);
    controlsPanel.appendChild(row);
  }

  const resetBtn = document.createElement("button");
  resetBtn.innerText = "Respawn";
  resetBtn.style.marginTop = "5px";
  resetBtn.style.padding = "6px";
  resetBtn.style.background = "#444";
  resetBtn.style.color = "#fff";
  resetBtn.style.border = "none";
  resetBtn.style.cursor = "pointer";
  resetBtn.style.borderRadius = "3px";
  resetBtn.addEventListener("click", initWorms);
  controlsPanel.appendChild(resetBtn);

  document.body.appendChild(controlsContainer);

  // ==========================================
  // LEFT SIDE: PRESETS & PALETTES
  // ==========================================
  const leftContainer = document.createElement("div");
  leftContainer.style.position = "absolute";
  leftContainer.style.top = "10px";
  leftContainer.style.left = "10px";
  leftContainer.style.display = "flex";
  leftContainer.style.flexDirection = "column";
  leftContainer.style.alignItems = "flex-start";
  leftContainer.style.gap = "6px";
  leftContainer.style.zIndex = "1000";
  leftContainer.style.filter = "invert(1)";

  // --- Presets Section ---
  const presetsToggleBtn = document.createElement("button");
  presetsToggleBtn.innerText = "Hide Presets";
  presetsToggleBtn.style.padding = "6px 12px";
  presetsToggleBtn.style.background = "rgba(0, 0, 0, 0.85)";
  presetsToggleBtn.style.color = "#fff";
  presetsToggleBtn.style.border = "1px solid #555";
  presetsToggleBtn.style.cursor = "pointer";
  presetsToggleBtn.style.borderRadius = "3px";
  presetsToggleBtn.style.fontFamily = "monospace";
  presetsToggleBtn.style.fontSize = "11px";

  const presetsPanel = document.createElement("div");
  presetsPanel.style.display = "flex";
  presetsPanel.style.flexDirection = "column";
  presetsPanel.style.gap = "6px";

  presetsToggleBtn.addEventListener("click", () => {
    if (presetsPanel.style.display === "none") {
      presetsPanel.style.display = "flex";
      presetsToggleBtn.innerText = "Hide Presets";
    } else {
      presetsPanel.style.display = "none";
      presetsToggleBtn.innerText = "Show Presets";
    }
  });

  leftContainer.appendChild(presetsToggleBtn);
  leftContainer.appendChild(presetsPanel);

  for (const presetName in PRESETS) {
    const pBtn = document.createElement("button");
    pBtn.innerText = presetName;
    pBtn.style.padding = "6px 12px";
    pBtn.style.background = "rgba(0, 0, 0, 0.85)";
    pBtn.style.color = "#fff";
    pBtn.style.border = "1px solid #555";
    pBtn.style.cursor = "pointer";
    pBtn.style.borderRadius = "3px";
    pBtn.style.fontFamily = "monospace";
    pBtn.style.fontSize = "11px";
    pBtn.style.textAlign = "left";
    pBtn.style.width = "100%";
    
    pBtn.addEventListener("mouseover", () => pBtn.style.background = "rgba(50, 50, 50, 0.9)");
    pBtn.addEventListener("mouseout", () => pBtn.style.background = "rgba(0, 0, 0, 0.85)");
    pBtn.addEventListener("click", () => applyPreset(presetName));
    presetsPanel.appendChild(pBtn);
  }

  // --- Palettes Section ---
  const palettesToggleBtn = document.createElement("button");
  palettesToggleBtn.innerText = "Hide Colors";
  palettesToggleBtn.style.padding = "6px 12px";
  palettesToggleBtn.style.marginTop = "10px"; 
  palettesToggleBtn.style.background = "rgba(0, 0, 0, 0.85)";
  palettesToggleBtn.style.color = "#fff";
  palettesToggleBtn.style.border = "1px solid #555";
  palettesToggleBtn.style.cursor = "pointer";
  palettesToggleBtn.style.borderRadius = "3px";
  palettesToggleBtn.style.fontFamily = "monospace";
  palettesToggleBtn.style.fontSize = "11px";

  const palettesPanel = document.createElement("div");
  palettesPanel.style.display = "flex";
  palettesPanel.style.flexDirection = "column";
  palettesPanel.style.gap = "6px";

  palettesToggleBtn.addEventListener("click", () => {
    if (palettesPanel.style.display === "none") {
      palettesPanel.style.display = "flex";
      palettesToggleBtn.innerText = "Hide Colors";
    } else {
      palettesPanel.style.display = "none";
      palettesToggleBtn.innerText = "Show Colors";
    }
  });

  leftContainer.appendChild(palettesToggleBtn);
  leftContainer.appendChild(palettesPanel);

  for (const paletteName in PALETTES) {
    const colorBtn = document.createElement("button");
    colorBtn.innerText = paletteName;
    colorBtn.style.padding = "6px 12px";
    colorBtn.style.background = "rgba(0, 0, 0, 0.85)";
    colorBtn.style.color = "#fff";
    colorBtn.style.border = "1px solid #555";
    colorBtn.style.cursor = "pointer";
    colorBtn.style.borderRadius = "3px";
    colorBtn.style.fontFamily = "monospace";
    colorBtn.style.fontSize = "11px";
    colorBtn.style.textAlign = "left";
    colorBtn.style.width = "100%";

    const p = PALETTES[paletteName];
    colorBtn.style.borderLeft = `5px solid rgb(${p.r * 255}, ${p.g * 255}, ${p.b * 255})`;
    
    colorBtn.addEventListener("mouseover", () => colorBtn.style.background = "rgba(50, 50, 50, 0.9)");
    colorBtn.addEventListener("mouseout", () => colorBtn.style.background = "rgba(0, 0, 0, 0.85)");
    
    colorBtn.addEventListener("click", () => {
      currentPalette = PALETTES[paletteName];
    });
    
    palettesPanel.appendChild(colorBtn);
  }

  document.body.appendChild(leftContainer);
}

function applyPreset(presetName) {
  const preset = PRESETS[presetName];
  if (!preset) return;

  for (const key in preset) {
    CONFIG[key] = preset[key];
  }

  for (const key in CONFIG) {
    const input = uiInputs[key];
    if (!input) continue;
    if (typeof CONFIG[key] === "boolean") {
      input.checked = CONFIG[key];
    } else {
      input.value = CONFIG[key];
    }
  }

  canvas.style.filter = CONFIG.INVERT ? "invert(1)" : "invert(0)";
  trail.data.fill(0);
  initWorms();
}

const trail = ctx.createImageData(width, height);
const worms = [];

function randRange(min, max) {
  return min + Math.random() * (max - min);
}

function initWorms() {
  worms.length = 0;
  const centerX = width / 2;
  const centerY = height / 2;
  for (let i = 0; i < CONFIG.EGGS; i++) {
    const angle = Math.random() * Math.PI * 2;
    const radius = randRange(0, Math.min(width, height) * 0.15);
    const x = centerX + Math.cos(angle) * radius;
    const y = centerY + Math.sin(angle) * radius;
    worms.push({
      x,
      y,
      angle: angle,
      age: 0,
      life: randRange(CONFIG.MIN_LIFESPAN, CONFIG.MAX_LIFESPAN),
      alive: true
    });
  }
}

// [UPDATED] Sample trail intensity with wrapping logic
function sampleTrail(x, y) {
  if (CONFIG.WRAP) {
    // Mathematical modulo to handle negative numbers
    x = ((x % width) + width) % width;
    y = ((y % height) + height) % height;
  } else {
    if (x < 0 || y < 0 || x >= width || y >= height) return 0;
  }

  const ix = Math.floor(x);
  const iy = Math.floor(y);
  const idx = (iy * width + ix) * 4;
  return trail.data[idx];
}

function sense(worm, senseAngleOffset) {
  const angle = worm.angle + senseAngleOffset;
  const sx = worm.x + Math.cos(angle) * CONFIG.SENSE_DISTANCE;
  const sy = worm.y + Math.sin(angle) * CONFIG.SENSE_DISTANCE;
  return sampleTrail(sx, sy);
}

function updateWorms() {
  const margin = 40; 
  const centerX = width / 2;
  const centerY = height / 2;

  for (const w of worms) {
    if (!w.alive) continue;

    w.age++;
    if (w.age >= w.life) {
      w.alive = false;
      continue;
    }

    let nearEdge = false;
    let targetAngle = w.angle;

    // [UPDATED] Only seek center if WRAP is disabled
    if (!CONFIG.WRAP) {
        if (w.x < margin || w.x > width - margin || w.y < margin || w.y > height - margin) {
            nearEdge = true;
            targetAngle = Math.atan2(centerY - w.y, centerX - w.x);
        }
    }

    if (nearEdge) {
      const angleDiff = Math.atan2(Math.sin(targetAngle - w.angle), Math.cos(targetAngle - w.angle));
      w.angle += angleDiff * CONFIG.TURN_SPEED;
    } else {
      const forward = sense(w, 0);
      const left = sense(w, -CONFIG.SENSE_ANGLE);
      const right = sense(w, CONFIG.SENSE_ANGLE);

      if (forward > left && forward > right) {
        // Keep direction
      } else if (left > right) {
        w.angle -= CONFIG.TURN_SPEED * (0.5 + Math.random());
      } else if (right > left) {
        w.angle += CONFIG.TURN_SPEED * (0.5 + Math.random());
      } else {
        w.angle += (Math.random() - 0.5) * CONFIG.TURN_SPEED;
      }
    }

    w.x += Math.cos(w.angle) * CONFIG.MOVE_SPEED;
    w.y += Math.sin(w.angle) * CONFIG.MOVE_SPEED;

    // [UPDATED] Apply Wrap or Clamp logic to movement
    if (CONFIG.WRAP) {
        if (w.x < 0) w.x += width;
        if (w.x >= width) w.x -= width;
        if (w.y < 0) w.y += height;
        if (w.y >= height) w.y -= height;
    } else {
        w.x = Math.max(0, Math.min(width - 1, w.x));
        w.y = Math.max(0, Math.min(height - 1, w.y));
    }

    const ix = Math.floor(w.x);
    const iy = Math.floor(w.y);
    const idx = (iy * width + ix) * 4;

    const deposit = 220;
    trail.data[idx]     = Math.min(255, trail.data[idx]     + deposit * currentPalette.r);
    trail.data[idx + 1] = Math.min(255, trail.data[idx + 1] + deposit * currentPalette.g);
    trail.data[idx + 2] = Math.min(255, trail.data[idx + 2] + deposit * currentPalette.b);
    trail.data[idx + 3] = 255;
  }
}

function diffuseAndDecay() {
  const data = trail.data;
  const copy = new Uint8ClampedArray(data);
  const decayValue = CONFIG.INVERSE_LENGTH * 255;
  const blurVal = CONFIG.EXPRESSION;
  const invBlurVal = 1 - blurVal;

  for (let y = 1; y < height - 1; y++) {
    const rowIdx = y * width;
    const rowAbove = (y - 1) * width;
    const rowBelow = (y + 1) * width;

    for (let x = 1; x < width - 1; x++) {
      const idx = (rowIdx + x) * 4;

      let r = (copy[idx] + copy[(rowAbove + x) * 4] + copy[(rowBelow + x) * 4] + copy[(rowIdx + x - 1) * 4] + copy[(rowIdx + x + 1) * 4]) / 5;
      let g = (copy[idx + 1] + copy[(rowAbove + x) * 4 + 1] + copy[(rowBelow + x) * 4 + 1] + copy[(rowIdx + x - 1) * 4 + 1] + copy[(rowIdx + x + 1) * 4 + 1]) / 5;
      let b = (copy[idx + 2] + copy[(rowAbove + x) * 4 + 2] + copy[(rowBelow + x) * 4 + 2] + copy[(rowIdx + x - 1) * 4 + 2] + copy[(rowIdx + x + 1) * 4 + 2]) / 5;

      r = Math.max(0, r - decayValue);
      g = Math.max(0, g - decayValue);
      b = Math.max(0, b - decayValue);

      data[idx]     = r * invBlurVal + data[idx] * blurVal;
      data[idx + 1] = g * invBlurVal + data[idx + 1] * blurVal;
      data[idx + 2] = b * invBlurVal + data[idx + 2] * blurVal;
      data[idx + 3] = 255;
    }
  }
}

function render() {
  ctx.putImageData(trail, 0, 0);
}

function loop() {
  updateWorms();
  diffuseAndDecay();
  render();
  requestAnimationFrame(loop);
}

// Init
createUI();
initWorms();
loop();

I have to admit almost despite myself that these are beautiful.

Have you ever considered using them as graphical elements? I’ve seen autogenerated websites from fancy AS companies, and they are very beautiful, but I imagine them using stuff like this and it would take them to another level. The thought just came to me, I don’t know if it’s worth much.

1 Like

Thanks for that. The app is free and so is the source, it’s vibe-coded with AI, the source is a mess.