Press space to generate a new curve.

Plotting bezier curves in 3D. The algorithm is explained in this post.