generalized two lorenz function