For setting triangles, you want the outside edge to be on the straight of grain. Therefore you cut a square that is larger than your block size and then slice it on both diagonals. For the corner triangles, you want to the two outside edges to be on the grain, so you cut a different size square and cut it only once on the diagonal. The math involved, as well as some instructions, are on quiltville:
http://quiltville.com/onpointmath.shtml