Image:
 Author: FRA32 Group: Technical Filesize: 44.44 kB Date added: 2016-02-24 Rating: 6.3 Downloads: 1023 Views: 446 Comments: 8 Ratings: 4 Times favored: 0 Made with: Algodoo v2.1.0 Tags:
|
This scene shows a mathematic method I am currently working with in Real Life, the Interpolation.
Interpolation is a mathematic way of generating a function between a set of given points in order to find the inbetween points. This scene shows a primitive version of the interpolation, the Polynomic interpolation. What it does is basically taking all given points(in this case 10) and connecting them with 1 single polynom of grade n-1(in this case 10-1, or 9). This, in other words, is a formula that looks roughly like this: p(x)=a*x^9+b*x^8+c*x^7+d*x^6+e*x^5+f*x^4+g*x^3+h*x^2+i*x^1+j-
.
To calculate this formula, a placeholder formula is used, the interpolation equation. It looks like this:
p(x)=sum{i=0 to n}(prod{j=0 to n | j != i}((x-xj)/(xi-xj)) * yi)
the sum is the typical sigma sign, and prod is Capital Pi, a counterpart of sigma that multiplies all values instead of summing them. The equations core is the (x-xj)/(xi-xj) equation. It's a chain part of a polynom(hence the prod sign), with the special attribute that:
if x = xj, then the whole product equation turns 0 since (xj-xj)/(xi-xj) = 0/(xi-xj)=0 and 0*x*y*z = 0
if x = xi, then the whole product equation turns 1 since (xi-xj)/(xi-xj) = (a+b)/(a+b) = k/k = 1 and 1*1*1*1 = 1
if x lies inbetween all points, the product equation will calculate different multiples of x and multiply them with each other, resulting in a x*x*x fashion.
The interpolated function is graphed in this scene, and you can place the points as you like, as long as they are not on the same x coordinate and stay in 10m distance to the scenes origin (the scene only graphes from -15<x<15) |