Welcome to the fourth edition of This month in rustsim. This monthly newsletter will provide you with a summary of important update that occurred within the rustsim community. This includes in particular updates about the nphysics, ncollide, nalgebra, and alga crate. This fourth edition will actually contain updates for the past two months since we unfortunately skipped the last edition because of the significant load of work that kept us busy for the huge release of nphysics 0.10.
Improvements on nphysics
The most significant work that happened in January was the preparation for the release of nphysics 0.10. You can see all the novelties brought by this release on the original announcement on Patreon. For example this release included:
- Support for deformable bodies (aka. soft-bodies).
- Builder patterns for constructing bodies and colliders.
- Support for capsules and heightfield colliders.
- Support for per-feature materials.
- Support for conveyor-belts simulation.
- And much more listed in the original announcement!
Improvements on nalgebra
At the end of January, we released the version 0.17 of nalgebra. This includes several incremental improvements you can find listed on its Changelog. We also started working on sparse matrices support, based on the Compressed Sparse Column storage scheme. So far our goal was to implement enough operations to be able to implement a sparse Cholesky decomposition. This includes:
- The definition of
CsVectoron the sparse module.
- Sums and products of two sparse matrices (and sparse vectors) as well as the product of a sparse matrix with a dense matrix.
- Resolution of linear systems
Ax = bwhere
Ais sparse-lower-triangular, and
bis either a sparse or dense vector.
- Up-looking and left-looking sparse Cholesky decomposition behind the
- Parsing of sparse matrix under the Matrix Market file format. The parser dose
not handle all variants of the format yet. It can be enabled with nalgebra's
iofeature which exposes the io module.
Sparse matrix support has to be enabled explicitly with the
sparse feature of nalgebra. It is still incomplete and not
polished yet, so it should not be considered ready for production use, and its API may change significantly in the future.
Improvements on nphysics
After the release of nphysics 0.10 we got a lot of feedbacks regarding our deformable bodies simulation. In particular, it was observed that under large deformations, our FEM-based models caused the application to crash. This was the expected behaviour by-design but it was clearly not satisfactory enough. Therefore, we developed a more robust approach for dealing with singularities that appear when deformable volumes are subject to large deformations. Our new results are that:
- If plasticity is not enabled, the app will no longer crash and the heavily deformed shape will try hard to recover its undeformed state in a visually appealing way.
- If plasticity is enabled, the app will no longer crash but you may get a permanent growth of volume under large deformations (which can be be very unrealistic). Getting rid of those growth of volume is a challenge we would like to address at some point in the future.
In any case, preventing the simulation from crashing will allow other more significant part of the simulation to continue to work properly. Thanks to Andlon for pointing us toward the right bibliography!
Improvements on nalgebra
One noteworthy addition to the latest nalgebra version, i.e., v0.17.2, is
the extraction of a 3D rotation matrix
Rotation3 (or of an
UnitQuaternion) from a raw 3x3 matrix
Matrix3. This also includes
the extraction of a 2D rotation matrix
Rotation2 (but not an
UnitComplex yet) from a raw 2x2 matrix
Matrix2. This is based
on the paper A Robust Method to Extract the Rotational Part of Deformations by Müller et al. See the
Afterward we started our work on the better support of complex numbers on nalgebra. We are working on the complex branch so this is not released yet. So far we managed to:
- Make all basic operations on complex matrices/vectors work properly wherever only real matrices/vectors were allowed before.
- Make the Cholesky, LU, and QR decompositions work with complex matrices.
We are in the process of making the other decompositions like Schur, Eigendecomposition and SVD work on complex number as well. Hopefully all this will be released at the end of March.
We would like to thank the whole community and contributors. In particular, thanks to the contributors from the past two months:
- Thanks to users reporting spelling mistakes on the documentation. This is always appreciated.
- Thanks to users joining us on our discord server to provide feedbacks, discuss features, and get assistance!
The list of contributors is automatically generated from past month's github commit history. Don't hesitate to let us know if your name should have been mentioned here. ↩