As SVG draws polygons in chronological fashion, we only assess intersections for each item between earlier drawn items. For quick intersection checks, we check if the centers of spheres and the central line of cylinders are within each other's vicinity, considering that covalent bonds mainly intersect at their ends with other atoms (i.e., spheres) and bonds (i.e., cylinders).