介紹 html
原文: SG Series app
地址:https://mynameismjp.wordpress.com/2016/10/09/sg-series-part-5-approximating-radiance-and-irradiance-with-sgs/ wordpress
做爲系列文章的第五篇,此文用 SG 近似光照分佈。 函數
擬合 spa
給定一個樣本集合,尋找具備解析形式的曲線來近似表示這個樣本集合,這被稱爲曲線擬合(Curve Fitting)。曲線擬合能夠看做一種有損壓縮(Lossy Compression)。 3d
Fitting various polynomials to data generated by a sine wave. Red is first degree, green is second degree, orange is third degree, blue is forth degree.By Krishnavedala (Own work) [CC0], via Wikimedia Commons htm
擬合曲線能夠經過一組基函數(Basis Function)的線性組合(Linear Combination)獲得。 blog
多項式基函數 three
高斯基函數 get
Fitting Gaussians to a data set using least squares. The left graph shows a fit with a single Gaussian, the middle graph shows a fit with two Gaussians, and the right graph shows a fit with three Gaussians.
在擬合曲線的解析形式經過基函數確立以後,基函數的線性組合係數能夠經過最小二乘法(Least Squares Method)來計算獲得。