How to calculate the moment of inertia of a convex hull?

조회 수: 12 (최근 30일)
Ricardo Vega Ayora
Ricardo Vega Ayora 2018년 6월 24일
댓글: Image Analyst 2018년 6월 25일
I want to calculate the moment of inertia of the convex hull that surrounds points in a 3D space. Assuming, of course, that the mass and/or the density of the volume are known. I've seen the convhull function and the code by Michael Kleder to calculate the hull's volume and centroid, but how can I get the inertia matrix/tensor?
Additionally, I've ported the C code by Brian Mirtich into matlab, but it requires that the vertices of the faces to be ordered in a counterclock-wise direction. Is there a way to be independent form the clockwise or counterclock-wise faces?

채택된 답변

Anton Semechko
Anton Semechko 2018년 6월 24일
Here is a link to a function on FEX that computes inertia tensors of objects represented by triangular surface meshes: https://www.mathworks.com/matlabcentral/fileexchange/48913-compute-exact-rigid-body-parameters-of-objects-represented-by-triangular-surface-meshes
  댓글 수: 2
Ricardo Vega Ayora
Ricardo Vega Ayora 2018년 6월 25일
Thanks! I've seen that it is actually your code, so great work!
Anton Semechko
Anton Semechko 2018년 6월 25일
No worries. Let me know if you have any problems using this function with your meshes.

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

추가 답변 (1개)

Image Analyst
Image Analyst 2018년 6월 25일
For what it's worth, attached is my image moments demo. It's only 2-D though, not 3-D, but I think adapting it would be easy.
  댓글 수: 2
Ricardo Vega Ayora
Ricardo Vega Ayora 2018년 6월 25일
Given that you are working with pixels and not with position vectors for the points, how accurate is your method? Does it depend much on the image's resolution?
Image Analyst
Image Analyst 2018년 6월 25일
Yes. It's a numerical solution, not an analytical one, so it will depend on the quantization (image resolution).

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

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by