Log in

View Full Version : Help: I Need to Write a Math Formula in Javascript Format



d_stilgar
02-05-2014, 06:41 AM
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.

Twigsoffury
02-07-2014, 06:44 PM
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.


nope!

also, I think were the only two people left on the forums, actually posting.

d_stilgar
02-08-2014, 01:02 AM
I got it figured out, and then I did a whole bunch of work, and now my research is essentially complete, which is good because I'm going to Hawaii to present my research to a whole bunch of really smart people.

Twigsoffury
02-08-2014, 02:28 AM
I got it figured out, and then I did a whole bunch of work, and now my research is essentially complete, which is good because I'm going to Hawaii to present my research to a whole bunch of really smart people.


Best of luck dood!! ! ! 1 1

TheMainMan
02-11-2014, 11:24 AM
Good luck with the presentation! All of this was way beyond my skill set.