地龙是什么| 愚公移山是什么意思| 急性尿道炎吃什么药| 湿疹用什么| 珂字五行属什么| 什么茶降血压| 美女指什么生肖| 化疗是什么| 山药炒什么好吃| 雪霁是什么意思| 草字头的字和什么有关| 吃黄精有什么好处| uranus是什么星球| 青柠是什么水果| 7大营养素是什么| 维字五行属什么| 芋圆用什么粉做的| 青提是什么| 胸膜炎吃什么药| 副师级是什么军衔| 检查妇科清洁度三是什么意思| 7.13什么星座| 螳螂吃什么食物| 讹诈是什么意思| 男人吃什么可以增强性功能| 梦见自己洗头发是什么意思| 震颤是什么症状| 上海松江有什么好玩的地方| 神经外科是看什么病的| 精修是什么意思| 月经一个月来两次是什么原因| 脸上发红是什么原因| 心是什么结构| 灰指甲用什么药最有效| 用膳是什么意思| 高糖是什么| 牛皮糖是什么意思| 老虎凳是什么| 2012属什么生肖| 红细胞偏高是什么病| 微针是什么美容项目| 我的梦想是什么| 彩礼什么时候给女方| 一戴套就软是什么原因| 天雨粟鬼夜哭什么意思| 3月9号是什么星座| 斗志昂扬是什么意思| 侧着睡觉有什么坏处| 伤官是什么| 攀龙附凤是什么生肖| 一个月的小猫吃什么| 轻度郁症有什么表现| 螨虫用什么药膏| 右肺上叶钙化灶是什么意思| 综合内科是看什么病| 水里有什么| 经常流鼻血是什么原因| 起飞是什么意思| 机器学习是什么| 襄是什么意思| 76年属什么生肖| 精索静脉曲张挂什么科| 男人断眉代表什么| 淡墨是什么意思| 花儿为什么这样红歌词| 人肉是什么味道| 左侧卵巢囊性回声是什么意思| 鳄鱼的天敌是什么| 什么东西最补肾| 藠头是什么菜| 十二指肠胃溃疡吃什么药| 左腿发麻是什么原因| 为什么北极没有企鹅| 韩字五行属什么| 梦见自己和别人结婚是什么意思| 什么食物富含维生素b| 童心未泯是什么意思| 晏殊字什么| 手绘是什么意思| 大三阳吃什么药好| 磁共振是什么| 6s管理内容是什么| 失眠吃什么中药调理效果快| 肺气囊是什么病| 方脸适合什么发型| 脑动脉瘤是什么原因引起的| 为什么小鸟站在电线上不会触电| 王安石号什么| 樱桃和车厘子有什么区别| 3.19是什么星座| 舌头有点麻是什么病的前兆| 为什么做b超要憋尿| 摧枯拉朽是什么意思| 蓝色和红色混合是什么颜色| 金银花什么时候采摘最好| 大小脸挂什么科| 午餐吃什么| 内窥镜是做什么检查| 烂仔是什么意思| m是什么品牌| 眼皮有痣代表什么| 肺部肿瘤切除后吃什么| 硫酸亚铁是什么颜色| 凌晨两点半是什么时辰| 鹌鹑是什么| pad是什么设备| ms是什么病| 什么花不能浇水| 铁蛋白高吃什么食物好| 行房时硬度不够是什么原因| 反酸是什么感觉| 完全性右束支阻滞是什么意思| 什么品种的鸡肉最好吃| 喝椰子粉有什么好处| 医学美容技术学什么| 手上的纹路代表什么| 男性尿道痒吃什么药| 靖康耻指的是什么历史事件| 羊跟什么生肖最配| 儿童胃肠型感冒吃什么药| 有什么有什么的四字词语| 2005年属什么生肖| 低密度脂蛋白高有什么危害| 今天穿什么衣服合适| 冰点脱毛的原理是什么| 人为什么打嗝| 朋友圈ps是什么意思| 肚子胀恶心想吐是什么原因| 喝金银花有什么好处| 魅可口红属于什么档次| 磨玻璃结节是什么意思| 小猫的尾巴有什么作用| 撒尿分叉是什么原因| 什么食物对肝有好处| 天使轮是什么意思| 免疫固定电泳查什么的| 结婚9年是什么婚| 鹅蛋有什么好处| 天珠是什么做的| 吃无花果有什么好处| 鱼腥草破壁饮片有什么功效| 呼吸道感染挂什么科| 阳历6月28日是什么星座| 7月1号是什么星座| 11.23是什么星座| 芬太尼是什么药| 空调风扇不转是什么原因| otg线是什么| 上位是什么意思| 馨是什么意思| 龟头有点痒擦什么药| 内分泌科属于什么科| 肝功能不全是什么意思| 感冒咳嗽吃什么水果好| 细菌性阴道炎有什么症状| 胃不好吃什么最养胃| 红红的太阳像什么| 腐竹和什么一起炒好吃| 蒲公英什么时候开花| 算五行缺什么免费测试| 梦到棺材什么意思| 鼻甲肥大是什么原因| 用黄瓜敷脸有什么功效| 灰指甲长什么样子图片| 吃什么中药能降血压| 嘴角起泡是什么原因| 什么大河| 早搏有什么危害| 一般事故隐患是指什么| 宫颈纳囊用什么药治疗效果好| 梦见自己手机丢了是什么意思| 6月13日是什么日子| 苏轼为什么反对王安石变法| 净字五行属什么| 建档需要准备什么资料| 喉咙痒吃什么药好| 老年痴呆吃什么药| 不生孩子的叫什么族| 把握时机是指什么生肖| 回南天什么意思| 滴蜡是什么意思| 眉毛有什么作用| 甲子五行属什么| 淋巴细胞百分比偏低是什么原因| 肺脓肿是什么病严重吗| 决断是什么意思| 什么是牙结石| qq2g在线是什么意思| 阴囊是什么| a1微球蛋白偏高说明什么意思| 早搏有什么危害| 喝酒精的后果是什么| 医院量身高为什么会矮| 小青柑属于什么茶| 胃痛吃什么好得快| 猫为什么要绝育| 长脸适合什么眉形| 戴帽子是什么意思| 萎缩性胃炎吃什么好| 智齿冠周炎吃什么消炎药| 胃幽门螺杆菌有什么症状| 纹身的人是什么心理| 胎盘是什么| 左肋骨下方是什么器官| 二甲双胍不能和什么药一起吃| 龟是什么结构| 女生被口是什么感觉| 孕妇贫血吃什么| 市斤是什么意思| 钾高是什么原因造成的| 大逆不道什么意思| 面色少华是什么意思| 大便不成形是什么原因| 三月五号是什么星座| cav是什么意思| 汗管瘤什么原因造成| 儿童回春颗粒主要治什么| 什么牌子的蜂蜜比较好| 理想是什么意思| 突然间头晕是什么原因| 凝血五项是检查什么病| 吃什么开胃| 父亲节送什么| yankees是什么牌子| 右边小腹疼是什么原因女性| ll是什么意思| 新生儿呛奶是什么原因引起的| clean什么意思| 老板是什么意思| 没收个人全部财产是什么意思| 上皮细胞什么意思| 此是什么意思| 高锰酸钾治疗男性什么病| 肝异常一般是什么情况| 小孩一到晚上就发烧是什么原因| 春秋是什么时期| 什么盛开| 心火旺吃什么药效果最好| 什么是飞机杯| 鱼油不能和什么一起吃| 什么的草帽| 张良和刘邦是什么关系| 什么是机械键盘| 长期吃二甲双胍有什么副作用| 头疼恶心是什么症状| 外阴瘙痒用什么药膏擦| 96615是什么电话| 什么是七情六欲| 肋软骨炎挂什么科| 子宫肌瘤是什么原因造成的| 甲状腺肿大挂什么科| 吃饭后胃胀是什么原因| 松露是什么| 吃完就拉是什么原因| 吃什么减肥效果最快| 右肋骨下方隐隐疼痛是什么原因| 嘴巴长疱疹是什么原因| 通讯地址是什么意思| 甲方是什么意思| 属牛的五行属性是什么| hbv病毒是什么意思| 命根子是什么| 佛陀是什么意思| 足跟痛用什么药| 百度Jump to content

