v1
9/13/2022 by steveruizok -00
Setup HTML - click to add setup HTML
disable setup JavaScript
Setup JavaScript
let ellipses = [];

for (let i = 0; i < 10000; i++) {
  ellipses.push([Math.floor(Math.random() * 100), Math.floor(Math.random() * 100), Math.floor(Math.random() * 100), Math.floor(Math.random() * 100), 200]);
}
delete caserun single casemove downdrag and drop case


ready



function pointsOnEllipse(cx, cy, rx, ry, n) {
  const points = [];

  const step = Math.PI / (n / 2);
  let sin = 0;
  let cos = 1;

  const a = Math.cos(step);
  const b = Math.sin(step);

  for (let i = 0; i < n; i++) {
    points[i] = { x: cx + rx * cos, y: cy + ry * sin };
    const ts = b * cos + a * sin;
    const tc = a * cos - b * sin;
    sin = ts;
    cos = tc;
  }

  return points;
}


for (let i = 0, n = ellipses.length; i < n; i++) {
  const ellipse = ellipses[i];
  pointsOnEllipse(ellipse[0], ellipse[1], ellipse[2], ellipse[3], ellipse[4]);
}
delete caserun single casemove upmove downdrag and drop case


ready



function pointsOnEllipse(cx, cy, rx, ry, n) {
  const points = Array(n);

  const step = Math.PI / (n / 2);
  let sin = 0;
  let cos = 1;

  const a = Math.cos(step);
  const b = Math.sin(step);

  for (let i = 0; i < n; i++) {
    points[i] = { x: cx + rx * cos, y: cy + ry * sin };
    const ts = b * cos + a * sin;
    const tc = a * cos - b * sin;
    sin = ts;
    cos = tc;
  }

  return points;
}


for (let i = 0, n = ellipses.length; i < n; i++) {
  const ellipse = ellipses[i];
  pointsOnEllipse(ellipse[0], ellipse[1], ellipse[2], ellipse[3], ellipse[4]);
}
delete caserun single casemove upmove downdrag and drop case


ready



function pointsOnEllipse(cx, cy, rx, ry, n) {
  const points = [];
  const PI2 = Math.PI * 2;

  for (let i = 0; i < n; i++) {
    const t = PI2 * (i / n);
    points[i] = { x: cx + rx * Math.cos(t), y: cy + ry * Math.sin(t) };
  }

  return points;
}

for (let i = 0, n = ellipses.length; i < n; i++) {
  const ellipse = ellipses[i];
  pointsOnEllipse(ellipse[0], ellipse[1], ellipse[2], ellipse[3], ellipse[4]);
}
delete caserun single casemove updrag and drop case


ready



function pointsOnEllipse(cx, cy, rx, ry, n) {
  const points = Array(n);
  const PI2 = Math.PI * 2;

  for (let i = 0; i < n; i++) {
    const t = PI2 * (i / n);
    points[i] = { x: cx + rx * Math.cos(t), y: cy + ry * Math.sin(t) };
  }

  return points;
}

for (let i = 0, n = ellipses.length; i < n; i++) {
  const ellipse = ellipses[i];
  pointsOnEllipse(ellipse[0], ellipse[1], ellipse[2], ellipse[3], ellipse[4]);
}
Test Case - click to add another test case
Teardown JS - click to add teardown JavaScript
Output (DOM) - click to monitor output (DOM) while test is running
RUN