[an error occurred while processing this directive]
|
§±§à§Õ§Ö§Ý§Ú§ä§Ö§ã§î §ã§ã§í§Ý§Ü§Ñ§Þ§Ú §ß§Ñ §Ú§ã§ä§à§â§Ú§à§Ô§â§Ñ§æ§Ú§ð.
§£§à§á§â§à§ã §Ó §ã§Ó§ñ§Ù§Ú §ã §ä§Ö§Þ §é§ä§à §ß§Ñ §Ù§Ñ§á§Ñ§Õ§Ö §Ý§ð§Ò§ñ§ä §ß§Ñ§Ù§í§Ó§Ñ§ä§î §à§Õ§Ú§ß §Ó§Ú§Õ §Ú§ß§ä§Ö§â§á§à§Ý§ñ§è§Ú§Ú §ç§Ö§â§Þ§Ú§ä§à§Ó§ã§Ü§à§Û, §ç§à§ä§ñ §Ö§ð §ä§à§é§ß§à §Ù§Ñ§ß§Ú§Þ§Ñ§Ý§ã§ñ §Õ§â§å§Ô§à§Û §é§Ö§Ý(§°§Ó§Ö§â§ç§Ñ§å§Ù§Ö§â) §Ü§ã§ä§Ñ§ä§Ú §à§ß§Ñ §Ò§í §ä§Ö§Ò§Ö §á§à§Õ§à§ê§Ý§Ñ
§¬§ã§ä§Ñ§ä§Ú §ï§ä§à§ä §°§Ó§Ö§â§ç§Ñ§å§Ù§Ö§â §Ñ§â§Ô§å§Þ§Ö§ß§ä§Ú§â§à§Ó§Ñ§ß§ß§à §ß§Ñ§Ù§í§Ó§Ñ§Ö§ä §Ö§Ö §á§Ñ§â§Ñ§Ò§à§Ý§Ú§é§Ö§ã§Ü§à§Û §Ú§ß§ä§Ö§â§á§à§Ý§ñ§è§Ú§Ö§Û, §ä§Ñ§Ü §Ü§Ñ§Ü §Ó§í§Ó§à§Õ §æ§à§â§Þ§å§Ý§í §à§ß §ã§ä§â§à§Ú§ä §ß§Ñ §á§Ý§Ñ§Ó§ß§à§Þ §á§Ö§â§Ö§ç§à§Õ§Ö §à§Õ§ß§à§Û §á§Ñ§â§Ñ§Ò§à§Ý§í §Ó §Õ§â§å§Ô§å§ð.
§Õ§Ñ§Ý§Ö§Ö §ß§Ö§ã§Ü§à§Ý§î§Ü§à §Ó§Ñ§â§Ú§Ñ§ß§ä§à§Ó §á§â§à §à§Õ§ß§à §Ú §ä§à§Ø§Ö:
Hermite interpollation (click this to go back to the index)
References : Posted by various
Notes :
These are all different ways to do the same thing : hermite interpollation. Try'm all and benchmark.
Code :
// original
inline float hermite1(float x, float y0, float y1, float y2, float y3)
{
// 4-point, 3rd-order Hermite (x-form)
float c0 = y1;
float c1 = 0.5f * (y2 - y0);
float c2 = y0 - 2.5f * y1 + 2.f * y2 - 0.5f * y3;
float c3 = 1.5f * (y1 - y2) + 0.5f * (y3 - y0);
return ((c3 * x + c2) * x + c1) * x + c0;
}
// james mccartney
inline float hermite2(float x, float y0, float y1, float y2, float y3)
{
// 4-point, 3rd-order Hermite (x-form)
float c0 = y1;
float c1 = 0.5f * (y2 - y0);
float c3 = 1.5f * (y1 - y2) + 0.5f * (y3 - y0);
float c2 = y0 - y1 + c1 - c3;
return ((c3 * x + c2) * x + c1) * x + c0;
}
// james mccartney
inline float hermite3(float x, float y0, float y1, float y2, float y3)
{
// 4-point, 3rd-order Hermite (x-form)
float c0 = y1;
float c1 = 0.5f * (y2 - y0);
float y0my1 = y0 - y1;
float c3 = (y1 - y2) + 0.5f * (y3 - y0my1 - y2);
float c2 = y0my1 + c1 - c3;
return ((c3 * x + c2) * x + c1) * x + c0;
}
// laurent de soras
inline float hermite4(float frac_pos, float xm1, float x0, float x1, float x2)
{
const float c = (x1 - xm1) * 0.5f;
const float v = x0 - x1;
const float w = c + v;
const float a = w + v + (x2 - x0) * 0.5f;
const float b_neg = w + a;
return ((((a * frac_pos) - b_neg) * frac_pos + c) * frac_pos + x0);
}
Comments
from : theguylle
comment : great sources but what is Hermite ?
if you don't describe what is your code made for, you will made a great sources but I don't know why?
cheers Paul
from : bram@musicdsp.org
comment : hermite is interpollation.
have a look around the archive, you'll see that the word 'hermite' is in more than one item ;-)
-bram
from : ronaldowf@sanepar.com.br
comment : Please, would like to know of hermite code it exists in delphi.
thankful
Ronaldo
Cascavel/Paran¨¢/Brasil
from : m.magrini@NOSPAMbad-sector.com
comment : Please,
add, at least, the meaning of each parameter (I mean x, y0, y1,y2, y3)....
m.
from : musicdsp@[remove this]dsparsons.co.uk
comment : Ronaldo, it doesn't take much to translate these to Delphi - for float, either use single or double to your preference!
Looking at the codes, it seems quite clear that the parameters follow a pattern of: Sample Position between middle two samples, then the sample
before current, current sample, curernt sample +1, current sample +2.
E-mail: info@telesys.ru