Как я могу вычислить механическую инерцию и момент инерции многогранника?

добавление этого кода в мое специальное промежуточное программное обеспечение решило мою проблему

5
задан batty 1 May 2009 в 01:39
поделиться

4 ответа

Assuming your trimesh is closed (whether convex or not) there is a way!

As dmckee points out, the general approach is building tetrahedrons from each surface triangle, then applying the obvious math to total up the mass and moment contributions from each tet. The trick comes in when the surface of the body has concavities that make internal pockets when viewed from whatever your reference point is.

So, to get started, pick some reference point (the origin in model coordinates will work fine), it doesn't even need to be inside of the body. For every triangle, connect the three points of that triangle to the reference point to form a tetrahedron. Here's the trick: use the triangle's surface normal to figure out if the triangle is facing towards or away from the reference point (which you can find by looking at the sign of the dot product of the normal and a vector pointing at the centroid of the triangle). If the triangle is facing away from the reference point, treat its mass and moment normally, but if it is facing towards the reference point (suggesting that there is open space between the reference point and the solid body), negate your results for that tet.

Effectively what this does is over-count chunks of volume and then correct once those areas are shown to be not part of the solid body. If a body has lots of blubbery flanges and grotesque folds (got that image?), a particular piece of volume may be over-counted by a hefty factor, but it will be subtracted off just enough times to cancel it out if your mesh is closed. Working this way you can even handle internal bubbles of space in your objects (assuming the normals are set correctly). On top of that, each triangle can be handled independently so you can parallelize at will. Enjoy!

Afterthought: You might wonder what happens when that dot product gives you a value at or near zero. This only happens when the triangle face is parallel (its normal is perpendicular) do the direction to the reference point -- which only happens for degenerate tets with small or zero area anyway. That is to say, the decision to add or subtract a tet's contribution is only questionable when the tet wasn't going to contribute anything anyway.

9
ответ дан 18 December 2019 в 14:51
поделиться

I'd take a look at vtkMassProperties. This is a fairly robust algorithm for computing this, given a surface enclosing a volume.

1
ответ дан 18 December 2019 в 14:51
поделиться

Разложить ваш объект на набор тетраэдров вокруг выбранной внутренней точки. (Это твердое тело, использующее каждый треугольный элемент лица и выбранный центр.)

Вы должны быть в состоянии найти объем каждого элемента. Момент инерции также должен быть доступен.

Будет гораздо больше проблем, если поверхность не выпуклая.


Кажется, я не запомнил номенклатуру, а перекос не прилагательное я хотел. Я имею в виду нерегулярные.

1
ответ дан 18 December 2019 в 14:51
поделиться

If your polydedron is complicated, consider using Monte Carlo integration, which is often used for multidimensional integrals. You will need an enclosing hypercube, and you will need to be able to test whether a given point is inside or outside the polyhedron. And you will need to be patient, as Monte Carlo integration is slow.

Start as usual at Wikipedia, and then follow the external links pages for further reading.

(For those unfamiliar with Monte Carlo integration, here's how to compute a mass. Pick a point in the containing hypercube. Add to the point_total counter. Is it in the polyhedron? If yes, add to the point_internal counter. Do this lots (see the convergence and error bound estimates.) Then

mass_polyhedron/mass_hypercube \approx points_internal/points_total.

For a moment of inertia, you weight each count by the square of the distance of the point to the reference axis.

The tricky part is testing whether a point is inside or outside your polyhedron. I'm sure that there are computational geometry algorithms for that.

1
ответ дан 18 December 2019 в 14:51
поделиться
Другие вопросы по тегам:

Похожие вопросы: