Circle
Module Geometry.Circles
In ixfx, a circle is simply an object with radius
, or if it’s positioned it also has coordinates:
Once you have that there are a bunch of functions to help you work with circles.
- area - compute area
- bbox - compute bounding box
- center - compute center
- circumference - (aka ‘length’)
- distanceCenter - distance between two circle centers
- distanceFromExterior - distance between outer edge of two circles
- interpolate - compute relative position along circumference
- intersectionLine - point(s) of intersection between a circle and line
- intersections - points of intersections between two circles
- isContainedBy - check if one circle contains another circle or point
- isIntersecting - check if one circle intersects with another circle or point
- nearest - compute nearest point on circle’s perimeter to a given point
- pointOnPerimeter - get point on perimeter at specified angle
- randomPoint - get a random point within circle