數(shù)學(xué)公式的意義
pixelData[4*p+0] = Math.pow(Math.cos(Math.atan2(j-400,i-400)/2),2)*255;
pixelData[4*p+1] = Math.pow(Math.cos(Math.atan2(j-400,i-400)/2-2*Math.acos(-1)/3),2)*255;
pixelData[4*p+2] = Math.pow(Math.cos(Math.atan2(j-400,i-400)/2+2*Math.acos(-1)/3),2)*255;
請(qǐng)問(wèn)如上公式的具體含義的解釋是什么呢?
2015-12-08
atan2() 方法可返回從 x 軸到點(diǎn) (x,y) 之間的角度。
Math.cos(x)????x 的余弦值。返回的是 -1.0 到 1.0 之間的數(shù);
Math.pow()返回的第一個(gè)參數(shù)的值提高到第二個(gè)參數(shù)的冪