Revised Tangent Node

john's Avatar

john

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.

Enjoy!

John

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
  • New_Tangent_demo.ndbx.zip 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

Generic

? 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 Jan, 2021 04:53 AM
16 Jan, 2021 04:26 PM
15 Jan, 2021 03:28 PM
15 Jan, 2021 03:22 PM
15 Jan, 2021 09:46 AM

 

13 Jan, 2021 03:56 AM
05 Jan, 2021 07:23 AM
05 Jan, 2021 06:37 AM
04 Jan, 2021 10:42 PM
03 Jan, 2021 04:22 PM
30 Dec, 2020 02:52 AM