I am using bezier to generate a Bezier curve. Below is the sample code:
import bezier
nodes = np.array([
[0.0 , 0.0],
[0.25, 2.0],
[0.5 , -2.0],
[0.75, 2.0],
[1.0 , 0.3],
])
curve = bezier.Curve.from_nodes(nodes)
import matplotlib.pyplot as plt
curve.plot(num_pts=256)
plt.show()
Please see below the generated plot.
I want to save this trajectory (let say to a file). In other words, I want to save x,y value of each point in this curve. I was expecting it to return a numpy array but it is not. kindly suggest.