I have a numpy
array containing 70 points in 3D. These points are measurements of the edges of a flame with an ellipse-kind shape. Every row represent a different point, and the columns are the x,y,z coordinates. The array size is (70,3).
I want to fit/create an ellipse to this 3D data and calculate/approximate the area of that ellipse in Python.
The data array is:
data = np.array([[
0.14893939, 0.14893939, 0.14621212, 0.14621212, 0.14651515, 0.14651515, 0.14984848, 0.14984848,
0.15015152, 0.15015152, 0.15045455, 0.15045455, 0.15075758, 0.15075758, 0.14439394, 0.14439394,
0.1519697, 0.1519697, 0.14378788, 0.14378788, 0.14348485, 0.14348485, 0.15318182, 0.15318182,
0.15318182, 0.15318182, 0.15318182, 0.15318182, 0.15318182, 0.15318182, 0.15318182, 0.15318182,
0.15318182, 0.15318182, 0.15318182, 0.15318182, 0.15287879, 0.15287879, 0.15287879, 0.15287879,
0.14378788, 0.14378788, 0.14378788, 0.14378788, 0.14409091, 0.14409091, 0.14409091, 0.14409091,
0.1519697, 0.1519697, 0.15166667, 0.15166667, 0.15106061, 0.15106061, 0.15136364, 0.15136364,
0.14469697, 0.14469697, 0.15015152, 0.15015152, 0.15045455, 0.15045455, 0.14530303, 0.14530303,
0.14530303, 0.14560606, 0.14560606, 0.14560606, 0.1480303, 0.1480303], [
0.14560606, 0.14560606, 0.14590909, 0.14590909, 0.14590909, 0.14590909, 0.14590909, 0.14590909,
0.14590909, 0.14590909, 0.14590909, 0.14590909, 0.14590909, 0.14590909, 0.14651515, 0.14651515,
0.14681818, 0.14681818, 0.1480303, 0.1480303, 0.14924242, 0.14924242, 0.14924242, 0.14924242,
0.15045455, 0.15045455, 0.15075758, 0.15075758, 0.15106061, 0.15106061, 0.15136364, 0.15136364,
0.15166667, 0.15166667, 0.1519697, 0.1519697, 0.15287879, 0.15287879, 0.15318182, 0.15318182,
0.15409091, 0.15409091, 0.15439394, 0.15439394, 0.15469697, 0.15469697, 0.155, 0.155, 0.155,
0.155, 0.15530303, 0.15530303, 0.15560606, 0.15560606, 0.15560606, 0.15560606, 0.15621212,
0.15621212, 0.15621212, 0.15621212, 0.15621212, 0.15621212, 0.15651515, 0.15651515, 0.15651515,
0.15651515, 0.15651515, 0.15651515, 0.15651515, 0.15651515], [
0.01907071, 0.01921212, 0.01935354, 0.01949495, 0.01935354, 0.01949495, 0.01907071, 0.01921212,
0.01907071, 0.01921212, 0.01907071, 0.01921212, 0.01907071, 0.01921212, 0.02062626, 0.02076768,
0.01878788, 0.01892929, 0.02034343, 0.02048485, 0.02006061, 0.02020202, 0.01793939, 0.01808081,
0.01765657, 0.01779798, 0.01765657, 0.01779798, 0.01765657, 0.01779798, 0.01765657, 0.01779798,
0.01765657, 0.01779798, 0.01765657, 0.01779798, 0.01765657, 0.01779798, 0.01765657, 0.01779798,
0.01935354, 0.01949495, 0.01935354, 0.01949495, 0.01935354, 0.01949495, 0.01935354, 0.01949495,
0.01793939, 0.01808081, 0.01793939, 0.01808081, 0.01793939, 0.01808081, 0.01793939, 0.01808081,
0.02006061, 0.02020202, 0.01822222, 0.01836364, 0.01822222, 0.01836364, 0.01963636, 0.01977778,
0.01991919, 0.01963636, 0.01977778, 0.01991919, 0.01822222, 0.01836364]]).T
I tried to fit triangles to this data and calculated the area but this method overestimated the area and created a really messy surface. Thus, I am looking for a better way to create a surface and calculate the area.