proto-repl-charts.examples.canvas.rotating-polygon

draw-rotated-polygon

(draw-rotated-polygon options)
Creates a drawing by repeatedly drawing a polygon many times in a circle with
a varied radius. Options are the following:

* canvas-name - Name of the canvas to use.
* size - The size of the drawing. Used for positioning the origin.
* num-sides - The number of sides of the polygon.
* num-polygons - The number of polygons to draw.
* polygon-size-fn - Function taking polygon number and returning the size of
  polygon to create.
* radius-fn - Function taking polygon number and returning the radius from the
  origin of the polygon
* rotation-amount - Amount to rotate between each polygon.
* background-style - Style to use for coloring the background.
* polygon-style - Style to use for coloring the polygon.

n-sided-polygon

(n-sided-polygon center-x center-y num-sides radius)
Creates a polygon with N sides along a circle with the given radius

point-from

(point-from x y angle distance)
Returns a new point at the given distance and angle from another point