matlab - find area of 3D polygon -
given matrix nx3 represents n points in 3d space. points lie on plane. plane given normal , point lying on it. there matlab function or matlabby way find area directly matrix?
what trying write function first computes centroid,c, of n-gon. form triangles : (1,2,c),(2,3,c),...,(n,1,c). compute area , sum up. had organise polygon points in cyclic order unordered figured hard. there easy way so?
is there easier way in matlab call function on matrix?
here perhaps easier method. first suppose plane not parallel z-axis. project polygon down xy-plane removing 3rd coordinate. compute area a' in xy-plane the usual techniques.
if plane makes angle θ xy-plane, 3d area a = a' / cos θ.
if plane parallel z-axis, same computation w.r.t. y-axis instead, projecting xz-plane.
Comments
Post a Comment