First off, let's avoid confusion from the terminology. A pyramid normally means the same shape as the Egyptian pyramids, ie a five faced solid having a square base and four triangular sides.
The solid shape made by four equilateral triangles can be called a 'triangular pyramid' but it's generally known as a tetrahedron.
It may not be obvious from the title, but in my opinion an excellent place to go to look up a general method for sawing geometric shapes is the multi-volume work from the mid nineteenth century, "Turning and Mechanical Manipulation," started by Charles Holtzapffel and continued by his son John Jacob. It covers more than just lathe work and takes in a wide span of tools and materials in fascinating detail.
For a general method to saw pyramids of any number of faces, start reading
here in Volume 2 and continue for the next
thirteen pages! (Especially if you want to cut a "macled double pyramid with seven sides"!)
The diagram marked 756 on this page shows what you need to do:
The plan shows a piece of wood - square in your case, assuming an Egyptian pyramid is what you want - resting against a wedge, held on an end stop, advancing into the circular saw blade. Make a cut, rotate, repeat. When you have made the four sloping cuts, take an ordinary right angled cut to remove the pyramid from the end of the stock.
However, if you want to make a tetrahedron, you could do that on a lathe, using the technique shown
here in Volume 4. This diagram, on the second page of the explanation, should make it perfectly clear! :wink: