WolframAlpha.com
WolframCloud.com
All Sites & Public Resources...
Products & Services
Wolfram|One
Mathematica
Wolfram|Alpha Notebook Edition
Finance Platform
System Modeler
Wolfram Player
Wolfram Engine
WolframScript
Enterprise Private Cloud
Application Server
Enterprise Mathematica
Wolfram|Alpha Appliance
Enterprise Solutions
Corporate Consulting
Technical Consulting
Wolfram|Alpha Business Solutions
Resource System
Data Repository
Neural Net Repository
Function Repository
Wolfram|Alpha
Wolfram|Alpha Pro
Problem Generator
API
Data Drop
Products for Education
Mobile Apps
Wolfram Player
Wolfram Cloud App
Wolfram|Alpha for Mobile
Wolfram|Alpha-Powered Apps
Services
Paid Project Support
Wolfram U
Summer Programs
All Products & Services »
Technologies
Wolfram Language
Revolutionary knowledge-based programming language.
Wolfram Cloud
Central infrastructure for Wolfram's cloud products & services.
Wolfram Science
Technology-enabling science of the computational universe.
Wolfram Notebooks
The preeminent environment for any technical workflows.
Wolfram Engine
Software engine implementing the Wolfram Language.
Wolfram Natural Language Understanding System
Knowledge-based broadly deployed natural language.
Wolfram Data Framework
Semantic framework for real-world data.
Wolfram Universal Deployment System
Instant deployment across cloud, desktop, mobile, and more.
Wolfram Knowledgebase
Curated computable knowledge powering Wolfram|Alpha.
All Technologies »
Solutions
Engineering, R&D
Aerospace & Defense
Chemical Engineering
Control Systems
Electrical Engineering
Image Processing
Industrial Engineering
Mechanical Engineering
Operations Research
More...
Finance, Statistics & Business Analysis
Actuarial Sciences
Bioinformatics
Data Science
Econometrics
Financial Risk Management
Statistics
More...
Education
All Solutions for Education
Trends
Machine Learning
Multiparadigm Data Science
Internet of Things
High-Performance Computing
Hackathons
Software & Web
Software Development
Authoring & Publishing
Interface Development
Web Development
Sciences
Astronomy
Biology
Chemistry
More...
All Solutions »
Learning & Support
Learning
Wolfram Language Documentation
Fast Introduction for Programmers
Wolfram U
Videos & Screencasts
Wolfram Language Introductory Book
Webinars & Training
Summer Programs
Books
Need Help?
Support FAQ
Wolfram Community
Contact Support
Premium Support
Paid Project Support
Technical Consulting
All Learning & Support »
Company
About
Company Background
Wolfram Blog
Events
Contact Us
Work with Us
Careers at Wolfram
Internships
Other Wolfram Language Jobs
Initiatives
Wolfram Foundation
MathWorld
Computer-Based Math
A New Kind of Science
Wolfram Technology for Hackathons
Student Ambassador Program
Wolfram for Startups
Demonstrations Project
Wolfram Innovator Awards
Wolfram + Raspberry Pi
Summer Programs
More...
All Company »
Search
WOLFRAM COMMUNITY
Connect with users of Wolfram technologies to learn, solve problems and share ideas
Join
Sign In
Dashboard
Groups
People
Message Boards
Answer
(
Unmark
)
Mark as an Answer
GROUPS:
Staff Picks
Mathematics
Dynamic Interactivity
Geometry
Graphics and Visualization
Graphs and Networks
Wolfram Language
8
Jack Heimrath
Embedding regular polygons in a lattice
Jack Heimrath, Wolfram|Alpha
Posted
4 months ago
1932 Views
|
1 Reply
|
8 Total Likes
Follow this post
|
Embedding regular polygons in a lattice
by
Jack Heimrath
Introduction
Consider the following finite, square grid and triangle:
I
n
[
]
:
=
$
E
Q
=
"
"
;
e
q
R
o
w
[
a
r
g
s
_
_
]
:
=
P
a
n
e
l
@
R
o
w
[
{
a
r
g
s
}
,
$
E
Q
]
p
g
r
i
d
[
a
r
g
s
_
_
]
:
=
P
a
n
e
l
@
G
r
i
d
[
a
r
g
s
]
p
r
o
w
[
a
r
g
s
_
_
]
:
=
P
a
n
e
l
@
R
o
w
[
a
r
g
s
]
l
a
b
e
l
P
o
s
[
s
n
a
p
:
{
l
o
1
_
,
h
i
1
_
}
,
l
o
c
:
{
l
o
2
_
,
h
i
2
_
}
]
:
=
W
i
t
h
[
{
t
e
s
t
s
=
T
r
u
e
Q
/
@
{
l
o
1
≤
l
o
2
,
h
i
1
≤
h
i
2
}
}
,
s
n
a
p
+
.
2
*
(
t
e
s
t
s
/
.
{
T
r
u
e
-
1
,
F
a
l
s
e
1
}
)
]
D
y
n
a
m
i
c
M
o
d
u
l
e
[
{
g
r
i
d
=
F
l
a
t
t
e
n
[
T
a
b
l
e
[
{
i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R
o
w
[
"
{
C
1
,
C
2
}
"
,
c
]
,
S
p
a
c
e
r
[
5
]
]
,
p
g
r
i
d
@
{
T
r
a
d
i
t
i
o
n
a
l
F
o
r
m
[
A
b
s
[
"
A
B
"
]
]
,
$
E
Q
,
#
,
"
≈
"
,
N
@
#
}
&
[
N
o
r
m
[
a
-
b
]
]
,
{
T
r
a
d
i
t
i
o
n
a
l
F
o
r
m
[
A
b
s
[
"
A
C
"
]
]
,
$
E
Q
,
#
,
"
≈
"
,
N
@
#
}
&
[
N
o
r
m
[
a
-
c
]
]
,
{
T
r
a
d
i
t
i
o
n
a
l
F
o
r
m
[
A
b
s
[
"
B
C
"
]
]
,
$
E
Q
,
#
,
"
≈
"
,
N
@
#
}
&
[
N
o
r
m
[
b
-
c
]
]
]
,
C
e
n
t
e
r
]
]
,
{
{
A
,
{
0
,
-
2
}
}
,
L
o
c
a
t
o
r
}
,
{
{
B
,
{
1
,
2
}
}
,
L
o
c
a
t
o
r
}
,
{
{
C
,
{
-
3
,
1
}
}
,
L
o
c
a
t
o
r
}
,
A
p
p
e
a
r
a
n
c
e
E
l
e
m
e
n
t
s
N
o
n
e
,
P
a
n
e
l
e
d
F
a
l
s
e
]
,
S
a
v
e
D
e
f
i
n
i
t
i
o
n
s
T
r
u
e
]
O
u
t
[
]
=
The yellow triangle
looks
equilateral, but the side lengths displayed below the plot tell a different story — it is only isosceles — with the edge AC being slightly longer than the remaining two edges. Feel free to play around with the positions of the vertices A, B, and C and try to see if you can find a configuration which gives an equilateral triangle. It shouldn’t take too long to convince yourself that this is an impossible task, at least when you constrain yourself to such a small grid. But maybe, if we were working with a larger grid, it might be possible to find an equilateral triangle? In this demonstration we answer this question in the negative - no matter the size of the grid, no regular polygon other than a square can have all vertices coincide with points on a grid.
Visualizing Lattices and their Properties
We introduce some standard mathematical language which will hopefully make the ideas presented in this notebook easier to follow and understand. An
(integer)
lattice
in
n
-dimensional space we will mean the collection of points
{
(
x
1
,
x
2
,
.
.
.
,
x
n
)
∈
n
:
x
1
,
x
2
,
.
.
.
,
x
n
∈
}
. Simply put these are points in
n
-dimensional space whose coordinates are integers. We’ve already shown what this looks like in 2 dimensions, and here’s part of a 3-dimensional lattice:
I
n
[
]
:
=
l
a
t
t
i
c
e
S
l
i
c
e
[
x
_
:
5
,
y
_
:
5
,
z
_
:
5
]
:
=
L
i
s
t
P
o
i
n
t
P
l
o
t
3
D
[
F
l
a
t
t
e
n
[
T
a
b
l
e
[
{
i
,
j
,
k
}
,
{
i
,
-
x
,
x
}
,
{
j
,
-
y
,
y
}
,
{
k
,
-
z
,
z
}
]
,
2
]
,
A
s
p
e
c
t
R
a
t
i
o
1
,
A
x
e
s
T
r
u
e
,
B
o
x
e
d
F
a
l
s
e
,
P
l
o
t
S
t
y
l
e
D
a
r
k
e
r
[
G
r
e
e
n
]
,
P
l
o
t
L
a
b
e
l
"
A
l
a
t
t
i
c
e
i
n
3
d
i
m
e
n
s
i
o
n
s
"
]
R
a
s
t
e
r
i
z
e
@
l
a
t
t
i
c
e
S
l
i
c
e
[
]
O
u
t
[
]
=
I
n
d
i
m
e
n
s
i
o
n
s
4
a
n
d
h
i
g
h
e
r
v
i
s
u
a
l
i
z
i
n
g
t
h
e
l
a
t
t
i
c
e
b
e
c
o
m
e
s
i
m
p
o
s
s
i
b
l
e
,
b
u
t
t
h
e
s
a
m
e
r
u
l
e
s
a
p
p
l
y
—
l
a
t
t
i
c
e
p
o
i
n
t
s
a
r
e
p
o
i
n
t
s
w
i
t
h
i
n
t
e
g
e
r
c
o
o
r
d
i
n
a
t
e
s
.
F
r
o
m
n
o
w
o
n
w
h
e
n
t
a
l
k
i
n
g
a
b
o
u
t
a
l
a
t
t
i
c
e
w
e
w
i
l
l
s
p
e
c
i
f
i
c
a
l
l
y
m
e
a
n
t
h
e
2
-
d
i
m
e
n
s
i
o
n
a
l
l
a
t
t
i
c
e
.
I
n
t
h
i
s
p
a
r
t
i
c
u
l
a
r
c
a
s
e
l
a
t
t
i
c
e
p
o
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z
e
T
i
n
y
,
A
s
p
e
c
t
R
a
t
i
o
1
]
,
P
l
o
t
L
a
b
e
l
-
>
"
R
o
t
a
t
i
n
g
p
o
i
n
t
A
"
<
>
T
o
S
t
r
i
n
g
[
a
n
g
l
e
*
1
8
0
/
P
i
]
<
>
"
°
c
o
u
n
t
e
r
c
l
o
c
k
w
i
s
e
a
b
o
u
t
"
<
>
I
f
[
b
=
=
=
{
0
,
0
}
,
"
t
h
e
o
r
i
g
i
n
.
"
,
"
p
o
i
n
t
B
.
"
]
]
]
,
{
θ
,
0
,
a
n
g
l
e
,
P
i
/
1
2
0
}
]
,
S
a
v
e
D
e
f
i
n
i
t
i
o
n
s
T
r
u
e
]
R
o
w
[
{
p
o
i
n
t
R
o
t
a
t
i
o
n
[
{
4
,
2
}
]
,
p
o
i
n
t
R
o
t
a
t
i
o
n
[
{
4
,
2
}
,
{
1
,
3
}
]
}
]
O
u
t
[
]
=
Let's also take a moment to see what addition "looks like" in our lattice. Treating our two points
(
x
1
,
y
1
)
,
(
x
2
,
y
2
)
as vectors, addition is simply coordinatwise, or vector, addition:
I
n
[
]
:
=
D
y
n
a
m
i
c
M
o
d
u
l
e
[
{
g
r
i
d
=
F
l
a
t
t
e
n
[
T
a
b
l
e
[
{
i
,
j
}
,
{
i
,
-
5
,
5
}
,
{
j
,
-
5
,
5
}
]
,
1
]
,
A
,
B
,
a
,
b
,
c
,
m
i
n
=
-
5
,
m
a
x
=
5
}
,
M
a
n
i
p
u
l
a
t
e
[
{
a
,
b
,
c
}
=
F
l
a
t
t
e
n
[
N
e
a
r
e
s
t
[
g
r
i
d
,
#
,
1
]
&
/
@
{
A
,
B
,
A
+
B
}
,
1
]
;
P
a
n
e
l
[
C
o
l
u
m
n
[
S
h
o
w
[
G
r
a
p
h
i
c
s
[
L
i
g
h
t
e
r
@
B
l
u
e
,
A
r
r
o
w
h
e
a
d
s
[
S
m
a
l
l
]
,
A
r
r
o
w
[
{
{
0
,
0
}
,
D
y
n
a
m
i
c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
e
a
r
a
n
c
e
E
l
e
m
e
n
t
s
N
o
n
e
,
P
a
n
e
l
e
d
F
a
l
s
e
]
,
S
a
v
e
D
e
f
i
n
i
t
i
o
n
s
T
r
u
e
]
O
u
t
[
]
=
The important thing to notice here is that if we have a triangle given by some points
{
(
x
1
,
y
1
)
,
(
x
2
,
y
2
)
,
(
x
3
,
y
3
)
}
we can add the point
(
-
x
1
,
-
y
1
)
to all three of them to get a congruent triangle
{
(
0
,
0
)
,
(
x
2
-
x
1
,
y
2
-
y
1
)
,
(
x
3
-
x
1
,
y
3
-
y
1
)
}
, one of whose vertices is at the origin. In particular, if we have an equilateral triangle whose vertices belong to the lattice we can always translate it so that one of the vertices lies at the origin. This can be used to simplify some of the computations in the following proof.
The Case of the Equilateral Triangle
To prove that no three lattice points determine an equilateral triangle we argue by contradiction. Assume there exists an equilateral triangle with side length L whose vertices belong to a lattice. As mentioned before, we are free to assume that one vertex of the triangle, denoted by O, lies at the origin:
I
n
[
]
:
=
M
o
d
u
l
e
[
{
O
=
{
0
,
0
}
,
A
=
{
1
,
4
}
,
B
}
,
B
=
R
o
t
a
t
i
o
n
M
a
t
r
i
x
[
P
i
/
3
]
.
A
;
G
r
a
p
h
i
c
s
[
E
d
g
e
F
o
r
m
@
D
i
r
e
c
t
i
v
e
@
B
l
u
e
,
Y
e
l
l
o
w
,
T
r
i
a
n
g
l
e
[
{
O
,
A
,
B
}
]
,
B
l
a
c
k
,
T
e
x
t
[
"
O
"
,
O
-
.
2
5
]
,
T
e
x
t
[
"
A
"
,
A
-
.
2
5
]
,
T
e
x
t
[
"
B
"
,
B
-
.
2
5
]
,
R
e
d
,
P
o
i
n
t
S
i
z
e
[
L
a
r
g
e
]
,
P
o
i
n
t
[
O
]
,
P
o
i
n
t
[
A
]
,
P
o
i
n
t
[
B
]
,
P
l
o
t
L
a
b
e
l
"
A
n
e
q
u
i
l
a
t
e
r
a
l
t
r
i
a
n
g
l
e
w
i
t
h
s
i
d
e
l
e
n
g
t
h
L
.
A
s
s
u
m
e
i
t
s
v
e
r
t
i
c
e
s
\
n
a
r
e
l
a
t
t
i
c
e
p
o
i
n
t
s
o
f
s
o
m
e
2
d
i
m
e
n
s
i
o
n
a
l
l
a
t
t
i
c
e
.
"
,
I
m
a
g
e
S
i
z
e
-
>
3
5
0
]
]
O
u
t
[
]
=
We’ve assumed the vertices of the triangle are lattice points, but we don’t know the scale or the orientation of the lattice. However, since we know that the sum and difference of two lattice points is also a lattice point, we can construct the points
C
=
B
-
A
,
D
=
-
A
,
E
=
-
B
,
F
=
A
-
B
and be sure they are also lattice points. It is not hard to see that the points
A
,
B
,
C
,
D
,
E
,
F
are the vertices of a regular hexagon:
I
n
[
]
:
=
M
o
d
u
l
e
[
{
O
=
{
0
,
0
}
,
A
=
{
1
,
4
}
,
B
,
C
,
D
,
E
,
F
}
,
B
=
R
o
t
a
t
i
o
n
M
a
t
r
i
x
[
P
i
/
3
]
.
A
;
C
=
B
-
A
;
D
=
-
A
;
E
=
-
B
;
F
=
A
-
B
;
G
r
a
p
h
i
c
s
[
E
d
g
e
F
o
r
m
@
D
i
r
e
c
t
i
v
e
@
B
l
u
e
,
Y
e
l
l
o
w
,
T
r
i
a
n
g
l
e
[
{
O
,
A
,
B
}
]
,
B
l
a
c
k
,
T
e
x
t
[
"
O
"
,
O
-
.
3
]
,
T
e
x
t
[
"
A
"
,
A
-
.
3
]
,
T
e
x
t
[
"
B
"
,
B
-
.
3
]
,
T
e
x
t
[
"
C
B
-
A
"
,
C
-
.
3
]
,
T
e
x
t
[
"
D
-
A
"
,
D
-
.
3
]
,
T
e
x
t
[
"
E
-
B
"
,
{
E
[
[
1
]
]
+
.
3
,
E
[
[
2
]
]
-
.
3
}
]
,
T
e
x
t
[
"
F
A
-
B
"
,
F
+
.
3
]
,
R
e
d
,
P
o
i
n
t
S
i
z
e
[
L
a
r
g
e
]
,
P
o
i
n
t
/
@
{
O
,
A
,
B
,
C
,
D
,
E
,
F
}
,
B
l
u
e
,
D
a
s
h
e
d
,
L
i
n
e
[
{
B
,
C
,
D
,
E
,
F
,
A
}
]
,
P
l
o
t
L
a
b
e
l
"
G
i
v
e
n
a
n
e
q
u
i
l
a
t
e
r
a
l
t
r
i
a
n
g
l
e
w
e
c
a
n
c
o
n
s
t
r
u
c
t
a
r
e
g
u
l
a
r
h
e
x
a
g
o
n
\
n
w
h
o
s
e
v
e
r
t
i
c
e
s
a
r
e
a
l
s
o
l
a
t
t
i
c
e
p
o
i
n
t
s
.
"
,
I
m
a
g
e
S
i
z
e
-
>
3
5
0
]
]
O
u
t
[
]
=
For our next step we make use of the fact that we can rotate points. Rotating each vertex of the hexagon 90
°
around its counterclockwise neighbor yields a new, smaller, but still regular hexagon. We are also guaranteed that the vertices of the smaller hexagon are lattice points.
I
n
[
]
:
=
C
l
e
a
r
A
l
l
[
s
m
a
l
l
e
r
H
e
x
a
g
o
n
]
;
s
m
a
l
l
e
r
H
e
x
a
g
o
n
[
a
:
{
_
,
_
}
:
{
1
,
4
}
,
f
r
a
m
e
C
o
u
n
t
_
:
6
0
,
f
p
s
_
:
3
0
]
:
=
L
i
s
t
A
n
i
m
a
t
e
[
T
a
b
l
e
[
M
o
d
u
l
e
[
{
o
=
{
0
,
0
}
,
b
,
c
,
d
,
e
,
f
,
p
o
i
n
t
s
,
r
o
t
a
t
e
d
P
o
i
n
t
s
,
r
o
t
a
t
i
n
g
P
o
i
n
t
s
}
,
b
=
R
o
t
a
t
i
o
n
M
a
t
r
i
x
[
P
i
/
3
]
.
a
;
{
c
,
d
,
e
,
f
}
=
{
b
-
a
,
-
a
,
-
b
,
a
-
b
}
;
p
o
i
n
t
s
=
{
a
,
b
,
c
,
d
,
e
,
f
}
;
{
r
o
t
a
t
e
d
P
o
i
n
t
s
,
r
o
t
a
t
i
n
g
P
o
i
n
t
s
}
=
T
a
b
l
e
[
R
o
t
a
t
i
o
n
M
a
t
r
i
x
[
#
]
.
(
i
[
[
1
]
]
-
i
[
[
2
]
]
)
+
i
[
[
2
]
]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
,
P
o
i
n
t
/
@
r
o
t
a
t
i
n
g
P
o
i
n
t
s
,
R
e
d
,
P
o
i
n
t
/
@
J
o
i
n
[
{
o
}
,
p
o
i
n
t
s
,
r
o
t
a
t
e
d
P
o
i
n
t
s
]
,
P
l
o
t
L
a
b
e
l
"
R
o
t
a
t
i
n
g
e
a
c
h
v
e
r
t
e
x
9
0
°
a
b
o
u
t
i
t
s
c
o
u
n
t
e
r
c
l
o
c
k
w
i
s
e
n
e
i
g
h
b
o
u
r
w
e
\
n
f
i
n
d
a
s
m
a
l
l
e
r
h
e
x
a
g
o
n
w
h
o
s
e
v
e
r
t
i
c
e
s
a
r
e
o
n
c
e
a
g
a
i
n
l
a
t
t
i
c
e
p
o
i
n
t
s
.
"
]
]
,
{
θ
,
0
,
P
i
/
2
,
P
i
/
(
2
f
r
a
m
e
C
o
u
n
t
)
}
]
,
f
p
s
]
s
m
a
l
l
e
r
H
e
x
a
g
o
n
[
1
0
,
2
]
O
u
t
[
]
=
We are now in position to derive the necessary contradiction. Let’s assume that the ratio of the length of the side of the smaller hexagon to the length of the side of the larger hexagon is
ρ
, where clearly
ρ
<
1
. We may now keep repeating the “shrinking procedure” to find successively smaller regular hexagons, all of whose vertices are lattice points. Clearly the side length of the
t
h
k
hexagon is
k
-
1
L
ρ
, which tends to 0 as
k
tends to
∞
. We know that our lattice points are separated by some distance
d
. But
k
L
ρ
will eventually be smaller than
d
, which is clearly impossible! Thus there cannot exist an equilateral triangle (or regular hexagon for that matter) whose vertices are lattice points.
I
n
[
]
:
=
(
*
C
o
m
p
u
t
e
s
t
h
e
v
e
r
i
t
c
e
s
o
f
t
h
e
s
p
e
c
i
f
i
e
d
n
u
m
b
e
r
o
f
n
e
s
t
e
d
r
e
g
u
l
a
r
n
g
o
n
s
*
)
n
e
s
t
e
d
P
o
l
y
g
o
n
s
[
s
i
d
e
s
_
I
n
t
e
g
e
r
,
l
a
y
e
r
s
_
I
n
t
e
g
e
r
:
1
,
v
e
r
t
e
x
1
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}
]
]
;
L
i
s
t
A
n
i
m
a
t
e
[
f
r
a
m
e
s
[
6
,
3
,
1
0
]
,
1
.
5
]
O
u
t
[
]
=
What About Other Regular Polygons?
So far we’ve demonstrated that we cannot find an equilateral triangle or a regular hexagon whose vertices are lattice points. It turns out that the same construction that worked for hexagons works for almost all other regular polygons. Below we demonstrate the shrinking procedure for pentagons and heptagons.
I
n
[
]
:
=
R
o
w
[
{
L
i
s
t
A
n
i
m
a
t
e
[
f
r
a
m
e
s
[
5
,
1
,
1
0
]
,
1
.
5
]
,
L
i
s
t
A
n
i
m
a
t
e
[
f
r
a
m
e
s
[
7
,
1
,
1
0
]
,
1
.
5
]
}
]
O
u
t
[
]
=
The main takeaway here is that, given a regular
n
-gon of side length
L
, we can construct a similar
n
-gon with side length
ρ
(
n
)
L
. Let’s see if we can figure out a formula for this
ρ
(
n
)
factor — if we can show that it’s less than one we will have completed the proof.
H
e
r
e
’
s
o
u
r
s
e
t
u
p
:
a
s
s
u
m
e
w
e
a
r
e
g
i
v
e
n
t
h
r
e
e
c
o
n
s
e
c
u
t
i
v
e
v
e
r
t
i
c
e
s
o
f
a
r
e
g
u
l
a
r
n
-
g
o
n
,
c
a
l
l
t
h
e
m
a
,
b
,
a
n
d
c
.
W
i
t
h
o
u
t
l
o
s
s
o
f
g
e
n
e
r
a
l
i
t
y
w
e
c
a
n
a
s
s
u
m
e
a
=
(
0
,
0
)
l
i
e
s
a
t
t
h
e
o
r
i
g
i
n
a
n
d
w
e
a
s
s
u
m
e
t
h
a
t
b
=
(
b
1
,
b
2
)
f
o
r
s
o
m
e
i
n
t
e
g
e
r
s
b
1
a
n
d
b
2
.
T
h
e
i
n
t
e
r
i
o
r
a
n
g
l
e
o
f
a
r
e
g
u
l
a
r
n
-
g
o
n
i
s
e
q
u
a
l
t
o
π
1
-
2
n
.
T
h
e
n
t
h
e
p
o
i
n
t
c
c
a
n
b
e
o
b
t
a
i
n
e
d
b
y
r
o
t
a
t
i
n
g
a
b
y
π
1
-
2
n
r
a
d
i
a
n
s
a
b
o
u
t
b
.
I
n
[
]
:
=
C
l
e
a
r
A
l
l
[
a
,
b
,
c
,
r
o
t
a
t
e
]
;
r
o
t
a
t
e
[
a
:
{
_
,
_
}
,
b
:
{
_
,
_
}
:
{
0
,
0
}
,
θ
_
]
:
=
R
o
t
a
t
i
o
n
M
a
t
r
i
x
[
θ
]
.
(
a
-
b
)
+
b
;
a
=
{
0
,
0
}
;
b
=
{
b
1
,
b
2
}
;
c
[
n
_
]
:
=
r
o
t
a
t
e
[
a
,
b
,
P
i
(
1
-
2
/
n
)
]
;
The general formula for
c
(
n
)
:
I
n
[
]
:
=
c
[
n
]
O
u
t
[
]
=
b
1
-
b
1
C
o
s
1
-
2
n
π
+
b
2
S
i
n
1
-
2
n
π
,
b
2
-
b
2
C
o
s
1
-
2
n
π
-
b
1
S
i
n
1
-
2
n
π
An example in the case
b
=
(
-
1
,
0
)
and
n
=
1
0
:
I
n
[
]
:
=
p
o
i
n
t
R
o
t
a
t
i
o
n
[
a
,
{
-
1
,
0
}
,
P
i
(
1
-
2
/
1
0
)
]
O
u
t
[
]
=
We need the coordinates of
c
to figure out where the shrinking procedure will send
b
.
Let us denote the square of the length of the side of our
n
-gon by
L
. Clearly
L
is equal to the square of the distance between two consecutive vertices of our
n
-gon.
I
n
[
]
:
=
C
l
e
a
r
A
l
l
[
L
]
;
L
=
T
o
t
a
l
[
(
b
-
a
)
^
2
]
O
u
t
[
]
=
2
b
1
+
2
b
2
The
n
-gon shrinking process takes each vertex
p
to a new vertex
p
’. To find the shrinking factor
ρ
(n) we first compute
L
’ — the square of the side length of the shrunk
n
-gon.
I
n
[
]
:
=
C
l
e
a
r
A
l
l
[
a
P
r
i
m
e
,
b
P
r
i
m
e
,
L
P
r
i
m
e
]
;
a
P
r
i
m
e
=
r
o
t
a
t
e
[
a
,
b
,
P
i
/
2
]
;
b
P
r
i
m
e
[
n
_
]
:
=
r
o
t
a
t
e
[
b
,
c
[
n
]
,
P
i
/
2
]
L
P
r
i
m
e
[
n
_
]
:
=
T
o
t
a
l
[
(
b
P
r
i
m
e
[
n
]
-
a
P
r
i
m
e
)
^
2
]
With this we have found the general formula for the square of the length of the side of the shrunk
n
-gon:
I
n
[
]
:
=
L
P
r
i
m
e
[
n
]
O
u
t
[
]
=
2
b
1
+
b
1
C
o
s
1
-
2
n
π
-
b
2
C
o
s
1
-
2
n
π
-
b
1
S
i
n
1
-
2
n
π
-
b
2
S
i
n
1
-
2
n
π
+
2
-
b
2
-
b
1
C
o
s
1
-
2
n
π
-
b
2
C
o
s
1
-
2
n
π
-
b
1
S
i
n
1
-
2
n
π
+
b
2
S
i
n
1
-
2
n
π
This seems quite complicated, but Simplifying the formula yields something much more tractable:
I
n
[
]
:
=
S
i
m
p
l
i
f
y
[
L
P
r
i
m
e
[
n
]
]
O
u
t
[
]
=
(
2
b
1
+
2
b
2
)
3
+
2
C
o
s
(
-
2
+
n
)
π
n
-
2
S
i
n
(
-
2
+
n
)
π
n
Since
L
'
=
ρ
(
n
)
L
, to find
ρ
(
n
)
we simply divide
L
’ by
L
.
I
n
[
]
:
=
C
l
e
a
r
A
l
l
[
ρ
]
;
ρ
[
n
_
]
:
=
S
i
m
p
l
i
f
y
[
L
P
r
i
m
e
[
n
]
]
/
L
ρ
[
n
]
O
u
t
[
]
=
3
+
2