Drawing a line between changing points

FYI: This is how to post code on the forums: Using code tags properly