Dmccooey is a site that contains 3D virtual models and coordinates of a large variety of polyhedra.
An example of a coordinates file you can retrieve from the site is:
Propello Tetrahedron (canonical)
C0 = 0.139680581996106531822799916239
C1 = 0.509755332493385520099017792717
C2 = 0.606267870861478462919986663126
C0 = (cbrt(4 * (11 + 3 * sqrt(69))) - cbrt(4 * (3 * sqrt(69) - 11)) - 1) / 3
C1 = (cbrt(4 * (25 + 3 * sqrt(69))) + cbrt(4 * (25 - 3 * sqrt(69))) - 5) / 3
C2 = (cbrt(4 * (371 + 33*sqrt(69))) + cbrt(4 * (371 - 33*sqrt(69))) - 1) / 33
V0 = ( C1, C0, 1.0)
V1 = ( C1, -C0, -1.0)
V2 = ( -C1, -C0, 1.0)
V3 = ( -C1, C0, -1.0)
V4 = ( 1.0, C1, C0)
V5 = ( 1.0, -C1, -C0)
V6 = (-1.0, -C1, C0)
V7 = (-1.0, C1, -C0)
V8 = ( C0, 1.0, C1)
V9 = ( C0, -1.0, -C1)
V10 = ( -C0, -1.0, C1)
V11 = ( -C0, 1.0, -C1)
V12 = ( C2, -C2, C2)
V13 = ( C2, C2, -C2)
V14 = ( -C2, C2, C2)
V15 = ( -C2, -C2, -C2)
Faces:
{ 12, 0, 2, 10 }
{ 12, 10, 9, 5 }
{ 12, 5, 4, 0 }
{ 13, 1, 3, 11 }
{ 13, 11, 8, 4 }
{ 13, 4, 5, 1 }
{ 14, 2, 0, 8 }
{ 14, 8, 11, 7 }
{ 14, 7, 6, 2 }
{ 15, 3, 1, 9 }
{ 15, 9, 10, 6 }
{ 15, 6, 7, 3 }
{ 0, 4, 8 }
{ 1, 5, 9 }
{ 2, 6, 10 }
{ 3, 7, 11 }
Each time that I want to open such a polyhedron in mathematica, I copy the information and manually adjust it to fit the language for mathematica.
For example, I rewrote the information above to the code shown below:
C0 = 0.139680581996106531822799916239;
C1 = 0.509755332493385520099017792717;
C2 = 0.606267870861478462919986663126;
V0 = { C1, C0, 1.0};
V1 = { C1, -C0, -1.0};
V2 = { -C1, -C0, 1.0};
V3 = { -C1, C0, -1.0};
V4 = { 1.0, C1, C0};
V5 = { 1.0, -C1, -C0};
V6 = {-1.0, -C1, C0};
V7 = {-1.0, C1, -C0};
V8 = { C0, 1.0, C1};
V9 = { C0, -1.0, -C1};
V10 = { -C0, -1.0, C1};
V11 = { -C0, 1.0, -C1};
V12 = { C2, -C2, C2};
V13 = { C2, C2, -C2};
V14 = { -C2, C2, C2};
V15 = { -C2, -C2, -C2};
vTSIc = {};
For[i = 0, i <= 79, i++;
AppendTo[vTSIc, ToExpression[StringJoin[{"V", ToString[i-1]}]]]
]
fTSIc = {{13, 1, 3, 11}, {13, 11, 10, 6}, {13, 6, 5, 1}, {14, 2, 4, 12},
{14, 12, 9, 5}, {14, 5, 6, 2}, {15, 3, 1, 9 }, {15, 9, 12, 8},
{15, 8, 7, 3}, {16, 4, 2, 10}, {16, 10, 11, 7}, {16, 7, 8, 4},
{1, 5, 9}, {2, 6, 10}, {3, 7, 11}, {4, 8, 12}};
Show[Graphics3D[{EdgeForm[{Thick}], Polygon /@ Map[vTSIc[[#1]] & , fTSIc, {2}]}], PlotRange-> All,Boxed -> False]
I am sure there must be a more efficient way than manually changing all curved brackets () seen for the vertices V0-V15 to the curly ones {}, adding semi-colons ; to the end of the lines and copy-pasting the faces in a new list.
I am wondering if anyone has done this before or if there are ways to automate it.
Thank you in advance.
PolyhedronData[]
$\endgroup$