How to calculate area on globe with terrain in cesium map

1. A concise explanation of the problem you're experiencing.
Draw a polygon on terrain, now I want to calculate area from surface to terrain.

2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

4. The Cesium version you're using, your operating system and browser.

We do have a set of measurement tools that can do area among other things here:

https://cesium.com/ion-sdk/

We’re in the process of integrating it with the ion platform so you can do this kind of query easily with an API.