Geometry properties in 3D (area, volume, moment of inertia...)

35 visualizaciones (últimos 30 días)
Mady
Mady el 13 de Nov. de 2024 a las 16:55
Comentada: Matt J el 13 de Nov. de 2024 a las 22:47
Hello, I'm trying to work with 3D discrete models in matlab (RBSM, LPDM...) and I am struggling to find certain properties necesary for calculation. For example, when I have a plane in 3D defined by points/vertices, is there a way to find its area or moment of inertia? I am well aware of my areas for improvement in planimetry or linear algebra, but if anyone could recommend me if there's a function in MATLAB or point me in the right direction, I'd be grateful.
In the past, I used the functions for polyshape objects, is there something similar for 3D?
  3 comentarios
Mady
Mady el 13 de Nov. de 2024 a las 18:40
Yes exactly, sorry I defined it wrong. Polygonial face of a volume defined by its vertices (3/4/5/6... points).
Walter Roberson
Walter Roberson el 13 de Nov. de 2024 a las 19:39
Where's @Roger Stafford when you need him...

Iniciar sesión para comentar.

Respuestas (1)

Matt J
Matt J el 13 de Nov. de 2024 a las 17:51
Editada: Matt J el 13 de Nov. de 2024 a las 17:55
You can project your planar points into a 2D coordinate system and then use whatever 2D methods you had used previously to compute desired quantities. I would suggest planarFit() from this FEX download to help,
Example,
V=eye(3) %Triangle in 3D
V = 3×3
1 0 0 0 1 0 0 0 1
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
v=planarFit(V').project2D(V'); %2D vertices
p=polyshape(v');
area(p),
ans = 0.8660
  2 comentarios
Mady
Mady el 13 de Nov. de 2024 a las 19:08
That tool looks useful, thank you. However, in my problem only partly gives the desired solution. For the area calculation it is great I think, but in case of moment of inertia, there would be one direction missing (the shape could rotate around 3 axis in 3D, which cannot be captured in projection to 2D, right?).
Matt J
Matt J el 13 de Nov. de 2024 a las 22:47
You can use triangulation to decompose the polyshape into triangles and then add up the moments of inertia of each triangle.

Iniciar sesión para comentar.

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by