commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luc Maisonobe <>
Subject Re: [math] find an approximate curve for 3d points
Date Wed, 28 Jan 2015 11:01:29 GMT
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

for an example of how
to fit a polynomial to observed data.

> Any advice if very appreciated.

Hope this helps,

> Thanks a ton,
> Andrea
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message