/*
 * interpolate.h
 *
 *  Created on: 2 maj 2020
 *      Author: erwin
 */

#ifndef INTERPOLATE_H_
#define INTERPOLATE_H_

#include "nurbs.h"
//#include "brent.h"
//#include "velprofs.h"
#include <math.h>

double diff_arclength(double u);
void set_global_nurbs_curve(nurbs_curve* curve);
int find_span (int n, int p, double u, double *U);
double get_u_Taylor3(double v, double a, double j, double u, double T,cart_point* dPt, cart_point* ddPt, cart_point* dddPt);
double get_u_Taylor2(double v, double a, double u, double T,cart_point* dPt, cart_point* ddPt);
double get_u_Taylor2_ds(double ds, double u, double T, cart_point* dPt, cart_point* ddPt);
double get_u_Taylor3_ds(double ds, double u, double T, cart_point* dPt, cart_point* ddPt, cart_point* dddPt);
double get_u_T3SIA(double v, double a, double j, double u, double T, nurbs_curve* curve);
double get_u_RK2(double v, double u, double T, cart_point* Pt, cart_point* dPt, nurbs_curve* curve);
//double get_u_RK4(double u, double v, double T, double ct, feedProfS* fprof);
//double get_u_AdamsBashforth(double u, double v, double T, double ct, feedProfS* fprof);
double get_u_AdamsMoulton(double u, double v, double T, double ct, nurbs_curve* curve);
double get_u_NewtonRaphson(double u, double v, double T, nurbs_curve* curve, cart_point* ePt, cart_point* edPt, cart_point* eddPt);
double get_u_FCP(double s, double v, double T);
double FCP_eval(double s);

#endif /* INTERPOLATE_H_ */
