I’m wondering about some mathematical deep secrets of Rhino.
Is Rhino performing direct Nurbs calculations when we use the AreaCentroid or VolumeCentroid commands, or is he making behind the scene a invisible mesh of the geometry ?
I dont see how he can calculate the Centroids without having a fine mesh with triangles to do the tricks (barycentre of the triangles and pressure integration).
I especially wondering this, because I am currently working on some Grasshopper tools to analyse the Hydrostatics of Ship Hulls. My interrogation is to know how Rhino calculates theses, and if he does the calculations directly on Nurbs like Maat Hydro (https://www.sistre-shipdesign-software.com/).
Rhino uses numerical integration over the surface (“double integration”) and an application of Stoke’s theorem which lets us calculate volumes and volume mass properties using surface integrals.
Hello @mat.venot
Just curious - are you implementing your own algorithm for calculation of hydro properties?
Please note, that in case if extensive range of drafts needs to be considered - Rhino SDK VolumeProperties methods are quite slow - exactly for the reason of precise Stoke’s method.
What I asked is more about what kind of geometry Rhino is based on to do the numerical integration itself ? Is he using nurbs geometry directly, or a discretization of this nurbs in several elements like mesh cells, flat elements ? Can we control the error of the numerical integration (for example by using Gauss points) ?
I am not implementing my own algorithm, sadly, but I would like to know at best how Rhino is doing the calculation, in order to optimize the computational time indeed, but also to reach maximum accuracy.
Hello Mathieu,
I’ve already made a script for stability analysis (Equilibrium, Gz curves with free surface and free trim, tanks calibration etc…) which give results really closed to Maat Hydro, however it still slower as Volume and Area on direct Breps are slow (sometimes more than 1s so in a loop of equilibrium in which you might have at least four times this analyse to do)…the fact is if you try to go on Mesh computation which is really faster, Rhino or GH often failed to Mesh a closed Breps into a closed Mesh, or have a closed section from a closed mesh which is needed for WPA calculation… i’ve tried to make a mixed of both, but a stronger BREP>MESH or faster solid boolean or volume computation would be needed, even with a control on accuracy.
Hello Bemad,
Nice to hear other people working on similar stuffs !
I’m aware about the differences between Mesh or Brep speed calculation indeed, but the interrogation was more focused on accuracy than speed first. Of course, I’m just computing simple Hydrostatics and no Stability yet, so it doesn’t impact so mesh on time to compute for now. But you’re right, it will become important if I push forward my scripts. However, if we could avoid to mesh a clean hull brep like Orca did, it could be more interesting. Maat Hydro is very impressing for that.