#include #include #include float Atrap(float n, float m, float x) { float A; A=(n+m*x/2)*x; return A; } float Sfun(float n, float m, float x) { float S; S=x*(3*n*n+x*(3*n*m+x*m*m))/6.; return S; } float Ifun(float n, float m, float x) { float I; I=(4*n*n*n*x+6*m*pow(n*x,2)+4*n*x*pow(m*x,2)+x*pow(m*x,3))/12.; return I; } float Ixyfun(float n, float m, float x) { float I; I=(6*pow(n*x,2)+8*n*m*pow(x,3)+3*m*m*pow(x,4))/24.; return I; } void presek(float x[], float y[], int N, float *xT, float *yT, float *A, float *Sx, float *Sy, float *Ix, float *Iy, float *Ixy) { int i; float n,m; *A=0.0; *Sx=0.0; *Sy=0.0; *Ix=0.0; *Iy=0.0; *Ixy=0.0; for(i=0; i