Returns a point on a circle's perimeter at a specified angle in radians
import { Circles } from "https://unpkg.com/ixfx/dist/geometry.js" // Circle without positionconst circleA = { radius: 5 };// Get point at angle Math.PI, passing in a origin coordinateconst ptA = Circles.pointOnPerimeter(circleA, Math.PI, {x: 10, y: 10 });// Point on circle with positionconst circleB = { radius: 5, x: 10, y: 10};const ptB = Circles.pointOnPerimeter(circleB, Math.PI); Copy
import { Circles } from "https://unpkg.com/ixfx/dist/geometry.js" // Circle without positionconst circleA = { radius: 5 };// Get point at angle Math.PI, passing in a origin coordinateconst ptA = Circles.pointOnPerimeter(circleA, Math.PI, {x: 10, y: 10 });// Point on circle with positionconst circleB = { radius: 5, x: 10, y: 10};const ptB = Circles.pointOnPerimeter(circleB, Math.PI);
Angle in radians
Optional
or offset of calculated point. By default uses center of circle or 0,0 if undefined
Point oo circle
Returns a point on a circle's perimeter at a specified angle in radians