From Wikipedia, the free encyclopedia
Given the two red points, the blue line is the linear interpolant between the points, and the value y at x may be found by linear interpolation.
百度 在中国古代文献中,称这些政体为“邦”或“国”,如“禹会诸侯与会稽,执玉帛者万国”,据此,可称各个区域的这些初期文明为“邦国文明”。

In mathematics, linear interpolation is a method of curve fitting using linear polynomials to construct new data points within the range of a discrete set of known data points.

Linear interpolation between two known points

[edit]
In this geometric visualisation, the value at the green circle multiplied by the horizontal distance between the red and blue circles is equal to the sum of the value at the red circle multiplied by the horizontal distance between the green and blue circles, and the value at the blue circle multiplied by the horizontal distance between the green and red circles.

If the two known points are given by the coordinates and , the linear interpolant is the straight line between these points. For a value in the interval , the value along the straight line is given from the equation of slopes which can be derived geometrically from the figure on the right. It is a special case of polynomial interpolation with .

Solving this equation for , which is the unknown value at , gives which is the formula for linear interpolation in the interval . Outside this interval, the formula is identical to linear extrapolation.

This formula can also be understood as a weighted average. The weights are inversely related to the distance from the end points to the unknown point; the closer point has more influence than the farther point. Thus, the weights are and , which are normalized distances between the unknown point and each of the end points. Because these sum to 1, yielding the formula for linear interpolation given above.

