N-dimensional Bezier Curve generation

by gtoal
  scripts
  sprites
See inside
Instructions

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.)

Notes and Credits

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.

Shared: 27 Oct 2016 Modified: 1 Aug 2017
Favorite this project 6
Love this project 10
Total views 166
View the remix tree  1
  
More projects by gtoal