html, body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background: #292a33;
  overflow: hidden;
}
const r = 100;
let x, y, angle;

function setup() {
  createCanvas(windowWidth, windowHeight);

  x = r;
  y = 0;
  angle = 0.03;
}

function draw() {
  const tx = x * cos(angle) - y * sin(angle);
  const ty = x * sin(angle) + y * cos(angle);

  clear();
  translate(width / 2, height / 2);
  circle(tx, ty, 10);

  x = tx;
  y = ty;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdn.jsdelivr.net/npm/[email protected]/lib/p5.min.js