The function is_element_visible_in_viewpoint is from StackOverflow user Ben Moskovitch. The work was posted on August 30th, 2020. Per the StackOverflow licensing terms the code is therefore licensed under Creative Commons Share Alike 4.0 licensing terms.