Le 28/01/2015 11:41, andrea antonello a écrit : > Hello everyone, Hi Andrea,
> I was wondering if there is a way to create an approximated curve in > 3d given a set of xyz coordinates. Yes, there is a way. > To make myself more clear with an example, lets assume I have the > center point of a tree section at different heights and I would like > to create curve representing the tree stem (give that trees tend to > bend in one direction and often have the top meters away from the > bottom). For this case, I would suggest to solve independently two 2D curves corresponding to x(z) and y(z). This can be done using org.apache.commons.math3.fitting.PolynomialCurveFitter if you consider your curves will be polynomials, or you can use your own extension of AbstractCurveFitter if you prefer your own non-polynomial model for curves. See <http://commons.apache.org/proper/commons-math/userguide/fitting.html#a17.2_Implemented_Functions> for an example of how to fit a polynomial to observed data. > > Any advice if very appreciated. Hope this helps, Luc > > Thanks a ton, > Andrea > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org > For additional commands, e-mail: user-h...@commons.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org