in the distance , mammoth waves formed and crashed in upon themselves , while up close , diminutive ones rolled onto the shore to meet them and quickly retreated , leaving behind a trail of sea foam that popped in the warmth of the newly rising sun .