I\'m trying to write code for a 3D trapezoidal integration method. I have done this in 1D, and used a method that selected midpoints between the samples and combined these w