Intersect Path Node

john's Avatar


24 Mar, 2019 12:07 AM

I have improved the intersect line node I released a few months ago. Attached is a demo network with a new, more general purpose node, intersect.

Intersect finds the intersection points between a line and a general path (which may consists of multiple line segments and bezier curves). You can confine the intersections to the given line segment, or, by checking "extend lines", extend the line infinitely in both directions.

To do this, intersect uses a custom contour node to break the path into separate contours (if any exist) and then my explode node to break everything up into individual line segments and bezier curves. Explode requires my custom node, make_curve. Make_curve and contours are included in the zipped file.

Inside the intersect node are two more specific nodes: intrsct_line and intrsct_curve. Intrsct_line is an improved version of my earlier node which finds the intersection between two lines. Intrsct_curve finds intersection(s) between a line and a cubic bezier curve. The latter node uses an algorithm I found at Neither of these two nodes requires any custom nodes. For simpler cases you may want to just use one of these two nodes instead of the general purpose intersect node.

The attached demo node shows some example: the intersection of two lines using intrsct_line, the intersection of a line and quad curve or cubic bezier curve using intrsct_curve, and three examples using the general purpose intersect node: a line and a text path, a line and an arc, and a line and a scrolling torture test of different shapes (see attached movie).

It's easy for a child to see where a line and a shape intersect. With this node it is now just as easy for Nodebox to see. Many things that were not possible before are now possible.

Please let me know if you find any examples where this node fails. (The math is complex and rounding errors can sometimes cause problems; I've tested it extensively but might have missed a few corner cases.)

Enjoy and please share your work if you use this node!


Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Already uploaded files

  • intersect_screenshot.png 297 KB
  • falling_targets.mp4 237 KB
  • 43.5 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

16 Jun, 2022 05:30 AM
15 Jun, 2022 06:03 AM
06 Jun, 2022 01:07 PM
02 Jun, 2022 11:58 PM
30 May, 2022 07:48 AM


24 May, 2022 06:27 PM
20 May, 2022 04:12 PM
05 May, 2022 02:25 AM
03 May, 2022 04:46 AM
01 May, 2022 09:22 AM
18 Apr, 2022 09:01 PM