필터 지우기
필터 지우기

Finding the surface area of a 3-D plot?

조회 수: 38 (최근 30일)
Sam
Sam 2013년 8월 13일
댓글: Bret Jarod Sean Ordono 2023년 4월 30일
If I have the following topography:
%Heights
y=0:5:80; % Width Length measurement increments (m)
x=0:5:180; % Length measurement increments (m)
z=xlsread('Truncated_Pyramid_Topography.xlsx', 'B24:Al40');
Is there a function or method I can use to find the surface area?

채택된 답변

Roger Stafford
Roger Stafford 2013년 8월 13일
To get the surface area you need to first determine the surface normal for each point in your mesh of x-y points, as you would to use 'surf'. Use 'meshgrid' to convert your vectors to 2D matrices. Then use 'surfnorm' to determine the surface normal vectors. Next, normalize that normal vector and then use the reciprocal of its z component as the integrand of a numerical double integral taken over your x-y area. This reciprocal is the secant of the angle the normal makes with the z-axis which is the needed factor for conversion from horizontal area to your surface's area.
[X,Y] = meshgrid(x,y);
% Get the corresponding Z values for each pair in X and Y
[Nx,Ny,Nz] = surfnorm(X,Y,Z);
S = sqrt(Nx.^2+Ny.^2+Nz.^2)./Nz; % Secant of angle normal makes with z-axis
% Now S is to be your integrand in the double integral
For this last you can use 'trapz' twice for this purpose, as explained in Walter's reference to my part of Newsreader thread 308496.
  댓글 수: 2
宇哲
宇哲 2023년 3월 14일
Thanks
Bret Jarod Sean Ordono
Bret Jarod Sean Ordono 2023년 4월 30일
do you have any reference for this? thank you! This really helped me a lot so I really need a book that contains this formula, if you dont mind.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Walter Roberson
Walter Roberson 2013년 8월 13일

카테고리

Help CenterFile Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by