Follow-the-Leader Approximations of Macroscopic Models for Vehicular and Pedestrian Flows