INNER CODE UNIT · Python
hei
TheOpenSpaceProgram/osp-magnum · scripts/icosahedron_tables.py:94
hei = 1.0/sqrt(5.0)
# Circumcircle radius of pentagon
cmr = 2.0/5.0 * sqrt(5.0)
# X and Y coordinates used to construct pentagons
cxa = 1.0/2.0 - sqrt(5.0)/10.0
cxb = 1.0/2.0 + sqrt(5)/10.0
sya = 1.0/10.0 * sqrt( 10.0 * (5.0+sqrt(5.0)) )
syb = 1.0/10.0 * sqrt( 10.0 * (5.0-sqrt(5.0)) )
icosahedron_vrtx = [
( 0.0, 0.0, 1.0), # 0 top point
( cmr, 0.0, hei), # 1 top pentagon
( cxa, -sya, hei), # 2
(-cxb, -syb, hei), # 3
(-cxb, syb, hei), # 4
( cxa, sya, hei), # 5