generative-toolbelt.circle
A set of functions to create, manage, and draw Circles.
Circles are sets with a Point and a number like this: {:c {:x 100 :y 100} :r 50}.
draw-circle
(draw-circle c)
Draws a Circle into the current graphics canvas.
make-circle
(make-circle c r)
Creates a Circle with a Point and an absolute value.
Returns a Circle.
make-ellipse
(make-ellipse c r1 r2)
Creates a Ellipse with absolutes coordinates.
Returns a Ellipse.
mkcr
(mkcr cx cy r)
Creates a Circle with canvas-relative coordinates.
Returns a Circle.
mkel
(mkel cx cy r1 r2)
Creates a Ellipse with canvas-relative coordinates.
Returns a Ellipse.
point-on-circle
(point-on-circle {:keys [c r]} angle)
Creates a Point from a Circle and an angle in radians.
Returns a Point.
point-on-ellipse
(point-on-ellipse {:keys [c r1 r2]} angle)
Creates a Point from a Ellipse and an angle in radians.
Returns a Point.
points-on-circle
(points-on-circle n circle)
(points-on-circle n circle from to)
Returns a sequence of `n` Points from a Circle.
`from` and `to` can be defined as angles in degrees to target only a
certain portion of the Circle instead of the full circle.
points-on-ellipse
(points-on-ellipse n ellipse)
(points-on-ellipse n ellipse from to)
Returns a sequence of `n` Points from a Ellipse.
`from` and `to` can be defined as angles in degrees to target only a
certain portion of the Ellipse instead of the full circle.