I want to generate a Brownina motion smothed by Bézier curve. I have no problem with the first part:
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import norm
def brownian(steps):
r = norm.rvs(size=(2,) + (steps,))
out = np.empty((2,steps))
np.cumsum(r, axis=-1, out=out)
out += np.expand_dims([0,0], axis=-1)
return out[0], out[1]
x, y = brownian(30)
plt.plot(x, y)
But how can I smooth that path using Bézier curve ?