N-dimensional Bezier Curve generation
Simple code to calculate curves in N dimensions. Each dimension is calculated independently. Note that the dimensions do not need to be spatial dimensions. They could be any continuously variable parameter than can be interpolated such as colour (as shown here). Or time. Or pen nib pressure or angle.
(Also the curve is drawn here using the stamped pen technique from https://scratch.mit.edu/projects/127686607/ , since I resurrected this code in order to draw pen font strokes. That's incidental to the algorithm.)
http://stackoverflow.com/questions/5443653/opengl-coordinates-from-bezier-curves <-- I later did some more work on the C version of this: the stackoverflow site suggested there was a bug in the given code and posted a bug fix, however the code at https://scratch.mit.edu/projects/157310281/ clearly matches the standard algorithm exactly and that version does *not* have the bug fix applied, so I have some doubts about the validity of that fix. I have removed the so-called fix from this project.