icosahedron/output/hexsphere_r1_d0.json
Tyler Hallada e0fc3c1917 Finally generating correct normals
Have to detect and correct inverted normals during calculation since the winding
order of the generated truncated icosahedrons is inconsistent.
2019-06-19 00:07:53 -04:00

1 line
5.6 KiB
JSON

{"positions":[[-0.5371653,5.9604646e-9,0.33198643],[-0.45879397,-0.45879397,0.45879394],[-0.37117213,-0.22939698,0.60056907],[-0.60056907,-0.37117213,0.22939697],[-0.7423442,-0.28355026,0.0],[-0.7423442,0.0,0.0],[-0.28355026,0.0,0.7423442],[-0.37117213,0.22939698,0.60056907],[-0.7423442,0.28355026,0.0],[-0.60056907,0.37117213,0.22939697],[-0.45879397,0.45879397,0.45879394],[0.0,0.33198643,0.5371653],[0.28355026,0.0,0.7423442],[0.37117213,0.22939698,0.60056907],[0.0,0.0,0.7423442],[0.45879397,0.45879397,0.45879394],[0.22939698,0.60056907,0.3711721],[0.0,0.7423442,0.28355026],[-0.22939698,0.60056907,0.3711721],[-0.33198643,0.5371653,0.0],[-0.60056907,0.37117213,-0.22939697],[-0.45879397,0.45879397,-0.45879394],[-0.22939698,0.60056907,-0.3711721],[0.0,0.7423442,-0.28355026],[0.0,0.7423442,0.0],[0.33198643,0.5371653,-5.9604646e-9],[0.7423442,0.28355026,0.0],[0.60056907,0.37117213,-0.22939698],[0.60056907,0.37117213,0.22939697],[0.45879394,0.45879397,-0.45879397],[0.22939697,0.60056907,-0.37117213],[-1.1920929e-8,0.33198643,-0.5371653],[0.28355026,0.0,-0.7423442],[0.0,0.0,-0.7423442],[0.3711721,0.22939698,-0.60056907],[-0.28355026,0.0,-0.7423442],[-0.37117213,0.22939698,-0.60056907],[-0.5371653,5.9604646e-9,-0.33198643],[-0.45879394,-0.45879397,-0.45879397],[-0.60056907,-0.37117213,-0.22939698],[-0.3711721,-0.22939698,-0.60056907],[0.5371653,0.0,0.33198643],[0.7423442,0.0,0.0],[0.37117213,-0.22939698,0.60056907],[0.7423442,-0.28355026,0.0],[0.60056907,-0.37117213,0.22939697],[0.45879397,-0.45879397,0.45879394],[0.0,-0.33198643,0.5371653],[-0.22939698,-0.60056907,0.3711721],[0.0,-0.7423442,0.28355026],[0.22939698,-0.60056907,0.3711721],[-0.33198643,-0.5371653,-5.9604646e-9],[-0.22939697,-0.60056907,-0.37117213],[0.0,-0.7423442,-0.28355026],[0.0,-0.7423442,0.0],[5.9604646e-9,-0.33198643,-0.5371653],[0.37117213,-0.22939698,-0.60056907],[0.45879397,-0.45879397,-0.45879394],[0.22939698,-0.60056907,-0.3711721],[0.5371653,0.0,-0.33198643],[0.60056907,-0.37117213,-0.22939697],[0.33198643,-0.5371653,0.0]],"cells":[[0,3,1],[0,1,2],[0,3,4],[0,4,5],[0,7,6],[0,6,2],[0,9,8],[0,8,5],[0,9,10],[0,10,7],[11,14,12],[11,12,13],[11,14,6],[11,6,7],[11,16,15],[11,15,13],[11,18,17],[11,17,16],[11,18,10],[11,10,7],[19,9,8],[19,8,20],[19,20,21],[19,21,22],[19,22,23],[19,23,24],[19,24,17],[19,17,18],[19,18,10],[19,10,9],[25,28,26],[25,26,27],[25,30,29],[25,29,27],[25,28,15],[25,15,16],[25,24,23],[25,23,30],[25,24,17],[25,17,16],[31,34,32],[31,32,33],[31,34,29],[31,29,30],[31,36,35],[31,35,33],[31,22,21],[31,21,36],[31,22,23],[31,23,30],[37,40,38],[37,38,39],[37,40,35],[37,35,36],[37,5,4],[37,4,39],[37,20,8],[37,8,5],[37,20,21],[37,21,36],[41,28,26],[41,26,42],[41,43,12],[41,12,13],[41,45,44],[41,44,42],[41,45,46],[41,46,43],[41,28,15],[41,15,13],[47,48,1],[47,1,2],[47,14,12],[47,12,43],[47,50,49],[47,49,48],[47,50,46],[47,46,43],[47,14,6],[47,6,2],[51,52,38],[51,38,39],[51,3,1],[51,1,48],[51,54,53],[51,53,52],[51,54,49],[51,49,48],[51,3,4],[51,4,39],[55,56,32],[55,32,33],[55,40,38],[55,38,52],[55,58,57],[55,57,56],[55,58,53],[55,53,52],[55,40,35],[55,35,33],[59,42,26],[59,26,27],[59,34,32],[59,32,56],[59,60,44],[59,44,42],[59,60,57],[59,57,56],[59,34,29],[59,29,27],[61,45,44],[61,44,60],[61,60,57],[61,57,58],[61,58,53],[61,53,54],[61,54,49],[61,49,50],[61,50,46],[61,46,45]],"normals":[[-0.8506507,0.0,0.52573115],[-0.57735026,-0.57735026,0.57735026],[-0.49999997,-0.30901697,0.80901694],[-0.809017,-0.5,0.309017],[-0.93417233,-0.35682207,0.0],[-0.99999994,0.0,0.0],[-0.3568221,0.0,0.9341724],[-0.49999997,0.30901697,0.80901694],[-0.93417233,0.35682207,0.0],[-0.809017,0.5,0.30901697],[-0.57735026,0.57735026,0.57735026],[3.3663639e-9,0.52573115,0.8506508],[0.3568221,0.0,0.93417233],[0.49999997,0.309017,0.80901706],[0.0,0.0,0.99999994],[0.57735026,0.57735026,0.5773502],[0.30901697,0.80901694,0.49999994],[1.4120872e-8,0.93417233,0.3568221],[-0.30901697,0.80901694,0.4999999],[-0.52573115,0.8506507,0.0],[-0.809017,0.5,-0.30901697],[-0.57735026,0.57735026,-0.5773502],[-0.30901697,0.809017,-0.5],[-7.060436e-9,0.93417233,-0.35682207],[0.0,0.99999994,0.0],[0.5257311,0.8506507,-1.2623865e-8],[0.9341724,0.3568221,0.0],[0.80901694,0.49999997,-0.30901697],[0.809017,0.5,0.30901697],[0.5773502,0.57735026,-0.57735026],[0.30901697,0.80901694,-0.49999994],[-1.5148638e-8,0.52573115,-0.8506507],[0.35682207,7.060436e-9,-0.93417233],[0.0,0.0,-0.99999994],[0.49999994,0.30901694,-0.80901694],[-0.3568221,-1.4120872e-8,-0.93417233],[-0.49999997,0.309017,-0.80901706],[-0.8506507,-2.5247728e-9,-0.52573115],[-0.57735026,-0.5773502,-0.57735026],[-0.80901694,-0.49999994,-0.30901697],[-0.49999994,-0.30901697,-0.80901694],[0.8506507,0.0,0.52573115],[0.99999994,0.0,0.0],[0.49999997,-0.30901697,0.80901694],[0.9341724,-0.35682207,0.0],[0.809017,-0.5,0.30901697],[0.57735026,-0.57735026,0.57735026],[-3.3663639e-9,-0.52573115,0.8506508],[-0.30901697,-0.80901694,0.49999994],[-1.4120872e-8,-0.93417233,0.3568221],[0.30901697,-0.80901694,0.4999999],[-0.52573115,-0.8506507,-1.2623865e-8],[-0.30901697,-0.80901694,-0.49999994],[1.4120872e-8,-0.93417233,-0.3568221],[0.0,-0.99999994,0.0],[1.5148638e-8,-0.5257311,-0.8506507],[0.49999997,-0.309017,-0.80901706],[0.57735026,-0.57735026,-0.57735026],[0.30901697,-0.80901694,-0.49999994],[0.8506508,2.5247728e-9,-0.52573115],[0.809017,-0.5,-0.30901697],[0.52573115,-0.8506507,0.0]],"faces":[[0,1,2,3,4,5,6,7,8,9],[10,11,12,13,14,15,16,17,18,19],[20,21,22,23,24,25,26,27,28,29],[30,31,32,33,34,35,36,37,38,39],[40,41,42,43,44,45,46,47,48,49],[50,51,52,53,54,55,56,57,58,59],[60,61,62,63,64,65,66,67,68,69],[70,71,72,73,74,75,76,77,78,79],[80,81,82,83,84,85,86,87,88,89],[90,91,92,93,94,95,96,97,98,99],[100,101,102,103,104,105,106,107,108,109],[110,111,112,113,114,115,116,117,118,119]]}