// Given the origin point of the circle, its radius and the angle in Radians (degrees * Math.PI / 180)
// it returns the a point object showing the x,y coordinates of the point on a circle.
function findPointOnCircle(originX, originY , radius, angleRadians) {
let newX = radius * Math.cos(angleRadians) + originX
let newY = radius * Math.sin(angleRadians) + originY
return {"x" : newX, "y" : newY}
}
Posted: March 20, 2023
Return to the snippets listing