@pimms.value<EOL><INDENT>def curve(points, closed):<DEDENT>
if isinstance(points, CurveSpline):<EOL><INDENT>if closed == bool(points.periodic): return points.even_out()<EOL>points = points.coordinates<EOL><DEDENT>if closed:<EOL><INDENT>(x0,xx) = (points[:,<NUM_LIT:0>], points[:,-<NUM_LIT:1>])<EOL>if not np.isclose(np.linalg.norm(xx - x0), <NUM_LIT:0>):<EOL><INDENT>points = np.hstack([points, np.reshape(x0, (<NUM_LIT:2>,<NUM_LIT:1>))])<EOL><DEDENT><DEDENT>return curve_spline(points[<NUM_LIT:0>], points[<NUM_LIT:1>], order=<NUM_LIT:1>, periodic=closed).persist()<EOL>
trace.curve is the curve-spline object that represents the given path-trace.