function exp(a, b, c, d)
local r = math.sqrt(a^2+b^2)
local theta = math.acos(a/r)
local e = math.exp(1)
local sin, cos = math.sin, math.cos
local dlnr = d*math.log(r)
local rcedTheta = r^c*e^(-d*theta)
return {rcedTheta*(cos(c*theta)*cos(dlnr)-sin(c*theta)*sin(dlnr)), rcedTheta*(cos(c*theta)*sin(dlnr)+sin(c*theta)*cos(dlnr))}
end