Download this thing or ask me how I made it at thingiverse.com
back
snub cube dual

t = 1.83929;

vertices = [
[1, 1/t, t],
[1, -1/t, -t],
[-1, 1/t, -t],
[-1, -1/t, t],
[1/t, 1, -t],
[1/t, -1, t],
[-1/t, 1, t],
[-1/t, -1, -t],
[1, t, -1/t],
[1, -t, 1/t],
[-1, t, 1/t],
[-1, -t, -1/t],
[1/t, t, 1],
[1/t, -t, -1],
[-1/t, t, -1],
[-1/t, -t, 1],
[t, 1, 1/t],
[t, -1, -1/t],
[-t, 1, -1/t],
[-t, -1, 1/t],
[t, 1/t, -1],
[t, -1/t, 1],
[-t, 1/t, 1],
[-t, -1/t, -1],
];

//// 3 vertices define each plane
tri_verts = [
3, 6, 5, 15, 11, 9, 22, 18, 19, 12, 8, 10, 21, 17, 16,
2, 7, 4, 15, 3, 5, 9, 15, 5, 9, 5, 21, 21, 5, 0, 16, 21, 0,
16, 0, 12, 12, 0, 6, 10, 12, 6, 10, 6, 22, 22, 6, 3,
19, 22, 3, 19, 3, 15, 19, 15, 11, 23, 19, 11, 18, 19, 23, 2, 18, 23,
2, 23, 7, 10, 22, 18, 14, 10, 18, 14, 18, 2, 14, 4, 2, 14, 8, 10,
12, 16, 8, 16, 8, 20, 8, 20, 4, 20, 4, 1, 23, 7, 11,
20, 1, 17, 7, 1, 13, 1, 13, 17, 7, 11, 13, 13, 17, 9,
9, 17, 21, 11, 9, 13, 16, 17, 20, 14, 8, 4
];

list = [ for (n = [ 0 : 41 ]) let (
     A = vertices[tri_verts[3*n]],
     B = vertices[tri_verts[3*n+1]],
     C = vertices[tri_verts[3*n+2]],
     N = [(A[1]-B[1])*(A[2]-C[2])-(A[1]-C[1])*(A[2]-B[2]),
         -((A[0]-B[0])*(A[2]-C[2])-(A[0]-C[0])*(A[2]-B[2])),
         (A[0]-B[0])*(A[1]-C[1])-(A[0]-C[0])*(A[1]-B[1])],
     d = N[0]*A[0] + N[1]*A[1] + N[2]*A[2],
     a = N[0]/d,
     b = N[1]/d,
     c = N[2]/d
     ) [ a, b, c ] ];


//for(n=[0:41])
//{
// vector = list[n];
// translate([vector[0], vector[1], vector[2]])
// {
// color("Fuchsia", 1)linear_extrude(height = .01)
// {
// text(text = str(n), font = "Liberation Sans", size = .01);
// }
// }
//}

paths = [
0, 6, 6, 17, 17, 16, 16, 15, 15, 0,
15, 14, 14, 13, 13, 12, 12, 0,
12, 11, 11, 10, 10, 9, 9, 0,
9, 8, 8, 7, 7, 6,
8, 38, 38, 40, 40, 10, 40, 29, 29, 28, 28, 11,
28, 3, 3, 13, 3, 24, 24, 23, 23, 14,
23, 20, 20, 16, 20, 19, 19, 18, 18, 17,
18, 39, 39, 7, 39, 37, 37, 38,
29, 30, 30, 41, 41, 3, 41, 26, 26, 25, 25, 24, 25, 21,
21, 20, 21, 22, 22, 32, 32, 19, 32, 36, 36, 1,
36, 34, 34, 35, 35, 37, 35, 33, 33, 40, 33, 31, 31, 30,
5, 34, 5, 22, 5, 26, 5, 31
];

for(n=[0:59])
{
     vector_1 = list[paths[2*n]];
     vector_2 = list[paths[2*n+1]];
     hull()
     {
         translate([vector_1[0], vector_1[1], vector_1[2]])
         {
             sphere($fn=50, .06, true);
         }
         translate([vector_2[0], vector_2[1], vector_2[2]])
         {
             sphere($fn=50, .06, true);
         }
     }
}