# Truncated Icosahedron in TikZ?

I would like to draw the Archimedean solid Truncated Icosahedron (soccer ball, Bucky ball), so one can use the resources on transparency, position and light source to manipulate the images.

The image on the left is executed in POVRay and sources are available at Wikipedia, the one on the right is from Mathematica and data on vertices is available with the command PolyhedronData["TruncatedIcosahedron"].

## Listing Vertices, Edges and Faces

The vertices are all even permutations of:

(0, ±1, ±3ϕ)
(±2, ±(1+2ϕ), ±ϕ)
(±1, ±(2+ϕ), ±2ϕ)


where $\phi = (1 + \sqrt{5})/2$ is the golden mean, for an explicit list see Wikipedia here or here.

The number of vertices (60), edges (90) and faces (32) seem a bit too large to be dealt by hand as in other examples like drawing an Octahedron. All edges in this configuration have length 2 so an easy algorithm can determine the edges (the 3 neighbours at distance < 2.1). Given two edges at a vertex it is also (algorithmically) easy to find the third that compose a face -- it is the one that makes a zero-volume with the previous two vectors. How easy it is to implement all of that in TikZ? May be getting a ready set of coordinates edges and faces would be much easier?

## Cutting the Vertices of a pre-defined Icosahedron

Another possible construction would be cutting off the vertices of an (pre-defined) icosahedron in a way, so that every edge has the same length. Several packages (pst-solids3d, pst-platon) have the Icosahedron pre-define with one-command -- the issue here will the execution of the cut-offs.

In this particular case the solid is centred at the origin and all planes (that cut-off) are perpendicular to the vectors defining the original icosahedron, and equidistant to the origin.

Let's start with the skeleton. Coordinates are copy from polyhedron_js.asy.

\documentclass[border=9,tikz]{standalone}

\usepackage{tikz-3dplot}

