0 Replies Latest reply on Feb 20, 2017 8:07 AM by visualcraft

    How to replace ATAN2 function from Excel's calculation?

    visualcraft

      Hallo,

      I'm migrating from an flat "database" in Excel, to a hopefully much faster and flexibel FileMaker relational database.

      I'm using FileMaker Pro (not Advanced).

       

      I have a few thousands of records with color values. The exact color of each record is expressed as a 3-dimensional tuple of numerical values; this is 3 fields with decimal values, containing the CIELab components of each record.

       

      Lab_L

      Lab_a

      Lab_b

       

      In the CIELab model, the color differences which you perceive correspond to distances when measured colorimetrically.

      The a axis extends from green (-a) to red (+a) and the b axis from blue (-b) to yellow (+b).

      The brightness (L) increases from the bottom to the top of the three-dimensional model.

      CIELAB - Color Models - Technical Guides

       

      I now need to calculate, from these three values, the Saturation and Hue of each of them.

       

      I calculate Saturation as the distance from the 3-dimensional point to the central vertical axis:

      (Lab_a ^ 2 + Lab_b ^ 2) ^ 0.5

      This is no problem in FileMaker.

       

      BUT.

      In Excel, I used to calculate the Hue as the angle (0 to 360°) around this axis,

      using the ATAN2-function, that apparently isn't available for FileMaker — I only find ATAN

      In Excel >      Hue = ATAN2 ( Lab_a , Lab_b ) * 180 / PI()

       

      I'm sure that there's a way to replace this one function by a more extended calculation. atan2 - Wikipedia

      But apparently I just don't get it done without some help …

       

      I would appreciate any help

       

      Thank you in advance!