I need some pointers for writing a polynomial regression routine for 3-dimensional points (i.e. find the coefficients of an X order polynomial that is fitted to a certain number of 3D points).
I've found code for 2D polynomial regression, however, I need to account for a 3rd dimension.
I'm looking for code examples and/or explanations.