 Calcium levels are also a function of ATP levels because ATP is required to pump calcium out of the cytoplasm, out of the cell or back into the sarcoplasmic reticulum.  There's a post above that describes this in detail, albeit technically. Someone complained a lot about its technicality, and rather than rewriting it, it's no longer part of the page. But no one who comes to this page as it is leaves understanding rigor mortis if they didn't already.