This month in rustsim #2 (November 2018)
Welcome to the second edition of This month in rustsim. This monthly newsletter will provide you with a summary of important update that occurred within the rustsim organization. This includes in particular updates about the nphysics, ncollide, nalgebra, and alga crates.
Join us on discord! Join us on our user forum!
Progress of current developments
Physics simulation of deformable bodies
The ongoing developments on the support of deformable bodies on nphysics continue steadily. Those developments are still happening on the deformable branch and not published to crates.io yet.
The newly implemented features are:
- Simulations based on the finite-element methods (FEM) are now more stable due to the implementation of stiffness warping.
- It is now possible to simulate plasticity with deformable bodies based on FEM. Plasticity is when an object suffers permanent deformations when it is subjected to a significant stress during a sufficiently long duration. See the first video bellow for a demo with and without plasticity.
- Everything we have shown so far now works in 2D as well! See the second video bellow. Those features will be available in the nphysics2d crate in the future.
Improvements on ncollide
In the deformable branch on ncollide, we are working on several design improvements for code-reuse and for collision detection accuracy (those are not published on crates.io yet):
- We are working on a brand-new collision-detection methods between two triangle meshes and two polygonal lines. Our goals is to be able to improve the handling of penetrations when a mesh (in 3D) or a polyline (in 2D) describe the boundary of a solid object.
- The trait for contact manifold generation has been improved to simplify code-reuse in the future. This will allow collision detection involving shapes like capsules and heightmaps to be implemented very easily and efficiently in the future.
- Deformable polygonal lines are now possible. Moreover, polygonal lines are now described with a buffer of vertices as well as a buffer of indices (instead of just vertices). This will allow the description of more complex shapes like the skeleton of trees with branches as well as closed loops. Before, only a simple continuous curve without loop was allowed.
Improvements on nalgebra
We have continued our work on sparse matrix computations. In the sparse branch, the following operations (with tests) have been implemented based on a compressed column layout:
- Multiplication and sum of two sparse matrices/vectors.
- Lower-triangular system resolution with a right-hand-side vector that can be either sparse or dense.
- Up-looking and left-looking Cholesky decompositions.
We are not using them in nphysics yet (for computations related to FEM) because the implemented Cholesky decompositions still require very large systems to be significantly more efficient than our dense Cholesky implementation. We will be working on a supernodal left-looking approach to improve those performance.
We have also significantly improved the documentation for geometric types (points, isometry, quaternions, etc.) by adding doc-comments to almost all methods. Take a look at this by browsing the documentation there! Those doc-tests will hopefully help understanding and discovering various features of nalgebra.
space!
Help wanted for the integration of a new crate:We are working on integrating the new space crate maintained by Geordon Worley to the rustsim organization. This crate aims to provide spacial data structures in pure-Rust and based on nalgebra. It is still at its infancy as it only supports octrees based on morton keys right now. We also intend to migrate (from ncollide to space) spacial-partitioning structures like the BVT and DBVT structures.
All this is transition is work-in progress and help would be very appreciated for improving the documentation and working on this migration. Interested contributors will find more information on that issue.
Thanks
We would like to thank the whole community and contributors. In particular:
- Thanks to jswrenn for his numerous contributions on nalgebra for converting a matrix to a
Vec
(nalgebra#481), adding matrix columns from aVec
(nalgebra#468), and adding swizzling to points (nalgebra#483). - Thanks to grtlr for adding a
.to_homogeneous()
methods to matrices to increase their dimension by 1 (see nalgebra#475). - 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!
Finally, thanks to all the current and new patrons supporting the lead developer of the current crates part of this organization on patreon!