Revised Tangent Node

john's Avatar


30 Dec, 2020 02:52 AM

I am slowly working away on the next update to my node library, not only adding new nodes but improving existing ones.

Attached is a much improved version of my tangent node. My original node used a bunch of math to do something which could be done much more efficiently and easily using the point_on_path node. The new node has the following advantages/differences:

  • MUCH faster, important for very long paths
  • No longer requires any external Python libraries
  • No more division by zero errors (which could happen very rarely with the old node)
  • More accurate endpoints (based on the true end point, not the 99.99% point)
  • Handles endpoints correctly even in multi-contour paths
  • Inflection point values now based on the average of slopes just before and after (instead of on one or the other)
  • Tangent values automatically set to four digits of precision (avoiding weirdness which could occur with near-zero values)

One known issue: For multi-contour paths, if you set the T value to the exact position (within plus or minus one ten-thousandth of one percent) of the point at which one contour jumps to the next, the tangent will reflect the direction of the jump. The might be considered a feature instead of bug. And fixing it would have complicated the node and slowed it down, all for an extreme corner case that is unlikely ever to even be noticed. It's also easy to avoid by simply separating multi-contour paths using my contours node.

The attached demo lets you apply the tangent node to a wide variety of different paths. Just hook a shape (text, polygon, arc, etc.) to the null node and adjust the T value to see the resulting tangent value.

The tangent node is a workhorse - I use it all the time. If you are using my old tangent node, replacing it with this one could reduce your render times.



Reply to this discussion

Internal reply

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

Attaching KB article:


Already uploaded files

  • tangent_demo_screenshot.png 357 KB
  • 5.52 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

17 Aug, 2022 08:11 AM
05 Aug, 2022 05:24 AM
02 Aug, 2022 06:57 PM
01 Aug, 2022 02:02 PM
11 Jul, 2022 10:19 AM


07 Jul, 2022 07:41 PM
03 Jul, 2022 11:08 PM
30 Jun, 2022 09:46 PM
30 Jun, 2022 07:01 PM
16 Jun, 2022 05:30 AM
06 Jun, 2022 01:07 PM