How to measure displacement in MATLAB

Hi everyone,

First of all, I should say that I am not familiar with Rhino! And I do not know if I am asking this question in a right place or not. So, I am sorry for any inconvenient in advance.
I hope to get some information.

I know that it is possible to measure the “displacement” of a created form (or found form) for a gridshell in Rhino. I would like to know how this factor is calculated in Rhino. In fact, I am using MATLAB to optimize some given gridshell, and I need to add this factor, i.e., displacement, in my cost function.

Any information or guidance is highly appreciated in advance.

Why do you want to use MATLAB? Is this an assignment?

What do you mean by “gridshell”? Do you mean a mesh? Or do you mean a type of structure design? Or something else?

The Volume command in Rhino can determine the volume of a closed NURBS surface or a closed mesh.

First of all, thanks for your attention!

As I am not familiar with Rhino, but I am working with MATLAB for some years, so I prefer to work with MATLAB on this problem. Moreover, I want to use particle swarm optimization (PSO) technique for optimizing the gridshells. I should say that I have already implemented the algorithm and also some other desired cost functions in MATLAB, and now I want to consider the “displacement” as an additional object in the cost function to at least now let it be worse during the optimization. So, this is why I prefer MATLAB as I have everything ready there by now.

By “gridshell”, yeah I mean the mesh which is used for creating the desired structure. You may see more details [here].(https://en.wikipedia.org/wiki/Gridshell)

I know that Rhino is the best software for what I am seeking for! However, there are some problems. I have never worked with Rhino. I have no enough time to learn how to work with Rhino and then use it for my purpose. Even so, I am not sure that if it is possible to optimize a gridshell in Rhino considering some regularities’ objectives. I am not so familiar with Phyton and so if I want to go with Rhino, I will have difficulties in implementing PSO to use in Rhino and so forth.

About the given gridshell, you may assume that I have the mesh as two files F and V (can be excel files). F shows the faces in mesh and in fact is a matrix in which each row shows the number of vertices of a face in the grid (mesh). V shows the coordinates of vertices in mesh. In fact, each row of V shows the coordinates of a vertex (or node) in the mesh (or grid).

Thanks for your time in advance.