Gerakan siklik JS berdasarkan kosinus

let x = 100  // center x
let y = 50   // center y
let r = 50   // radius
let a = 0    // angle (from 0 to Math.PI * 2)

function rotate(a) {
  
  let px = x + r * Math.cos(a); 
  let py = y + r * Math.sin(a);
  
  console.log( px, py );
  
}

setInterval(function() {
  a = (a + Math.PI / 360) % (Math.PI * 2);
  rotate(a);
}, 5);
KostasX