path_from_endpoint#

path_from_endpoint(k, endpoint)#

Follow a strand starting at endpoint until reaching a vertex (or a cycle closes).

For crossings, the path alternates “twin” and “across” at the crossing (position + 2). For vertices, the path stops after stepping to the twin.

Parameters:
Returns:

Ordered list of endpoints along the strand (endpoint, twin, next, twin, …).

Return type:

list[Endpoint]