# How to draw a pentagon

• May 22nd 2006, 11:39 PM
hari-kj
How to draw a pentagon
Hi,

I'm stuck up with this problem that I have.

What I have is the center of the circle (x,y) and the radius.

With these values is there any formula to find out the five co-ordinates which would form a regular pentagon.

I need this to be implemented in a programming language so the formula needs to be something like

x1=so and so
y1= so and so

x2 = soand so
..
..
..

I'm really stuck up and need a help.

• May 23rd 2006, 04:09 AM
ticbol
Quote:

Originally Posted by hari-kj
Hi,

I'm stuck up with this problem that I have.

What I have is the center of the circle (x,y) and the radius.

With these values is there any formula to find out the five co-ordinates which would form a regular pentagon.

I need this to be implemented in a programming language so the formula needs to be something like

x1=so and so
y1= so and so

x2 = soand so
..
..
..

I'm really stuck up and need a help.

I do not know exactly what you mean, but here is one way.

Construct the regular pentagon such that one of the 5 equal sides is horizontal.
Let us say also that this horizontal side is the top or topmost of the pentagon, so the bottom or bottom most is a vertex or corner of the pentagon. Hence, a vertical axis of symmetry passes through the midpoint of the horizontal side and through the bottom most vertex.
Label the regular pentagon in clockwise manner. Vertex 1 is the right end of the horizontal side. Vertex 2. Vertex 3 is the bottom most corner. Vertex 4. Vertex 5 is the left end of the horizontal side. Zero or O is the center of the pentagon and of the circle also. R is the radius of the circle.

So, O is (x,y) as you said.
Or,
xO = x
yO = y

Imagine, or draw a vertical-horizontal crossline at center O.

Imagine or draw radii R to each of the 5 vertices.
The pentagon is subdivided into 5 congruent isosceles triangles, whose apex angles are 360/5 = 72 degrees each.

In the isosceles triangle 1-O-5:
Angle O is bisected by the vertical axis of symmetry, so two congruent right triangles are formed, each of which has an angle of 73/2 = 36 degrees at point O.
So, the coordinates of vertex 1 are:
Or,
X1 = x +Rsin(36deg)
y1 = y +Rcos(36deg)

In the isosceles triangle 1-O-2:
The horizontal crossline divides the angle O into 54deg and 18 deg.
{54deg is from 90 -36 = 54. 18deg is from 72 -54 = 18} ----****
So, the coordinates of Vertex 2 are:
Or,
X2 = x +Rcos(18deg)
y2 = y -Rsin(18deg)

The vertex 3 is on the vertical crossline.
So, the coordinates of Vertex 3 are:
Or,
x3 = x
y3 = y -R

See the explanation of the Vertex 2.
By symmetry, the coordinates of Vertex 4 are:
Or,
X4 = x -Rcos(18deg)
y4 = y -Rsin(18deg)

See explanation of Vertex 1.
By symmetery, the coordinates of Vertex 5 are:
Or,
X5 = x -Rsin(36deg)
y5 = y +Rcos(36deg)
• May 28th 2006, 12:36 PM
Soroban
Hello, hari-kj!

Quote:

I have the center of the circle $(x_1,y_1)$ and the radius $r$.

Is there a formula to find the five coordinates which would form a regular pentagon?
I worked this out a generation ago . . . in BASIC on my Tandy-1000 . . . LOL!

$x\:=\:x_1 + r\cdot\sin\left(\frac{2\pi}{5}n\right)$ . . . $y \:=\:y_1 - r\cdot\cos\left(\frac{2\pi}{5}n\right)$ . . . and let $n = 0,1,2,3,4$

The first point is at the 12:00 position; the points are plotted clockwise.