public ParallelCurve(Point[] bCoords, Point[] nCoords,double[] bEquation,EquationList[] eqList,Point[] interval) { baseCoords = bCoords; newCoords = nCoords; equation = bEquation; equationList = eqList; pointInterval = interval; main(); }
// this function will get the derivative /* private double[] getDerivative(double[] nEquation) { double[] yPrime = new double[nEquation.Length - 1]; for (int i = 0; i < yPrime.Length; i++) { yPrime[i] = Math.Pow(nEquation[i], (yPrime.Length - 1) - i); } this.prime = yPrime; return yPrime; }* */ private EquationList[] getDerivative(EquationList[] nEquation) { for(int i = 0 ; i < nEquation.Length ; i++) { nEquation[i].derivative = new double[nEquation[i].equation.Length-1]; for (int j = 0; j < nEquation[i].derivative.Length; j++) { nEquation[i].derivative[j] = Math.Pow(nEquation[i].equation[j], (nEquation[i].derivative.Length-1) - j); } } return nEquation; }