It is always important to plan how the simulation will be kept in a computer memory. For my purposes of simple simulation program I use two 'c style' structures which keeps informations about Point and Springs in a computer memory (see figure 2). Those structures keeps all needed informations about physics objects in the model.
All mesh points will be put into a one dimensional table:
CPoint2d myPoints[NUMP];where NUMP is a number of mesh points which will be created.
Also all springs will be put into a one dimensional table:
CSpring myPoints[NUMS];
where NUMS is equal to a number of springs ( ).