There are other types of Curves as well. Arcs and Circles are a good example, and when it comes to the mathematics behind them they are kind of the same thing. Let us check them out and spice it up with some random number generation.
Random Number Generator:
http://developer.rhino3d.com/api/cpp/class_o_n___random_number_generator.html
Let me remind You why You are doing this in C++ and not in Grasshopper:
Reminder: you can download the entire visual solution, with all the code used in this course. The link for the solution is at the bottom (bellow the video) of lectures 02.05 - 02.10.