I've got a program where you click and add points to make a polygon using a linked list, and now I want it where by pressing a button it will take the points on the polygon and make it a cubic b spline curve. However I have no experience with the b spline curves and am having trouble with were to start. So I was wondering if you would be able to help me with the pseudo code for this, using C so that I can better understand what I'm trying to do. The program is attached and here is what I have come up with so far (which isn't much unfortunately):
Create a drawCurve function that traverses the linked list in order.
Take the first four points to draw the spline curve, then the next one over each time.
[insert how to do the math here (of which I am confused about)]
Use a state machine to implement. So pressing a button of my choice will change between the drawing polygon state and the draw curve state.
Thank you very much for your help.
Attached File(s)

PolygonCreator.txt (6.97K)
Number of downloads: 1148