The Theory of Waves