Esempio n. 1
0
 public static double Spherical(Func <double, double, double, double> f, Integral1 integral1, Integral2 integral2, Integral3 integral3)
 {
     return(Integration.Integrate((r, theta, phi) => r * r * Math.Sin(theta) * f(r, theta, phi), integral1, integral2, integral3));
 }
Esempio n. 2
0
 public override double IntegrateAreaCartesian(Func <double, double, double> f, int steps)
 {
     return(Integration.Integrate(f, new Integral1(() => 0, () => this.Size, steps),
                                  new Integral2(x => 0, x => this.Size, steps)));
 }
Esempio n. 3
0
 public static double Cylindrical(Func <double, double, double, double> f, Integral1 integral1, Integral2 integral2, Integral3 integral3)
 {
     return(Integration.Integrate((r, theta, z) => r * f(r, theta, z), integral1, integral2, integral3));
 }
Esempio n. 4
0
 public static double Polar(Func <double, double, double> f, Integral1 integral1, Integral2 integral2)
 {
     return(Integration.Integrate((r, theta) => r * f(r, theta), integral1, integral2));
 }
Esempio n. 5
0
 public override double IntegrateAreaPolar(Func <double, double, double> f, int steps)
 {
     return(Integration.Polar(f, new Integral1(() => 0, () => this.Radius, steps),
                              new Integral2(r => 0, r => Math.PI * 2, steps)));
 }
Esempio n. 6
0
 public override double IntegratePerimeterPolar(Func <double, double, double> f, int steps)
 {
     return(Integration.Integrate(theta => f(this.Radius, theta), new Integral1(() => 0, () => Math.PI * 2, steps)));
 }
Esempio n. 7
0
 public override double IntegrateSurfaceSpherical(Func <double, double, double, double> f, int steps)
 {
     return(Integration.Integrate((theta, phi) => this.Radius * this.Radius * Math.Sin(phi) * f(this.Radius, theta, phi),
                                  new Integral1(() => 0, () => Math.PI * 2, steps),
                                  new Integral2(theta => 0, theta => Math.PI, steps)));
 }