How sand and the landscape is formed by waves and tides