Interpolation of a data set

[edit]
Linear interpolation on a data set (red points) consists of pieces of linear interpolants (blue lines).

Linear interpolation on a set of data points (x0, y0), (x1, y1), ..., (xn, yn) is defined as piecewise linear, resulting from the concatenation of linear segment interpolants between each pair of data points. This results in a continuous curve, with a discontinuous derivative (in general), thus of differentiability class .

Linear interpolation as an approximation

[edit]

Linear interpolation is often used to approximate a value of some function f using two known values of that function at other points. The error of this approximation is defined as where p denotes the linear interpolation polynomial defined above:

It can be proven using Rolle's theorem that if f has a continuous second derivative, then the error is bounded by

That is, the approximation between two points on a given function gets worse with the second derivative of the function that is approximated. This is intuitively correct as well: the "curvier" the function is, the worse the approximations made with simple linear interpolation become.

History and applications

[edit]

Linear interpolation has been used since antiquity for filling the gaps in tables. Suppose that one has a table listing the population of some country in 1970, 1980, 1990 and 2000, and that one wanted to estimate the population in 1994. Linear interpolation is an easy way to do this. It is believed that it was used in the Seleucid Empire (last three centuries BC) and by the Greek astronomer and mathematician Hipparchus (second century BC). A description of linear interpolation can be found in the ancient Chinese mathematical text called The Nine Chapters on the Mathematical Art (九章算術),[1] dated from 200 BC to AD 100 and the Almagest (2nd century AD) by Ptolemy.

The basic operation of linear interpolation between two values is commonly used in computer graphics. In that field's jargon it is sometimes called a lerp (from linear interpolation). The term can be used as a verb or noun for the operation. e.g. "Bresenham's algorithm lerps incrementally between the two endpoints of the line."

Lerp operations are built into the hardware of all modern computer graphics processors. They are often used as building blocks for more complex operations: for example, a bilinear interpolation can be accomplished in three lerps. Because this operation is cheap, it's also a good way to implement accurate lookup tables with quick lookup for smooth functions without having too many table entries.

Extensions

[edit]
Comparison of linear and bilinear interpolation some 1- and 2-dimensional interpolations.
Black and red/yellow/green/blue dots correspond to the interpolated point and neighbouring samples, respectively.
Their heights above the ground correspond to their values.

Accuracy

[edit]

If a C0 function is insufficient, for example if the process that has produced the data points is known to be smoother than C0, it is common to replace linear interpolation with spline interpolation or, in some cases, polynomial interpolation.

Multivariate

[edit]

Linear interpolation as described here is for data points in one spatial dimension. For two spatial dimensions, the extension of linear interpolation is called bilinear interpolation, and in three dimensions, trilinear interpolation. Notice, though, that these interpolants are no longer linear functions of the spatial coordinates, rather products of linear functions; this is illustrated by the clearly non-linear example of bilinear interpolation in the figure below. Other extensions of linear interpolation can be applied to other kinds of mesh such as triangular and tetrahedral meshes, including Bézier surfaces. These may be defined as indeed higher-dimensional piecewise linear functions (see second figure below).

Example of bilinear interpolation on the unit square with the z values 0, 1, 1, and 0.5 as indicated. Interpolated values in between are represented by colour.
A piecewise linear function in two dimensions (top) and the convex polytopes on which it is linear (bottom)

Programming language support

[edit]

Many libraries and shading languages have a "lerp" helper-function (in GLSL known instead as mix), returning an interpolation between two inputs (v0, v1) for a parameter t in the closed unit interval [0, 1]. Signatures between lerp functions are variously implemented in both the forms (v0, v1, t) and (t, v0, v1).

// Imprecise method, which does not guarantee v = v1 when t = 1, due to floating-point arithmetic error.
// This method is monotonic. This form may be used when the hardware has a native fused multiply-add instruction.
float lerp(float v0, float v1, float t) {
  return v0 + t * (v1 - v0);
}

// Precise method, which guarantees v = v1 when t = 1. This method is monotonic only when v0 * v1 < 0.
// Lerping between same values might not produce the same value
float lerp(float v0, float v1, float t) {
  return (1 - t) * v0 + t * v1;
}

This lerp function is commonly used for alpha blending (the parameter "t" is the "alpha value"), and the formula may be extended to blend multiple components of a vector (such as spatial x, y, z axes or r, g, b colour components) in parallel.

See also

[edit]

References

[edit]
  1. ^ Joseph Needham (1 January 1959). Science and Civilisation in China: Volume 3, Mathematics and the Sciences of the Heavens and the Earth. Cambridge University Press. pp. 147–. ISBN 978-0-521-05801-8. {{cite book}}: ISBN / Date incompatibility (help)
[edit]
户口本可以干什么坏事 片是什么 暴龙眼镜什么档次 铀是什么 宝宝什么时候开始长牙
飞蚊症是什么原因 敷设是什么意思 什么肉蛋白质含量最高 检查神经做什么检查 心率过慢有什么危害
生孩子送什么 才思敏捷是什么意思 眼睛流泪用什么眼药水 头孢主要治什么病 胆囊炎有什么症状
肠胃炎发烧吃什么药 瑶柱是什么 甲肝戊肝是什么病 抽烟对女生有什么危害 我想知道为什么
烧心是什么意思hcv9jop7ns0r.cn 什么是花胶hcv8jop2ns9r.cn 4月20日是什么星座hcv8jop4ns0r.cn 嘌呤高会引起什么症状hcv9jop6ns3r.cn 皮肤暗黄是什么原因造成的hcv8jop1ns1r.cn
乙型肝炎表面抗原阳性是什么意思hcv8jop8ns0r.cn 4月22日是什么星座hcv8jop2ns2r.cn 湿疹是什么原因造成的hcv9jop4ns7r.cn 爆缸是什么意思beikeqingting.com 头孢是什么药hcv9jop2ns4r.cn
lg是什么牌子1949doufunao.com er是什么意思hcv9jop2ns1r.cn 龟头炎挂什么科hcv8jop3ns5r.cn 盆腔积液是什么引起的weuuu.com 中国国鸟是什么wmyky.com
让球是什么意思cl108k.com 啫啫是什么意思hcv9jop3ns4r.cn 帝舵手表什么档次hcv7jop5ns4r.cn 破伤风挂什么科qingzhougame.com 什么是瞬时速度hcv8jop6ns7r.cn
百度