Pre-calculate coordinates for line vertices