/*
* (C) C3R14L.K1L4 / João Carlos Ferreira Gonçalves
* further contact: jcgonc@student.dei.uc.pt
* started on 09-04-2007
* Catmull-Rom Splines
* Llew Mason 
* comp.graphics.algorithms, 30 Jun 1994
*/
#ifndef CatmullRomSpline_header
#define CatmullRomSpline_header
float catmullRomSpline (float p1, float p2, float p3, float p4, float t) {
	return(0.5*((-p1 + 3*p2 -3*p3 + p4)*t*t*t
		+ (2*p1 -5*p2 + 4*p3 - p4)*t*t
		+ (-p1+p3)*t
		+ 2*p2));
}
#endif
