The creation of a 4-sided pyramid is explained βslightlyβ in several texts as follows:
pyramid.getPoints().addAll(0,0,0); //0 = top pyramid.getPoints().addAll(0, height, -hypotenuse/2); //1 = closest pyramid.getPoints().addAll(-hypotenuse/2, height, 0); //2 = leftest pyramid.getPoints().addAll(hypotenuse/2, height, 0); //3 = furthest pyramid.getPoints().addAll(0, height, hypotenuse/2); //4 = rightest pyramid.getTexCoords().addAll(0, 0); pyramid.getFaces().addAll(0,0,2,0,1,0); //Left front side pyramid.getFaces().addAll(0,0,1,0,3,0); //??? pyramid.getFaces().addAll(0,0,3,0,4,0); //Right back side pyramid.getFaces().addAll(0,0,4,0,2,0); //??? pyramid.getFaces().addAll(4,0,1,0,2,0); //Bottom triangle at front??? pyramid.getFaces().addAll(4,0,3,0,1,0); //Bottom triangle right???
It works, but I donβt understand it.

The second person added has vertices 0, 1, 3, so (reference figure) ... he cuts the pyramid in half. As far as I can judge. The same thing with the 4th person, only now the cut is orthogonal to the second person. And then the last 2 faces, which should be triangles, making up the square base of the pyramid. The first goes from peak 4 to peak 1 to peak 2, so ... this is the front triangle of the base of the pyramid (this is what I think). Therefore, I expect that the vertices 2,3,4 form the back triangle of the base of the pyramid, but in the last line of code we see the vertices 4,3,1, which (by my logic) make up the right triangle of the base pyramid, i.e. does not complement the front triangle of the base of the pyramid. Can someone explain this simple geometric puzzle? And is there a suitable independent resource that I can learn?
Significant Duty - Michael