takes in a series of car indexes and x,y coordinates and draws lines connecting them