# Icosahedron

The Icosahedron is one of 5 Platonic solids. It has 12 vertices and 20 faces. The point coordinates are worked out and given in wikipedia.

Type the coordinates into a spreadsheet to work with them.

.
.
.
.
.

The program creates a labeled point object in autocad. This just to visualize the vertices and help to write the code for the faces. I like the point names to make sense, i manipulated these by quadrant and z value. Having a 3D mouse helps. I manually made the positive Z values a different color from those at Z = 0 and negative Z just for visibility.

Once the 12 points are settled in their quadrants and elevations, 20 Acad3DFace statements have to be written. Again a 3D mouse comes in handy. Looking at the points, open a picture of an Icosahedron for reference, and write down point numbers to connect as triangles. Keep them in groups. Test them periodically, top half, bottom half, etc.

Sub icosahedron()
'12 vertices and 20 faces

'create phi
Dim p As Double
p = 1.6180339887

Dim pt1(0 To 2) As Double
Dim pt2(0 To 2) As Double
Dim pt3(0 To 2) As Double
Dim pt4(0 To 2) As Double
Dim pt5(0 To 2) As Double
Dim pt6(0 To 2) As Double
Dim pt7(0 To 2) As Double
Dim pt8(0 To 2) As Double
Dim pt9(0 To 2) As Double
Dim pt10(0 To 2) As Double
Dim pt11(0 To 2) As Double
Dim pt12(0 To 2) As Double

Call initpt(pt1, 0, 1, p)
Call initpt(pt2, 0, -1, p)
Call initpt(pt3, p, 0, 1)
Call initpt(pt4, -p, 0, 1)

Call initpt(pt5, 1, p, 0)
Call initpt(pt6, -1, p, 0)
Call initpt(pt7, -1, -p, 0)
Call initpt(pt8, 1, -p, 0)

Call initpt(pt9, p, 0, -1)
Call initpt(pt10, -p, 0, -1)
Call initpt(pt11, 0, 1, -p)
Call initpt(pt12, 0, -1, -p)

Call point(pt1, &quot;pt1&quot;)
Call point(pt2, &quot;pt2&quot;)
Call point(pt3, &quot;pt3&quot;)
Call point(pt4, &quot;pt4&quot;)
Call point(pt5, &quot;pt5&quot;)
Call point(pt6, &quot;pt6&quot;)
Call point(pt7, &quot;pt7&quot;)
Call point(pt8, &quot;pt8&quot;)
Call point(pt9, &quot;pt9&quot;)
Call point(pt10, &quot;pt10&quot;)
Call point(pt11, &quot;pt11&quot;)
Call point(pt12, &quot;pt12&quot;)

'creates 3DFace
'Top half

'bottom half

'ends