MATLAB: How to compute volume and aspect ratio of a 3D geometry

geometryhomeworkMATLAB

I have a set of (x,y,z) coordinates, which typically represent a 3D geometrical object. Is there any MATLAB function that returns:
  1. The volume occupied by that object
  2. The aspect ratio of that object.
Aspect ratio is its size along y-axis divided by its size along x-axis.

Best Answer

If the volume is convex then the second output argument to
convhulln
will be the volume. If it is not convex then there are tools on the FEX from Luigi Giaccari and Adam A. which will make a good approximation.
Good Luck!
Related Question