What determines the shape of the allowed regions in the Ramachandran plot? Although Ramachandran explained these regions in terms of 1-4 hard-sphere repulsions, there are discrepancies with the data where, in particular, the alphaR, alphaL, and beta-strand regions are diagonal. The alphaR-region also varies along the alpha-helix where it is constrained at the center and the amino terminus but diffuse at the carboxyl terminus. By analyzing a high-resolution database of protein structures, we find that certain 1-4 hard-sphere repulsions in the standard steric map of Ramachandran do not affect the statistical distributions. By ignoring these steric clashes (NH(i+1) and O(i-1)C), we identify a revised set of steric clashes (CbetaO, O(i-1)N(i+1), CbetaN(i+1), O(i-1)Cbeta, and O(i-1)O) that produce a better match with the data. We also find that the strictly forbidden region in the Ramachandran plot is excluded by multiple steric clashes, whereas the outlier region is excluded by only one significant steric clash. However, steric clashes alone do not account for the diagonal regions. Using electrostatics to analyze the conformational dependence of specific interatomic interactions, we find that the diagonal shape of the alphaR and alphaL-regions also depends on the optimization of the NH(i+1) and O(i-1)C interactions, and the diagonal beta-strand region is due to the alignment of the CO and NH dipoles. Finally, we reproduce the variation of the Ramachandran plot along the alpha-helix in a simple model that uses only H-bonding constraints. This allows us to rationalize the difference between the amino terminus and the carboxyl terminus of the alpha-helix in terms of backbone entropy.