cos distr

M = 1000
c = false
x10 = If(c, 0.98982, 1)
B10 = Point(Line[(x10, 0), (x10, 1)])
x9 = If(c, 0.90963, 0.8)
B9 = Point(Line[(x9, 0), (x9, 1)])
x8 = If(c, 0.75575, 0.6)
B8 = Point(Line[(x8, 0), (x8, 1)])
x7 = If(c, 0.54064, 0.4)
B7 = Point(Line[(x7, 0), (x7, 1)])
x6 = If(c, 0.28173, 0.2)
B6 = Point(Line[(x6, 0), (x6, 1)])
x5 = If(c, 0, 0)
B5 = Point(Line[(x5, 0), (x5, 1)])
x4 = If(c, -0.28173, -0.2)
B4 = Point(Line[(x4, 0), (x4, 1)])
x3 = If(c, -0.54064, -0.4)
B3 = Point(Line[(x3, 0), (x3, 1)])
x2 = If(c, -0.75575, -0.6)
B2 = Point(Line[(x2, 0), (x2, 1)])
x1 = If(c, -0.90963, -0.8)
B1 = Point(Line[(x1, 0), (x1, 1)])
x0 = If(c, -0.98982, -1)
B0 = Point(Line[(x0, 0), (x0, 1)])
ψ = Spline({(x(B0), y(B0) / M), (x(B1), y(B1) / M), (x(B2), y(B2) / M), (x(B3), y(B3) / M), (x(B4), y(B4) / M), (x(B5), y(B5) / M), (x(B6), y(B6) / M), (x(B7), y(B7) / M), (x(B8), y(B8) / M), (x(B9), y(B9) / M), (x(B10), y(B10) / M)}, 3)
φ = Polynomial({B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10})
f = CurveCartesian(x(ψ(t)), (M * y(ψ(t))), t, 0, 1)