0

I am new to python.

I have 3d data points , say x ranges from (118 to 123), y ranges from (0 to 10), z ranges from (-4 to 4).

So using these data points , how to calculate the surface area (Axyz) using python.

Any help is thankful.

3
  • 3
    Depending on what you are given, the answer might differs. Are you given coordinates ranges (which should define some sort of a cube), easy answer :) or is it a set of point defining an arbitrary surface? This would require some polygonization and might be complicated. Commented Jun 10, 2013 at 10:22
  • @Icfseth. It makes an arbitrary surface. I have created the surface and meshed it. After this how to calculate the surface area from that mesh. Commented Jun 11, 2013 at 2:12
  • a mesh is a set of polygons, usually triangles (depends on the 3D engine). Calculating each triangle surface and then summing them up is the way to go. The most difficult part is to generate the polygons from the set of points. Commented Jun 11, 2013 at 8:57

1 Answer 1

1

If you know how to compute the surface mathematically, given height, width and depth, all you need to do is extract these parameters from the tuples - using tuple unpacking:

x_from, x_to = (118, 123)
y_from, y_to = (0, 10)
z_from, z_to = (-4, 4)

now

height = y_to - y_from

etc.

Sign up to request clarification or add additional context in comments.

4 Comments

If it's a cube, the formula to calculate its surface(not volume) is xy*2 + xz*2 + z*y*2 which is the sum of the 6 surfaces, each 2 being on a different plane of the 3D space.
@Elazar can u help me in finding out an equation for the surface formed from these 3d data points!
@Elazar But its not a cube in my case.
so your question is not clear. do you have an arbitrary set of points (x,y,z)? if so, it is a difficult task.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.