How a yacht works: sailboat physics and design