CirclePoints

CirclePoints[n]

gives the positions of n points equally spaced around the unit circle.

CirclePoints[r,n]

gives the positions of n points equally spaced around a circle of radius r.

CirclePoints[{r,θ1},n]

starts at angle θ1 with respect to the axis.

CirclePoints[{x,y},rspec,n]

centers the circle at {x,y}.

Details

  • For positive integer n, CirclePoints[n] generates a list of vertices for a regular n-sided polygon, oriented so its base is horizontal.
  • In CirclePoints[n], n does not have to be an exact integer. The angles between successive vectors are always .
  • Unless explicitly given as a Quantity object, the angle θ1 is assumed to be in radians, counterclockwise starting from the axis. (Multiply by Degree to convert from degrees.)
  • If the angle θ1 is not given, it is assumed to be π/n-π/2, so that for integer n the vectors correspond to a regular polygon with its base horizontal.
  • All arguments of CirclePoints except n can be symbolic. They can also be Quantity objects.

Examples

open allclose all

Basic Examples  (3)

Corners of an equilateral triangle:

Draw a pentagon:

Draw unit vectors to the corners of a regular heptagon:

Scope  (4)

Corners of a centered square with horizontal and vertical sides:

Corners of a square of size :

Four unitary vectors aligned with the axes:

Displace them to a different point:

The four corners of an arbitrary square, at any point and any size or orientation:

Draw polygons, with their lowest side oriented horizontally by default:

Properties & Relations  (2)

CirclePoints returns pairs that can be reinterpreted as real and imaginary parts of the roots of unity:

CirclePoints is equivalent to a collection of AngleVector calls:

Interactive Examples  (1)

Neat Examples  (1)

Introduced in 2015
 (10.1)