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:
k (PlanarDiagram) – Diagram.
endpoint (Endpoint) – Starting endpoint (must be Endpoint).
- Returns:
Ordered list of endpoints along the strand (endpoint, twin, next, twin, …).
- Return type:
list[Endpoint]