Calculate irregular area of a heightmap selecting with mouse......Calcular un área irregular de un heightmap seleccionándolo con mouse

good evening …
I have a heightmap and need to create a method that you select me anywhere in this heightmap to calculate the irregular selected area.
Thank you very much for your time…
stay tuned …

not exactly sure what you are asking here. Perhaps adding a quick picture or sketch would help us figure out what you are trying to achieve.

I have heigmap and I want to select any area of the field with the mouse to get the area in square meters

Lo que quieres creo que es bastante complicado así a voz de pronto. Para empezar, un heightmap puede tomar distintas escalas y por lo tanto distintas unidades. En el caso de plasmar el heightmap en un terreno 3D como muestras en la imagen se me ocurren dos posibles soluciones:

  1. Utilizar integrales (necesitas conocimientos avanzados de matemáticas)
  2. Puesto que la malla está formada por triángulos, calcular y sumar el área de cada uno de los triángulos conformados por ese área específica (necesitarías tomar triángulos exactos si quieres tener un resultado “exacto”).

Siento no ser de mucha ayuda, quizás te de alguna idea xD.