Why are Rails Shaped like that

Why are rails shaped like that? An overview of the wheel/rail interactions, of the train.

[Youtube]