fractalkitty looking for math? fractalkitty.com

Coded Poems

mathober day-4: Section

#trig#image#3d#animation#accumulates#poem#geometry#mathober

img1img2internalSimilitude



let img1, img2;
let d = 150;

function preload() {
  img1 = loadImage("/assets/internal.jpg");
  img2 = loadImage("/assets/sections.png");
}

function setup() {
  createCanvas(600, 600, WEBGL);
  noStroke();
}

function draw() {
  t = frameCount / 100;
  rotateX(t / 10);
  rotateY(t / 8);
  rotateZ(t / 5);
  texture(img2);
  push();
  rotateX(PI);
  translate(0, -d / 2, 0);
  cone(d, d, 50, 50, false);

  pop();
  push();
  translate(0, -d / 2, 0);
  cone(d, d, 50, 50, false);

  pop();
  push();
  rotateX(t / 2);
  rotateY(t / 3);
  rotateZ(t / 4);
  translate(20 * sin(t), 50 * cos(t / 2), 50 * sin(t));
  plane(d * 3, d * 3, d * 3);
  pop();
}

function internalSimilitude() {
  x = (C1.x * r2 + C2.x * r1) / (r1 + r2);
  y = (C1.y * r2 + C2.y * r1) / (r1 + r2);
}