function to calculate midpoint between two coords, and refactoring setMeanLines
changed background image to div instead of body
changed canvas size to pixels to keep scaling consistent across resolutions