\begin{document}
\foreach\s in{2,4,...,360}{
\tdplotsetmaincoords{2.71828+\s}{2.71828+\s*2}
\tikz[tdplot_main_coords,scale=.1]{
\path(-150cm,-150cm)(150cm,150cm);
\draw
(20.1774,0,-97.9432)--(40.3548,-32.6477,-85.4729)--(73.0026,-20.1774,-65.2955)--(73.0026,20.1774,-65.2955)--(40.3548,32.6477,-85.4729)--cycle
(20.1774,0,97.9432)--(40.3548,32.6477,85.4729)--(73.0026,20.1774,65.2955)--(73.0026,-20.1774,65.2955)--(40.3548,-32.6477,85.4729)--cycle
(-20.1774,0,97.9432)--(-40.3548,-32.6477,85.4729)--(-73.0026,-20.1774,65.2955)--(-73.0026,20.1774,65.2955)--(-40.3548,32.6477,85.4729)--cycle
(-20.1774,0,-97.9432)--(-40.3548,32.6477,-85.4729)--(-73.0026,20.1774,-65.2955)--(-73.0026,-20.1774,-65.2955)--(-40.3548,-32.6477,-85.4729)--cycle
(97.9432,20.1774,0)--(85.4729,40.3548,32.6477)--(65.2955,73.0026,20.1774)--(65.2955,73.0026,-20.1774)--(85.4729,40.3548,-32.6477)--cycle
(0,97.9432,20.1774)--(32.6477,85.4729,40.3548)--(20.1774,65.2955,73.0026)--(-20.1774,65.2955,73.0026)--(-32.6477,85.4729,40.3548)--cycle
(-97.9432,20.1774,0)--(-85.4729,40.3548,-32.6477)--(-65.2955,73.0026,-20.1774)--(-65.2955,73.0026,20.1774)--(-85.4729,40.3548,32.6477)--cycle
(0,97.9432,-20.1774)--(-32.6477,85.4729,-40.3548)--(-20.1774,65.2955,-73.0026)--(20.1774,65.2955,-73.0026)--(32.6477,85.4729,-40.3548)--cycle
(-97.9432,-20.1774,0)--(-85.4729,-40.3548,32.6477)--(-65.2955,-73.0026,20.1774)--(-65.2955,-73.0026,-20.1774)--(-85.4729,-40.3548,-32.6477)--cycle
(0,-97.9432,-20.1774)--(32.6477,-85.4729,-40.3548)--(20.1774,-65.2955,-73.0026)--(-20.1774,-65.2955,-73.0026)--(-32.6477,-85.4729,-40.3548)--cycle
(97.9432,-20.1774,0)--(85.4729,-40.3548,-32.6477)--(65.2955,-73.0026,-20.1774)--(65.2955,-73.0026,20.1774)--(85.4729,-40.3548,32.6477)--cycle
(0,-97.9432,20.1774)--(-32.6477,-85.4729,40.3548)--(-20.1774,-65.2955,73.0026)--(20.1774,-65.2955,73.0026)--(32.6477,-85.4729,40.3548)--cycle
(85.4729,40.3548,-32.6477)--(97.9432,20.1774,0)--(97.9432,-20.1774,0)--(85.4729,-40.3548,-32.6477)--(73.0026,-20.1774,-65.2955)--(73.0026,20.1774,-65.2955)--cycle
(85.4729,-40.3548,32.6477)--(97.9432,-20.1774,0)--(97.9432,20.1774,0)--(85.4729,40.3548,32.6477)--(73.0026,20.1774,65.2955)--(73.0026,-20.1774,65.2955)--cycle
(-85.4729,40.3548,32.6477)--(-97.9432,20.1774,0)--(-97.9432,-20.1774,0)--(-85.4729,-40.3548,32.6477)--(-73.0026,-20.1774,65.2955)--(-73.0026,20.1774,65.2955)--cycle
(-85.4729,-40.3548,-32.6477)--(-97.9432,-20.1774,0)--(-97.9432,20.1774,0)--(-85.4729,40.3548,-32.6477)--(-73.0026,20.1774,-65.2955)--(-73.0026,-20.1774,-65.2955)--cycle
(40.3548,32.6477,-85.4729)--(20.1774,0,-97.9432)--(-20.1774,0,-97.9432)--(-40.3548,32.6477,-85.4729)--(-20.1774,65.2955,-73.0026)--(20.1774,65.2955,-73.0026)--cycle
(-40.3548,-32.6477,-85.4729)--(-20.1774,0,-97.9432)--(20.1774,0,-97.9432)--(40.3548,-32.6477,-85.4729)--(20.1774,-65.2955,-73.0026)--(-20.1774,-65.2955,-73.0026)--cycle
(40.3548,-32.6477,85.4729)--(20.1774,0,97.9432)--(-20.1774,0,97.9432)--(-40.3548,-32.6477,85.4729)--(-20.1774,-65.2955,73.0026)--(20.1774,-65.2955,73.0026)--cycle
(-40.3548,32.6477,85.4729)--(-20.1774,0,97.9432)--(20.1774,0,97.9432)--(40.3548,32.6477,85.4729)--(20.1774,65.2955,73.0026)--(-20.1774,65.2955,73.0026)--cycle
(32.6477,85.4729,-40.3548)--(0,97.9432,-20.1774)--(0,97.9432,20.1774)--(32.6477,85.4729,40.3548)--(65.2955,73.0026,20.1774)--(65.2955,73.0026,-20.1774)--cycle
(-32.6477,85.4729,40.3548)--(0,97.9432,20.1774)--(0,97.9432,-20.1774)--(-32.6477,85.4729,-40.3548)--(-65.2955,73.0026,-20.1774)--(-65.2955,73.0026,20.1774)--cycle
(-32.6477,-85.4729,-40.3548)--(0,-97.9432,-20.1774)--(0,-97.9432,20.1774)--(-32.6477,-85.4729,40.3548)--(-65.2955,-73.0026,20.1774)--(-65.2955,-73.0026,-20.1774)--cycle
(32.6477,-85.4729,40.3548)--(0,-97.9432,20.1774)--(0,-97.9432,-20.1774)--(32.6477,-85.4729,-40.3548)--(65.2955,-73.0026,-20.1774)--(65.2955,-73.0026,20.1774)--cycle
(20.1774,65.2955,-73.0026)--(32.6477,85.4729,-40.3548)--(65.2955,73.0026,-20.1774)--(85.4729,40.3548,-32.6477)--(73.0026,20.1774,-65.2955)--(40.3548,32.6477,-85.4729)--cycle
(85.4729,40.3548,32.6477)--(73.0026,20.1774,65.2955)--(40.3548,32.6477,85.4729)--(20.1774,65.2955,73.0026)--(32.6477,85.4729,40.3548)--(65.2955,73.0026,20.1774)--cycle
(-73.0026,20.1774,65.2955)--(-40.3548,32.6477,85.4729)--(-20.1774,65.2955,73.0026)--(-32.6477,85.4729,40.3548)--(-65.2955,73.0026,20.1774)--(-85.4729,40.3548,32.6477)--cycle
(-85.4729,40.3548,-32.6477)--(-65.2955,73.0026,-20.1774)--(-32.6477,85.4729,-40.3548)--(-20.1774,65.2955,-73.0026)--(-40.3548,32.6477,-85.4729)--(-73.0026,20.1774,-65.2955)--cycle
(-85.4729,-40.3548,32.6477)--(-65.2955,-73.0026,20.1774)--(-32.6477,-85.4729,40.3548)--(-20.1774,-65.2955,73.0026)--(-40.3548,-32.6477,85.4729)--(-73.0026,-20.1774,65.2955)--cycle
(-20.1774,-65.2955,-73.0026)--(-32.6477,-85.4729,-40.3548)--(-65.2955,-73.0026,-20.1774)--(-85.4729,-40.3548,-32.6477)--(-73.0026,-20.1774,-65.2955)--(-40.3548,-32.6477,-85.4729)--cycle
(85.4729,-40.3548,-32.6477)--(65.2955,-73.0026,-20.1774)--(32.6477,-85.4729,-40.3548)--(20.1774,-65.2955,-73.0026)--(40.3548,-32.6477,-85.4729)--(73.0026,-20.1774,-65.2955)--cycle
(20.1774,-65.2955,73.0026)--(32.6477,-85.4729,40.3548)--(65.2955,-73.0026,20.1774)--(85.4729,-40.3548,32.6477)--(73.0026,-20.1774,65.2955)--(40.3548,-32.6477,85.4729)--cycle;
}
}

