Atan2 function for the Calculator filter


since ParaView currently doesn’t support the transformation of results to user-defined (mainly cylindrical) coordinate systems, it can only be done manually, by applying proper conversion formulas. However, for cylindrical and spherical coordinates this workaround requires the availability of the atan2 function. The calculator filter doesn’t support it so I suggest adding it to allow for this workaround necessary until the transformation to local coordinate systems is developed. Theoretically, one could use the equivalent arctan2 function in Python Calculator but it’s not very convenient, especially since there are issues with accessing the coordinates.


You can use atan2 in the python calculator, in any case, this should ba an easy feature to add

That’s right but, as I’ve mentioned, Python calculator may be hard (if possible at all) to use for the aforementioned operation of transforming coordinates. Thus, I think that it would be great to add the atan2 function to the standard calculator as well.

1 Like

@cory.quammen This can be easily done on the VTK side. Let me know if there is any project for it.

@FEngineer It seems like atan2 is already supported in ExprTk. Check the SECTION 08 - BUILT-IN OPERATIONS & FUNCTIONS in the readme file of ExprTK. It’s just not exposed in ParaView as a button because there are many supported functions.

1 Like

Should we add a link to ExprTk in the Calculator interface (or in the documentation) pointing users to additional functionality?

I think it would be better to expand the functions available in buttons. The docs take some parsing to figure out what is going on.


If we could add six buttons-functions (or as many as each row has) i am fine with that.

I wish we could have something like a simple calculator and then advanced. But this will require some work on the UI

Buttons would be best for most used features. A link to the ExprTk would be useful as well as there is a lot in the doc and probably not everything would fit in buttons. Is the full ExprTk supported in the context of ParaView Calculator (loops, local variables)? If not, a link to the full doc might be confusing.

Plenty of functions are supported, i have not checked all the capabilities of ExprTk because there are A LOT. But most (if not all) functions should be working. I could go do an exhaustive search if you want.

If we think most/everything should be supported I would add the link to the full ExprTk doc somewhere - maybe in the Calculator documentation.

1 Like