POV-Ray : Newsgroups : povray.general : Curve fitting : Re: Curve fitting Server Time
30 Jul 2024 20:30:06 EDT (-0400)
  Re: Curve fitting  
From: Blue Herring
Date: 12 Jun 2008 14:42:54
Message: <48516e2e$1@news.povray.org>
Stephen wrote:
> Does anyone know of free software :) that will give me an equation
> from a set of data points?
> I've been using Excel's trendline but the equation it returns
> sometimes fits but often is way out. I've got a series of translations
> and rotations from PoserPhysics that I want to convert into some
> equations so I can replicate them in Bishop3D. (Bishop3D does not have
> the function to load an input file, yet. It does have the ability to
> create the points from a polynomial equation) I'll copy a short
> extract below. Excel gives good results up to Frame #22 then gives
> nothing useful afterwards. I've been splitting the data into sections.
> Of course maybe I'm not very good with excel.

You might try http://zunzun.com/ It has tools to fit equations to a set 
of data points.  I tried out the list of data you gave and came up with 
the equation:

y = (a + b*x + c*x^2 + d*x^3) / (1.0 + e*x + f*x^2 + g*x^3)

with coefficients:
a =  3.5873790068909175E+00
b = -3.6608646543127443E-01
c =  1.2033940968889179E-02
d = -1.1827196216057683E-04
e = -8.7347287735754037E-02
f =  2.2537610587076151E-03
g = -6.0082748897173416E-06

with a sum of squared absolute error of 0.241559470446.  You should 
probably try it out yourself so you can see how it diverges from your 
dataset, try other options, etc.

-- 
-The Mildly Infamous Blue Herring


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.