Hi,
uhm, sounds like complex math, I would first try to find in various forum how developers approach such feature.
as far as making it in PLayMaker, if you have a formula ready to use, I can show you how to work it out, but usually, it's simple, the complex part is to get the formula in the first place.
Bye,
Jean