For collision detection using screen space might be easier, i.e. instead of looking for collisions between lines one wants to draw analytically, just try to draw them and check if all the pixels are background pixels.
I'll try to make an edit to the article where I try it out when I'm off work.
Thanks for the tip!
[1] https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometry...
[2] https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometry...