周一到周五,每天一篇,北京時間早上7點準(zhǔn)時更新~
成都創(chuàng)新互聯(lián)公司主營麒麟網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營網(wǎng)站建設(shè)方案,重慶App定制開發(fā),麒麟h5小程序制作搭建,麒麟網(wǎng)站營銷推廣歡迎麒麟等地區(qū)企業(yè)咨詢Interpolation is a term used to describe the process of finding values that lie between a set of known points(插值的意思是從一群已知的點的集合中找出某一個值的過程). Consider the equation of the line passing through points A and B(想象一下一個連接A點到B點的直線):
where P is any point on the line and is the vector from A to B(這里P表示的時候AB之間任意一點):

We can therefore write this equation as(因此我們可以把這個等式寫成:)
It is easy to see that when t is 0, P is equal to A; and when t is 1, P is equal to A + B ? A, which is simply B. Such a line is shown in Figure 4.13(當(dāng)t是0的時候,p就相當(dāng)于A點,當(dāng)t的值是1的時候,p就相當(dāng)于B點,如圖4.13所示)

If t lies between 0.0 and 1.0, then P will end up somewhere between A and B(如果t的值在0到1之間,那么p就落在A與B之間的某處). Values of t outside this range will push P off the ends of the line. You should be able to see that by smoothly varying t, we can move point P from A to B and back. This is known as linear interpolation(如果t的值超出了這個范圍,那么p則也會超出AB的范圍。可以看到,當(dāng)讓t從0到1慢慢變化時,p會從A移動到B,這叫線性插值). The values of A and B (and therefore P) can have any number of dimensions(A和B的值可以有任意多個維度). For example, they could be scalar values; two-dimensional values such as points on a graph; three-dimensional values such as coordinates in 3D space, colors, and so on(比如這里A和B的值可以是一個標(biāo)量,可以是二維的點,可以是三位的點、顏色等等); or even higher-dimension quantities such as matrices, arrays, or even whole images(甚至是更高維度的的矩陣、數(shù)組亦或是整個圖像). In many cases, linear interpolation doesn’t make much sense (for example, linearly interpolating between two matrices generally doesn’t produce a meaningful result), but angles, positions, and other coordinates can normally be interpolated safely(在很多情況下,線性插值不怎么好使,但是在角度、位置以及其他坐標(biāo)方面,一般來說這就夠了). Linear interpolation is such a common operation in graphics that GLSL includes a builtin function specifically for this purpose, mix:(在GLSL里,能用來進行線性插值的內(nèi)置函數(shù)是mix)
vec4 mix(vec4 A, vec4 B, float t);
The mix function comes in several versions taking different dimensionalities of vectors or scalars as the A and B inputs and taking scalars or matching vectors for t(該函數(shù)接收A、B兩個數(shù)據(jù),然后變量t,來對數(shù)據(jù)進行線性插值).
本日的翻譯就到這里,明天見,拜拜~~
第一時間獲取最新橋段,請關(guān)注東漢書院以及圖形之心公眾號
東漢書院,等你來玩哦
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機、免備案服務(wù)器”等云主機租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。
本文題目:Interpolation,Lines(插值、線性插值)-創(chuàng)新互聯(lián)
URL網(wǎng)址:http://chinadenli.net/article12/cohdgc.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供響應(yīng)式網(wǎng)站、ChatGPT、外貿(mào)建站、做網(wǎng)站、搜索引擎優(yōu)化、網(wǎng)站內(nèi)鏈
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容