Creating mesh on a surface with two variables
The Python function 'acos' has a parameter's domain between -1 and 1. If the parameter is out of this, you get a 'domain error'.

So for instance, you can set the following formula:

acos( (1-sin(x)-sin(y)) % (1 if (1-sin(x)-sin(y)) &gt;0 else -1 ) )


or more simple (using 'fmod' which is C style modulo as Python's native modulo sign rely on the divisor sign)

acos( fmod( (1-sin(x)-sin(y)), 1 ) )


which is limiting the parameter's values.

Or alternatively to have a linear transition, limiting the parameter value like this:

acos( ((1-sin(x)-sin(y)) + 1) / 4 )


The result is the following:



or:



For your information, the math functions available in the addon:

safe_list = ['math', 'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'cosh',
    'degrees', 'e', 'exp', 'fabs', 'floor', 'fmod', 'frexp', 'hypot',
    'ldexp', 'log', 'log10', 'modf', 'pi', 'pow', 'radians',
    'sin', 'sinh', 'sqrt', 'tan', 'tanh']


And these links to stack overflow:


About acos.
About modulo.