Math magic to draw lines