surface area of a 3D surface

19 ビュー (過去 30 日間)
UNK
UNK 2016 年 3 月 6 日
コメント済み: DGM 2025 年 7 月 2 日
I have data for 3D points and I have made a surface using these points. Is there a way to get surface area of this 3D surface.
Thanks

採用された回答

Roger Stafford
Roger Stafford 2016 年 3 月 6 日
If you know the 3D coordinates of each of the three vertices for each triangle in your diagram, then just take the sum of all the triangles' areas.
For example, if P1, P2, and P3 are 3D coordinate vectors of the three respective vertices of some particular triangle, then its area is given by:
AreaP1P2P3 = 1/2*norm(cross(P2-P1,P3-P1));
  1 件のコメント
M.S. Khan
M.S. Khan 2020 年 8 月 24 日
Hi Rogar, if P1, P2............................Pn, then how will we proceed. Please i have shared same question in the forum. Could you please guide me how to proceed. Regards

サインインしてコメントする。

その他の回答 (1 件)

Jerry Campbell
Jerry Campbell 2020 年 10 月 28 日
編集済み: DGM 2025 年 7 月 2 日
Hi M. S.
I created a simple Cube with sides of 100mm in AutoCad then exported the STL file
I then used the following code to calculate the volume and surface area of the cube.
unzip('Unit Cube 100mm v1.stl.zip') % EDIT
% Create PDE Model
UnitCubeModel = createpde();
% Import STL file into Geometry of Model
UnitCubeModelGeometry = importGeometry(UnitCubeModel,'Unit Cube 100mm v1.stl');
% Generate Mesh for Model
UnitCubeMesh = generateMesh(UnitCubeModel);
% V for vertices and F for the facets
% allDisplayFaces is backward compatible method of the Geometry Object
[F, V] = UnitCubeModelGeometry.allDisplayFaces();
% Perform cross product across all the Facets and Vertices in the Model
a = V(F(:, 2), :) - V(F(:, 1), :);
b = V(F(:, 3), :) - V(F(:, 1), :);
c = cross(a, b, 2);
% Calculate Surface Area and Volume of Model
modelSurfaceArea = 1/2 * sum(sqrt(sum(c.^2, 2)));
modelVolume = volume(UnitCubeMesh);
% Plot the PDE Model
pdegplot(UnitCubeModel,'FaceLabels','on','FaceAlpha',0.5);
% Display the Volume and Surface Area
disp("Volume of Model = " + modelVolume);
Volume of Model = 1000000
disp("The surface area of the Model = " + modelSurfaceArea);
The surface area of the Model = 60000
  1 件のコメント
DGM
DGM 2025 年 7 月 2 日
EDITOR'S NOTE:
I attached the STL model as an archive so that the code could be demo'd on the forum.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGeometry and Mesh についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by