\end{document}

• Very nice solution! Even has the pentagons separated from the hexagons so it can be coloured differently... and the rotation gives it a way to choose a nice position (viewing angle). Commented Oct 4, 2015 at 16:50

I started with some code from a post about icosahedron.

Result image is quite good. The pentagons are small. Adjust the code to get what you want. Result image is .

See the code attached.

\documentclass[border=2 mm,12pt,tikz]{standalone}
\usepackage{tikz,tikz-3dplot}
\usetikzlibrary{calc} %NEED TO CALCULATE NEW POINTS
\usepackage{fouriernc}

\pgfmathsetmacro{\b}{0.1}
\pgfmathsetmacro{\c}{1-\b}

\newcommand{\pentagon}[6]{
\filldraw[fill=gray,draw=black]
($\c*(#1)+\b*(#2)$)--
($\c*(#1)+\b*(#3)$)--
($\c*(#1)+\b*(#4)$)--
($\c*(#1)+\b*(#5)$)--
($\c*(#1)+\b*(#6)$)--cycle;
}
\newcommand{\hexagon}[4]{
\draw[#4]
($\c*(#1)+\b*(#2)$)--
($\b*(#1)+\c*(#2)$)--
($\c*(#2)+\b*(#3)$)--
($\b*(#2)+\c*(#3)$)--
($\c*(#3)+\b*(#1)$)--
($\b*(#3)+\c*(#1)$)--cycle;
}

\begin{document}
\tdplotsetmaincoords{65}{100}
\begin{tikzpicture}[tdplot_main_coords,scale=1,line join=round]
\pgfmathsetmacro\a{2}
\pgfmathsetmacro{\phi}{\a*(1+sqrt(5))/2}
\path
coordinate(A) at (0,\phi,\a)
coordinate(B) at (0,\phi,-\a)
coordinate(C) at (0,-\phi,\a)
coordinate(D) at (0,-\phi,-\a)
coordinate(E) at (\a,0,\phi)
coordinate(F) at (\a,0,-\phi)
coordinate(G) at (-\a,0,\phi)
coordinate(H) at (-\a,0,-\phi)
coordinate(I) at (\phi,\a,0)
coordinate(J) at (\phi,-\a,0)
coordinate(K) at (-\phi,\a,0)
coordinate(L) at (-\phi,-\a,0);
%MORE POINTS
%G-CEAKL "TOP"
\hexagon{G}{C}{E}{}
\hexagon{G}{E}{A}{}
\hexagon{G}{A}{K}{dotted}
\hexagon{G}{K}{L}{dotted}
\hexagon{G}{L}{C}{dotted}
%F-IJDHB "BOTTOM"
\hexagon{F}{I}{J}{}
\hexagon{F}{J}{D}{}
\hexagon{F}{D}{H}{dotted}
\hexagon{F}{H}{B}{dotted}
\hexagon{F}{B}{I}{}
%CJEIABKHLD "STRIP"
\hexagon{C}{J}{E}{}
\hexagon{J}{E}{I}{}
\hexagon{E}{I}{A}{}
\hexagon{I}{A}{B}{}
\hexagon{A}{B}{K}{dotted}
\hexagon{B}{K}{H}{dotted}
\hexagon{K}{H}{L}{dotted}
\hexagon{H}{L}{D}{dotted}
\hexagon{L}{D}{C}{dotted}
\hexagon{D}{C}{J}{}
%A-BKGEI
%B-AIFKH
%K-ABHLG
%G-AKLCE
%E-AGCJK
%I-AEJFB
%D-CLHFJ
%C-DJEGL
%L-DHKGC
%H-DFBKL
%F-DHBIJ
%J-DFHLC
\pentagon{A}{B}{K}{G}{E}{I}
\pentagon{B}{A}{I}{F}{K}{H}
\pentagon{C}{D}{J}{E}{G}{L}
\pentagon{D}{C}{L}{H}{F}{J}
\pentagon{E}{A}{G}{C}{J}{I}
\pentagon{F}{D}{H}{B}{I}{J}
\pentagon{G}{A}{K}{L}{C}{E}
\pentagon{H}{D}{F}{B}{K}{L}
\pentagon{I}{A}{E}{J}{F}{B}
\pentagon{J}{D}{F}{I}{E}{C}
\pentagon{K}{A}{B}{H}{L}{G}
\pentagon{L}{D}{H}{K}{G}{C}

\path[dashed, thick]    (B) -- (H) -- (F)
(D) -- (L) -- (H) --cycle
(K) -- (L) -- (H) --cycle
(K) -- (L) -- (G) --cycle
(C) -- (L) (B)--(K) (A)--(K)
;

\path[ultra thick]
(A) -- (I) -- (B) --cycle
(F) -- (I) -- (B) --cycle
(F) -- (I) -- (J) --cycle
(F) -- (D) -- (J) --cycle
(C) -- (D) -- (J) --cycle
(C) -- (E) -- (J) --cycle
(I) -- (E) -- (J) --cycle
(I) -- (E) -- (A) --cycle
(G) -- (E) -- (A) --cycle
(G) -- (E) -- (C) --cycle
;
% \foreach \point/\position in {A/right,B/below,C/above,D/left,E/{above right},F/below,G/above,H/left,I/below,J/right,K/below,L/left}
%{
%    \fill (\point) circle (1.5pt);
%    \node[\position=3pt] at (\point) {$\point$};
%}

\end{tikzpicture}
\end{document}

• I don't know how to put the whole code nicely. It looks awful. Feel free to edit, someone. Commented Feb 4, 2021 at 15:49
• To put the code in the right environment, just select your LaTeX code and click on the icon displaying {}. Commented Feb 4, 2021 at 16:12

A bit with the unofficial Asymptote package polyhedron_js.asy.

Compile with asy -f png -render=8 <name>.asy

import polyhedron_js;

currentprojection=orthographic(1,1,.5);
currentlight=Viewport;
size(7cm);

int numberofframes=72;
string[] files;

// Optional arguments and "normal" is always coincide with orthographic (1,1,.5)
path3 boundingbox = circle((0,0,0), r=1.01, normal=(1,1,.5));

for (int j=0; j<numberofframes; ++j)
{
files[j]="T"+(string) j;
picture pic;
draw(pic, boundingbox,invisible);
draw(pic,rotate(-j*5,Z)*surface(truncIcos),lightgreen+opacity(.7));
draw(pic,rotate(-j*5,Z)*truncIcos,1bp+red);
shipout(files[j],bbox(invisible));
erase();
}


Using https://ezgif.com/pdf-to-gif to get the gif file with the dimensions 400 x 400

import polyhedron_js;
currentprojection=orthographic(1,1,.5);
currentlight=Viewport;
size(7cm);

draw(surface(truncIcos),lightgreen+opacity(.7));
draw(truncIcos,1bp+red);
shipout(bbox(invisible));