• MisterFrog@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      ·
      edit-2
      3 months ago

      Not a programmer, but all this is is a representation of three columns of data in a table, plus a fourth for the label. Make a lookup table with 4 columns. Now make rows with the data in it, assigning the label for each.

      This chart is just a nice way of representing 3 variables in 2D form. It’s just an XYZ graph in 2D. With the constraint that X+Y+Z <= 100. You could even assign functions for those different labels.

      Though, me not being very good at maths, I’d have no idea how to write a function to cover those areas.

      Probably easier just having a lookup table.

      As an example, though, a line going from the top of the triangle to the bottom, in the middle would be:

      Clay(silt,sand) = 100 - Silt - Sand, where sand=silt Thus, Clay = 100 - Silt, where Clay+silt+sand<=100 would be a vertical line on the chart.

      I think. I’m just having fun trying to work this out, without looking it up now.