Hilbert Curve + Endless Knot

(by Heribert Schütz; source code)

The demo below draws a curve based on a "Hilbert polyline" (a line with right angles approximating a Hilbert curve), but with

The idea was taken from a mastodon post by ꧁ᐊ𰻞ᵕ̣̣̣̣̣̣́́♛ᵕ̣̣̣̣̣̣́́𰻞ᐅ꧂. But there the endless knots are not connected by a Hilbert polyline but by some other graph.

In either case the orange lines form a single loop. This is always the case if the graph connecting the endless knots is a tree.

Demo