Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
2.00/5 (3 votes)
See more:
How to make spline us C language
Posted
Comments
Philippe Mori 25-Feb-12 17:23pm    
Splines requires far too much code to be answered here. Typically, if you do it from scratch, you will need code to work with matrix and polynomials or do it by hand. You will also have to select which contraints you want to apply to your spline.

In my case, I hace done it in C# using code found on the web for polynomial and matrix handling (well in fact, it was a simplified function to solve matrix in a tridiagonal form) and a mathematical book explaining spline and information found on the Internet was really helpful.

1 solution

I suppose you want to draw a spline using the C language. You have at least two options:
1. Use a function from a library.
2. Write your own function, based on the spline equation (see, for instance, Wikipedia)[^] and using graphical primitives provided by your system.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 25-Feb-12 21:52pm    
Makes sense, my 5.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900