Re: Finding the equation that travels through a given set of 2d points



Robert,

Without being too rigorous, I'd approach your short question as
follows:

Because there are five points in question, we will try to find a
fourth-degree polynomial that passes through the given points. (Note
that the degree of our polynomial is one less than the number of
points; if you know any linear algebra, you might be able to see why
this is a smart guess.)

Let that polynomial be f(x) = ax^4 + bx^3 + cx^2 + dx + e. We will try
to deduce the values of a, b, c, d, & e.

Since f(0)=0, we immediately see that in order for our ansatz-ed
polynomial to work, we must have e=0.

Substituting in the remaining points gives us four equations in four
variables:

f(10) = 10000a + 1000b + 100c +10d = 14.2
f(20) = 160000a + 8000b + 400c + 20d = 45.5
f(30) = 810000a + 27000b + 900c + 30d = 72.0
f(40) = (100^4)a + (100^3)b + (100^2)c + 100d = 240.1

Solving this system of equations gives us a polynomial that works
f(x) = (3.88214*(10^-5))x^4 - (.00598)x^3 + (.2377)x^2 - (.39793)x.

Let me know if this does(n't) help.

Calvin

On Aug 26, 4:48 pm, robert <robert.kj.karls...@xxxxxxxxx> wrote:
Hi all,
I hope someone on this list can help me with a problem I have. Since I
am a math novice I'm not sure if this is a simple question or even
doable.

The short question
---------------------------
Is there a way to create an equation that, when plotted in a 2d
coordiante system, creates a graph that goes through (or close to) a
set of predefined 2d-points?

For example, f(0)=0.0, f(10)=14.2, f(20)=45.5, f(30)=72.0 ...
f(100)=240.1.

This series is non-linear (I think that is the correct term).

Does anyone know of a website or program that can help in finding this
kind of equations? (preferably a free resource since I'm doing this
for my master's thesis, and I'm on a limited budget).

The slighly longer question
---------------------------
The reason I ask these questions is that I'm working on a color tool
that is supposed to be able to translate colors between different
color models that relate to eachother in a non-linear fashion.

In my dreams I would like to make one function for each of the three
RGB-channels and each of those functions takes 3 different values as
input and returns an integer between 0-255.

I have a lot of cross-reference values to match a color in one model
to the corresponding in another model. Could I use this data to
"train" an equation to behave in a certain way? That is, by inserting
the "black", "chroma" and "hue" and the value the functions should
return into a program.

The functions could look like

f_r(black, chroma, hue) = [0-255]
f_g(black, chroma, hue) = [0-255]
f_b(black, chroma, hue) = [0-255]

Is it possible to have as many as three variables as input?

Is there a smarter way to do this?

If I have done my research right a function with one variable creates
a 2d curve, two variables creates a plane in space and three variables
creates a volume in space - is this correct?

Any comments are very welcome!
Thanks!
Robert Karlsson
architecture student, Sweden


.