Monotone cubic interpolation

Monotone cubic interpolation


Монотонная кубическая интерполяция - вариант кубической интерполяции отличающийся тем, что в сплайнах отсутствует всплески.

Один из вариантов реализации на языке программирования Pascal

TMonotoneCubicFactor = record
    iv2,iv3,tv1,tv2:TVector3f;
  end;
 
Function MonotoneCubicInterpolation(const factor:TMonotoneCubicFactor; pos:single):TVector3f;
var
  v1,v2:TVector3f;
  fn:single;
begin
  fn:=(1 - cos(pos * Pi)) * 0.5;
 
  v1:=factor.iv2 + factor.tv1*pos;
  v2:=factor.iv3 + factor.tv2*(pos-1);
 
  Result.x:=v1.x * (1-fn) + v2.x * fn;
  Result.y:=v1.y * (1-fn) + v2.y * fn;
  Result.z:=v1.z * (1-fn) + v2.z * fn;
end;
Function GetMonotoneCubicFactor(const iv1,iv2,iv3,iv4:TVector3f):TMonotoneCubicFactor;
var
  v1,v2,v3:TVector3f;
  L1,L2,L3:single;
begin
  v1 := iv2 - iv1;
  v2 := iv3 - iv2;
  v3 := iv4 - iv3;
  L1 := v1.Length();
  L2 := v2.Length();
  L3 := v3.Length();
 
  Result.tv1:=v1*L2/L1 + v2*L1/L2;
  Result.tv1.Normalize();
  Result.tv1:=Result.tv1 * 0.666 * L2;
 
  Result.tv2:=v2*L3/L2 + v3*L2/L3;
  Result.tv2.Normalize();
  Result.tv2:=Result.tv2 * 0.666 * L2;
 
  Result.iv2:=iv2;
  Result.iv3:=iv3;
end;

Функция GetMonotoneCubicFactor принимает в качестве параметров четыре точки. Для точки с индексом i это будут точки: i-1, i, i+1, i+2

Функция MonotoneCubicInterpolation вычисляет отрезок сплайна выходящий из заданной точки



Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Полезное


Смотреть что такое "Monotone cubic interpolation" в других словарях:

  • Monotone cubic interpolation — In the mathematical subfield of numerical analysis, monotone cubic interpolation is a variant of cubic interpolation that preserves monotonicity of the data set being interpolated. Monotonicity is preserved by linear interpolation but not… …   Wikipedia

  • Cubic Hermite spline — In the mathematical subfield of numerical analysis a cubic Hermite spline (also called cspline), named in honor of Charles Hermite, is a third degree spline with each polynomial of the spline in Hermite form. The Hermite form consists of two… …   Wikipedia

  • Spline interpolation — See also: Spline (mathematics) In the mathematical field of numerical analysis, spline interpolation is a form of interpolation where the interpolant is a special type of piecewise polynomial called a spline. Spline interpolation is preferred… …   Wikipedia

  • List of numerical analysis topics — This is a list of numerical analysis topics, by Wikipedia page. Contents 1 General 2 Error 3 Elementary and special functions 4 Numerical linear algebra …   Wikipedia

  • List of mathematics articles (M) — NOTOC M M estimator M group M matrix M separation M set M. C. Escher s legacy M. Riesz extension theorem M/M/1 model Maass wave form Mac Lane s planarity criterion Macaulay brackets Macbeath surface MacCormack method Macdonald polynomial Machin… …   Wikipedia

  • Monotonic function — Monotonicity redirects here. For information on monotonicity as it pertains to voting systems, see monotonicity criterion. Monotonic redirects here. For other uses, see Monotone (disambiguation). Figure 1. A monotonically increasing function (it… …   Wikipedia

  • Liste de théorèmes — par ordre alphabétique. Pour l établissement de l ordre alphabétique, il a été convenu ce qui suit : Si le nom du théorème comprend des noms de mathématiciens ou de physiciens, on se base sur le premier nom propre cité. Si le nom du théorème …   Wikipédia en Français

  • Спираль — Архимедова спираль …   Википедия


Поделиться ссылкой на выделенное

Прямая ссылка:
Нажмите правой клавишей мыши и выберите «Копировать ссылку»