Function Repository Resource:

# PolygonFromBase

Build a regular polygon on a given line segment

Contributed by: Ed Pegg Jr
 ResourceFunction["PolygonFromBase"][base,n] builds a regular n-gon on the line segment base.

## Details

The polygon is constructed counterclockwise by keeping the interior to the left as one goes from initial to terminal point on the base segment.
Reversing the base reverses the orientation of the constructed polygon.

## Examples

### Basic Examples (2)

Build an equilateral triangle on a base segment:

 In[1]:=
 Out[2]=

Show the construction:

 In[3]:=
 Out[3]=

Build a series of polygons on a base:

 In[4]:=
 Out[5]=

### Applications (1)

Show the intersection giving the Fermat point:

 In[6]:=
 Out[7]=

### Properties and Relations (1)

Reversing the order of the points in the base segment gives a reflected polygon:

 In[8]:=
 Out[9]=

### Neat Examples (2)

Build a regular hexagon from an arbitrary triangle:

 In[10]:=
 Out[11]=

A polygonal random walk:

 In[12]:=
 Out[45]=

## Version History

• 1.0.0 – 09 May 2022

## Author Notes

Equivalent definitions include:

 In[1]:=
 In[2]:=