Finding slope and coordinates