posted 5 days ago
Why do you specify 8 points when you only need 5 of them?
And I must repeat my advice: put the base points in the xy-plane, and the top some point with a positive z-coordinate, it is then very easy to visualize what figure you are building.
For instance: if you look at your 5 unique points, with all the minus and plus coordinates, it is very hard to see if these form indeed a square pyramid. I tried to skech these points to the best of my abilities, but I could not detect any square pyramid (though my sketch abilities are very limitied, to say the least).
So, instead, let
A = (1, 1, 0)
B = (-1, 1, 0)
C = (-1, -1, 0)
D = (1, -1, 0)
T = (0, 0, 1)
then it is immediately clear what figure you are defining.
The triangles will be: ABC, BCD, ABT, BCT, CDT, DAT, giving the indices array
[0, 1, 2, 1, 2, 3, 0, 1, 4, 1, 2, 4, 2, 3, 4, 3, 0, 4]
And then for the normals: it is clear that for the triangles in the base (ABC and BCD) the normal would be (0, 0, -1). For ABT we have that the normal of ABT is (0, 1, 1) (why?). For triangle BCT we have the normal (-1, 0, 1), CDT gives (0, -1, 1) and DAT the normal (1, 0, 1) (not normalized). If we number these vectors 0 to 4, we get the indices array
[0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4]
And finally: it might be that specifying a triangle as 0, 1, 2 will give the triangle some other properties that when specified (0, 2, 1). I don't know the software you are using, check it to be sure.
Succes!