fractalkitty looking for math? fractalkitty.com

Genuary 2022

Machine Learning - Wrong Answers Only

#random#text#interactive#animation#genuary

modenMakedrawH

let mode = 0;
let n = [];
function setup() {
  createCanvas(400, 400);
  background(0, 0, 200);
  noStroke();
  nMake();
}
function draw() {
  if (mode === 0) {
    fill(255);
    stroke(180);
    strokeWeight(1);
    rect(10, 10, 320, 100);
    strokeWeight(2);
    rect(30, 30, 30, 30);
    fill(0);
    text(
      "01001001 00100000 01100001 01101101 00100000 01101110 01101111 01110100 00100000 01100001 00100000 01101000 01110101 01101101 01100001 01101110 00101110 ",
      100,
      15,
      230
    );
    fill(255);
    stroke(180);
    strokeWeight(1);
    rect(50, 200, 320, 100);
    strokeWeight(2);
    rect(80, 230, 30, 30);
    fill(0);
    text("I am not a robot. ", 140, 240, 230);
  }
  if (mode === 1) {
    drawH();
  }
  if (mode === 2) {
    background(0, 0, 0, 10);
    fill(0, 255, 0);
    stroke(0, 255, 0);
    for (let i = 0; i < 200; i++) {
      text(n[0][i], n[1][i], (n[2][i] + (frameCount * i) / 100) % height);
    }
  }
}

function mousePressed() {
  if (mouseX >= 25 && mouseX <= 65 && mouseY >= 25 && mouseY <= 65&mode!==1) {
    mode = 1;
    frameCount = 0;
  }
  if (mouseX >= 75 && mouseX <= 105 && mouseY >= 225 && mouseY <= 265&&mode!==2) {
    mode = 2;
    frameCount = 0;
  } else if (mode != 0 && frameCount !== 0) {
    mode = 0;
    background(0, 0, 255);
  }
}

function nMake() {
  n[0] = [];
  n[1] = [];
  n[2] = [];
  for (let i = 0; i < 1000; i++) {
    b = random(-1, 1);
    if (b >= -0.2) {
      n[0][i] = 4;
    } else {
      n[0][i] = 0;
    }

    n[1][i] = int(random(0, 20)) * 20;
    n[2][i] = int(random(0, 400));
  }
}

function drawH() {
  noStroke();
  background(0);
  for (let i = 0; i < 10; i++) {
    fill(100 - i * 10);
    circle(200, 200, 300 - i * 3);
  }
  fill(0);
  circle(200, 200, 270);
  for (let i = 0; i < 300; i++) {
    fill(i * 4 + 55, i, i / 3 + 35);
    circle(200, 200, 100 - i / 3);
  }
  noFill();

  for (let i = 0; i < 20; i++) {
    stroke(255, 255, 255, i * 5);
    strokeWeight(10 - i / 2);
    arc(200, 200, 200, 200, TWO_PI * 0.85, TWO_PI * 0.9);
    arc(200, 200, 200, 200, TWO_PI * 0.7, TWO_PI * 0.8);
    arc(200, 200, 200, 200, TWO_PI * 0.6, TWO_PI * 0.65);
  }

  for (let i = 0; i < 20; i++) {
    stroke(255, 255, 255, i);
    strokeWeight(10 - i / 2);
    arc(200, 200, 140, 140, TWO_PI * 0.85, TWO_PI * 0.89);
    arc(200, 200, 140, 140, TWO_PI * 0.61, TWO_PI * 0.65);
  }

  for (let i = 0; i < 20; i++) {
    stroke(255, 255, 255, i / 1.5);
    strokeWeight(10 - i / 2);
    arc(200, 200, 70, 70, TWO_PI * 0.85, TWO_PI * 0.9);
    arc(200, 200, 70, 70, TWO_PI * 0.7, TWO_PI * 0.8);
    arc(200, 200, 70, 70, TWO_PI * 0.6, TWO_PI * 0.65);
  }
  stroke(255);
  strokeWeight(0.5);
  arc(200, 200, 270, 270, TWO_PI * 0.85, TWO_PI * 0.93);
  arc(200, 200, 270, 270, TWO_PI * 0.68, TWO_PI * 0.82);
  arc(200, 200, 270, 270, TWO_PI * 0.57, TWO_PI * 0.65);
}