I've been working on a research project where I need to correct for the light fall-off (vignetting) of a photographic lens. I've got the formula for the light fall-off written below, but I need to write it in Javascript, and I'm not sure how. Could someone here help me? Thanks.
y = -4E-08x^4 + 6E-06x^3 - 0.0002x^2 + 0.0035x + 0.9486
The final formula will be input into this program to make a photoshop filter to correct for the vignetting.
http://lemieuxster.com/dev/gradient/
Anyone here know how to write the above in the compatible syntax? Thanks.