On-line Precomputation Algorithm for Real-time Haptic Interaction with Non-linear Deformable Bodies Jiˇr´ı Filipoviˇc∗
Igor Peterl´ık†
ˇ Matyska‡ Ludek
Masaryk University Czech Republic
A BSTRACT Soft tissue modelling is important in the realm of haptic interactions. The main challenge in this research area is to combine two basic conditions which are essential—the stability of the haptic interaction running on high refresh rate on one hand and realistic behavior of the tissue assuming computationally expensive mathematical models on the other. In this paper, a distributed algorithm addressing this challenge is presented. The algorithm is based on the precomputationinterpolation scheme when the force feedback for the actual position of the haptic interaction point (HIP) is computed by a fast interpolation from precomputed data running inside the haptic loop. The standard precomputation-interpolation scheme is modified, however, so that the data needed for the interpolation are generated directly during the interaction. The distributed algorithm and the underlying architecture are presented together with a prototype implementation. Preliminary evaluation of the algorithm using non-linear models of a human liver having more than 1700 elements shows the feasibility of the proposed approach. 1 I NTRODUCTION AND R ELATED W ORK One of the promising areas of research is haptic rendering of deformable bodies which enables the user to interact with virtual objects that gets deformed according to applied forces. The main application of this research is represented by construction of surgical simulators which become an important technology utilized in the process of medical education and training. Due to the high sensitivity of human touch, loop of the haptic interaction requires very high refresh rates exceeding 1 kHz. This is the main issue of haptic rendering, since such a high frequency makes any expensive real-time computation of the haptic scene impossible. On the other hand, the behavior of the deformable objects is expected to be realistic, i. e. modeled according to the physical laws. The realistic behavior of soft tissues is based on the theory of elasticity which produces the governing equations describing the deformations under the applied forces or prescribed displacements. Considering the behavior of particular organs, the irregularity of the geometry together with the complexity of the governing equations lead to the inevitability of numerical solution. Moreover, it turns out that for realistic haptic modelling of deformable objects, non-linear should be utilized [1]. However, the numerical solution usually supplied by advanced methods as non-linear finite elements cannot be constructed within the haptic loop due to the computational complexity. ∗ e-mail:
[email protected]
† e-mail:
[email protected] ‡ e-mail:
[email protected]
There have been several attempts to address this issue such as simplification of the underlying models or employing some precomputations before the real interaction occurs. In [2], linearized model is used with precomputation of elementary displacements. Further, non-linear model is proposed with the drawback of decreased refresh rate in [3]. Linear model together with haptic interaction is described in [4] based on small area paradigm. The model with nonlinear geometry is described in [5] when techniques as mass lumping are applied but again only low-speed refresh rate is achieved. In [6] both geometrically and physically non-linear model is proposed, but no results about the speed of computations are given. Recently, in [7] a new approach based on precomputation is presented. During the precomputation coefficients of polynomials derived for St.Venant-Kirchhoff material law are calculated. Although this approach allows the interaction with complex body having non-linear geometry properties, it is applicable just for one material type and cannot be used for other material models. The main contribution of the paper is in introducing an algorithm enabling the haptic interaction with non-linear physically based models without a time-consuming precomputation phase. It can be regarded as a extension of the approach proposed in [8] based on approximation of the actual deformation from some regular data. The main difference here is that the data needed for the interpolation are generated directly during the interaction by distributed computational resources. The paper is organized as follows. First, the mathematical model of deformations is briefly presented together with the two-level iterative solution method in section two. The third section represents the essential part of the paper providing the description of the online precomputations algorithm on both the abstract and detailed levels. The fourth section briefly presents the prototype implementation and computations together with the description of the model used in the experiments. The evaluation section demonstrates feasibility of the proposed algorithm showing preliminary results achieved with the prototype implementation. Finally, the paper is concluded and future directions are sketched. 2 M ATHEMATICAL BACKGROUND In this section, the mathematical model used for the deformation modelling is briefly presented together with the short description of the numerical solution based on a combination of incremental staging and Newton method. 2.1 Mathematical model and Solution Methods In this section, a summary of the underlying mathematical model is presented. The corresponding formulations can be found in [9]. As the realistic behavior of the model is the main goal of the design, the model is completely based on the theory of elasticity where the relation between the applied forces and deformation of the body is derived. The full non-linear Green strain tensor is used as the measure of the strain allowing the large deformations. The formulation is further based on static equilibrium between external forces and internal stresses. The central part of the mathematical formulation is
the definition of constitution law which determines the behavior of the material coupling the stress and strain tensors. In this paper, hyperelastic materials are considered for which stored energy function exists. Two distinct definition of the stored energy function are utilized, known as StVenant-Kirchhoff and Mooney-Rivlin material laws. Additionally, for Mooney-Rivlin material the incompressibility condition are imposed. Besides the physical model, the boundary conditions are necessary for finding the static solution of the system. The model is first fixed in the space by homogeneous Dirichlet conditions. As the domain of the deformable body is usually complex and irregular, there is no analytical solution for the governing equation of the model and numerical methods must be applied. Perhaps the most known and widely used method is the finite element method (FEM) which discretizes the domain into a 3D mesh which is given by a set of nodes and elements. The method reformulates the governing equations over the regular subdomains of each element. Detailed description of the method is beyond the scope of this paper (see [9] for general FEM and [10] for the application in soft tissues). It is sufficient to say that in the case of static nonlinear model with N nodes, the utilization of the FEM results in a system of non-linear algebraic equations A(u) = b
(1)
where A is N ×N stiffness matrix, b is a vector representing applied loads in nodes, and the vector u now contains the displacement of each node. In this paper, following scenario is considered. As the displacement-driven interaction is considered, the “input” to the solution method is represented by a displacement prescribed for a particular surface node which is denoted as active throughout the text. This can be treated as non-homogeneous Dirichlet condition which can be imposed by multiple techniques as penalization, elimination and Lagrange-multipliers. As the force acting at the displaced node is of interest (as the output of the method delivered to the haptic device), the Lagrange multipliers are utilized leading to the augmented version of Eq. 1 described in [8]. Further, in order to solve the augmented system, incremental staging together with Newton iterative method is utilized for computations of static equilibrium paths. Suppose that the system is actually in a state C1 corresponding to the position x1 of the active node. The state C1 contains the reacting force f1 and the overall deformation vector u1 . Now, the active node is moved to a new position x2 . In this case, the trajectory x1 → x2 is divided into n steps x1 = x0 → x1 → . . . → xn = x2 (2) and the corresponding configurations Ci are constructed resulting in a static equilibrium path. On the local level, the state Ci+1 is computed from the state Ci by a Newton method, when the displacement vector ui and force vector fi are taken as the initial estimations for the solution of the system 1 with the prescribed displacement of the active node set to xi+1 . The method described above can be regarded as a two-level technique when the convergence of the correcting Newton method is improved by the incremental loading. 3 O N - LINE C OMPUTATION A LGORITHM In this section, the real-time algorithm for on-line precomputations is presented. First, the motivation for the proposal is given and then, the principle and detailed description are shown, respectively. 3.1 Motivation for the On-line Precomputations In the following text, a single point displacement-driven interaction is considered when the HIP is fixed to one surface node (the active node as introduced in section 2.1) of the FE mesh. As the point
gets displaced from its rest position, the body gets deformed and the corresponding reaction force is delivered to the haptic device. The main idea of the precomputation-interpolation scheme introduced in [8] is that the reaction force and deformation for the actual displacement of the active node are calculated by a fast interpolation method from precomputed data. The scheme consists of two separated phases: during the off-line phase, a large set of static deformations is computed according to the space-division scheme when an active node is displaced to a set of positions organized in 3D regular grid and the corresponding forces and deformations are computed and stored for each a point of the 3D grid. Then, the interaction phase takes place. Here, in each step of the haptic loop, the actual position of HIP is identified with respect to the 3D grid by selecting the adjacent points of the grid and both forces and deformations are computed by the interpolation of the data stored in those points. As the expensive iterative calculations are done in the off-line phase, the calculations needed for the interpolation can be run in the haptic loop running on a high frequency and the interaction is stable and can be performed on single PC with haptic device attached to it. On the other hand, it is not clear in advance which deformations will be really needed during the interpolation phase, as this is determined by the motion of HIP by the user and so the entire state space must be precomputed to cover all configurations potentially needed in the future. Further, there are multiple parameters affecting directly the behavior of the deformable body. The first set of the parameters is connected to the material model, e. g. the type of the material and material coefficients or external forces applied on the model. The second set is related to geometrical model and user’s choice during the interaction. First, it is the selection of the fixed nodes (which can be given or specified by the user) and second, it is the selection of the active node. Both are important factors determining the behavior of the model. It is clear, that if an interaction with model defined with some combination of the parameters is of interest, the entire state-space must be constructed for each combination of parameters which is to be used during the interaction. Eg. the size of the dimensions of the parameter space represented by the selection of N fixed states on the surface of the body is 2N . Further, another dimension is given by the selection of the active node and finally, the last three dimensions are introduced by the position within the 3D grid. Addressing the issues described above, a novel approach based on on-line precomputations is presented in this paper. In summary, the precomputation phase is performed directly during the interaction, so that only data needed for the approximation of the deformations for the actual position of the HIP are calculated and immediately used for the interpolation. This means that we perform the on-line computations of the configurations, which are going to be needed for the interpolation of the force and deformation vector for the probe positions in the on-coming moments. In the following, there are three main conditions which must be fulfilled for this approach to be feasible. • The computational resources must give enough performance to compute the deformations on-line. • The speed of motion of the haptic device must be slow enough, so it does not run off the space which has been already precomputed. • The physical models of the deformations must be stable enough, so the numerical methods converges in small number of iterations as this numerical stability of the model determines the haptic stability of the interaction. Before presenting the principle of the algorithm and distributed architecture designed to address the conditions given above, advantages and disadvantages of the approach are briefly sketched.
Figure 1: Four snapshots of the on-line precomputations. The trajectory of the HIP is visualized by thick black curve, the actual vicinity around the HIP is depicted by gray circle and states are denoted as follows: full circles show the states computed before and actually used for the interpolation, empty circles show the states computed before and currently unused (cached) and stars show states being actually computed to be potentially used after cell switching.
There are two main advantages of this approach. First, as the deformations needed for the interpolations are computed according to the actual position and motion of HIP, construction of the entire state-space is not needed anymore. Further, any parameter can be now changed on-the-fly during the interaction, since this change is directly reflected in the FEM model of the body. Obviously, this change can be done only by the time when no interaction between the HIP and the body occurs, as all the data must be computed “from scratch” as the states computed previously using the parameters before the modification are not valid anymore and can be used neither in the non-linear solving process nor in the interpolation process. The main disadvantage of the on-line computations is that the interaction may become unphysical, if the data needed for the interpolation are not available yet. 3.2 Overview of the Algorithm In this section, we provide a description of the algorithm based on on-line precomputations. First, the main components and their functionality is described. The algorithm is based on the state-division scheme when the space of the deformable body is discretized into disjoint cells by a 3D regular grid. It is assumed that the active node which is to be displaced by the HIP coincides with the central point of the 3D grid. The main idea of the algorithm is that for any position of the active node inside a cell, the corresponding force and overall deformation is computed by the trilinear interpolation of states stored in the eight corners of the cell. The interpolation is computed from the same data as long as the active node stays in the same cell. If the cell is switched, from four to seven new points are utilized for interpolation in the new cell. The component responsible for the interpolation is called force interpolator in the following text. The main challenge to be solved here is to supply the force interpolator with data which are necessary for interpolation of the current position. The computations are run by a set of components called solvers which compute the deformations using the numerical methods introduced in the section 2.1. Finally, there is the third main component is called scheduler which schedules the precomputations among the solvers so that the data are ready in case they are needed by the force interpolator. A simple version of scheduler is presented here. The principle of scheduling as shown in the Fig. 1 is based on a cloud of states computed for the actual position of the HIP. The cloud considered in this paper is represented by a sphere with radius R which is the main parameter of the scheduler and can be adjusted. The simple scheduling then works as follows: • The first step of the definition concerns the case when HIP gets attached to an arbitrary surface node which becomes active. In this moment, an initial cloud of states is identified
and then for each grid point, the computation of corresponding state is scheduled. This precomputation can be performed immediately after the parameters of the interaction are fixed, i.e. after the fixed nodes as well as the active node have been selected. This step is depicted by the leftmost part of Fig. 1. • Being in an arbitrary cell, the position of HIP is tracked by scheduler, the cloud is identified and the deformations are started to be computed for those grid points where the states have not been computed so far. Now, the semantics of the algorithm is fully given by the functionality of the three components running simultaneously and it allows a stable interaction supplied by the force interpolator component in case the three conditions from the previous chapters are fulfilled. If some of the condition is not valid (the HIP moves too fast and the states are not supplied on time), the HIP can get to an undefined area where the state cannot be approximated as the data are not available. In that case, the zero forces are assumed for states in undefined area and the user is notified about the unphysical behavior of the modeled tissue. In the next section, the algorithm is described in more detail with special focus on the parallelization and communication aspect. 3.3
Distributed Algorithm in Details
In this section, the full version of the distributed algorithm is presented in details with a view to the underlying architecture. The three components introduced in the previous section are divided into two sides—client and server side. On the client side, besides the force interpolator, the shape interpolator is introduced being responsible for interpolation of the actual shape of the deformation. The two components are closely associated with haptic driver and renderer, respectively. The haptic driver handles the haptic device running at about 1 kHz. It provides the actual position of HIP which is needed by both interpolators and the scheduler and it delivers the force feedback computed by the haptic interpolator to the device. If the HIP interacts with the deformable object, the force is computed by force interpolator which must be efficient enough to achieve the desired haptics refresh ratio to keep pace with the haptic rendering. Therefore, force interpolator runs also on the same frequency. The visual rendering component displays the scene on the screen, including the actual deformation, HIP position and some additional information, such as active node selection or localization of the nodes fixing the body. Both visual renderer and shape interpolator can be computationally expensive but they require lower refresh rate. The components are handled by threads in the following manner. Both the haptic driver and the force interpolator are provided by a haptic thread which must run at about 1 kHz according to the requirements mentioned above. Shape
interpolator and renderer run on lower frequency about 30 Hz sufficient for visualization purposes. Finally, the scheduler runs in a separate thread at about 100 Hz. On the server side, N independent server processes are running concurrently. Each of them consists of two components—solver introduced in the previous section and communicator. The communicator can respond to the notifications or provide data (as presented bellow) whereas the solver thread is fully loaded by the deformation computations. The two components on each server are handled by separate thread. The schema of the components, threads and their interconnections is presented by Fig. 2. The threads represent the first (local) level of the parallelization of the algorithm. The threads running within client or one server can communicate via shared memory using mutual exclusion locks. The second (global) level of parallelization is given by the division of components between N servers and client which are running on remote nodes interconnected by a network. The communication on in this level is provided by message-passing. On this communication level there are two main types of messages. First, the state messages contain the state represented by the displacement and force vector (supplied by additional Lagrange multipliers). Second, notification messages are needed for the overall functionality of the architecture. As the state messages are quite large, lazy state sending is employed, i. e. the state message is sent only if it is explicitly required by one of the participants. This happens in two cases: • The HIP gets close to the boundary of the actual cell which is going to be switched in on-coming moments. This implies that new data will be required and so the interpolator sends explicit notification message to the communicator thread of the server where the state was computed and the state is delivered by a state message to the interpolator immediately. This communication must be performed sufficiently before the cell switching takes place to overcome the network latency. • A server SA begins a computation of a deformation starting from a non-zero initial state that was computed by a server SB . In this case, SA sends explicit request message to the server SB and the state is then delivered to SA . Further, notification messages are sent in two other cases. First, after the scheduler chooses some server to computed a state, it sends a notifications to it specifying which state is to be computed and which server is the owner of the initial state needed for that computation. Vice versa, the server sends notification message to the scheduler after the state has been computed. According to these messages, the scheduler maintains the global information saying which states are computed by which servers. Moreover, the states which are computed are stored in a cache memories as follows. Each server stores locally each computed state, so it can be used in the future either for sending to interpolator or to some other server if required or can be utilized by the server itself if needed in future computations. Similarly, the states which are delivered to the client side after being requested by the interpolator, are cached as well so they are re-used in the future depending on the motion of HIP. 4 I MPLEMENTATION AND C OMPUTATIONS In this section, a prototype implementation of the algorithm introduced above is presented and the model used for testing is given together with basic information about the testing environment. The haptic interface was implemented in the prototype application using SensAble Phantom Premium connected to PC with 2× Intel Quad Core Xeon E5335. The stability of the interaction was experimentally verified. No instabilities were detected even in the case when HIP got out of the precomputed cloud of the data, because outside the cloud the force is smoothly interpolated to zero.
Figure 2: Scheme of the algorithm components (solid-outlined boxes) grouped in threads (dashed-outlined boxes) on local level and client and servers on global level.
Since the main goal of the implementation was to show if the states are precomputed on time to achieve a sufficient speed of motion of the simulated HIP, we simulated Phantom motion to analyze some worst-case behavior, e.g. the linear motion along a straight line (see section 5.1 concerning the methodology of evaluation). Concerning the solver, the finite element assembly procedure was implemented by GetFEM library [13]. Two materials were used—StVenant-Kirchhoff and Mooney-Rivlin introduced in the mathematical section 2.1. The Young modulus of the tissue was set to E=15465 kPa and Poisson’s ratio to ν = 0.49 as reported in [11]. The prescribed displacement (zero for the fixed nodes and nonzero for the active node) were implemented by Lagrange multipliers. In case of Mooney-Rivlin material, the incompressibility constraints were imposed using the multipliers as well. The solution was performed by the two-level iteration technique (incremental staging as outer iteration process and Newton method as inner iteration process) as shown in section 2.1. The Newton method was equipped with line search to improve the convergence. In each iteration of the Newton method, the system of linearized algebraic equations was solved by MUMPS linear solver [14]. The threads and communication among them were implemented by standard POSIX pthreads library. The global communication among the servers, scheduler and interpolator was provided by MPI, more precisely MPICH implementation with P4 communicator (sockets). For the computations, a model of human liver with length about 25 cm was used. The geometrical description of the surface obtained from the INRIA repositories was meshed by TetGEN meshing tool resulting in 1777 elements with 501 nodes (see Fig. 3). In case of StVenant-Kirchhoff material, the assembly procedure resulted in system with 1539 equations, in case of Mooney-Rivlin material, there were 2040 equation including the incompressibility conditions. Linear tetrahedral elements were used having four control points. The volume integrals in the assembly process were computed by Gauss quadrature of third order with 5 points. Maximal magnitude of the deformations was about 40 % of the body length, i. e. the active point was displaced by 10 cm at most. Both the client and server applications were run on a cluster with 34 nodes, each having 2× Dual Core Xeon 5160 3 GHz, 4 MB cache, 4 GB of RAM and connected by GigaEthernet network. The nodes of the cluster were running in virtual mode using Xen.
Figure 3: Model of human liver used in experiments.
5 E VALUATION AND R ESULTS 5.1 Methodology of Evaluation In this section a methodology of the experiments with the prototype implementation are presented. The evaluation of the experiments copes with conditions from the section 3.1. Let’s first identify the factors which are to be studied when evaluating the algorithm. The first factor which plays a crucial role is how fast the deformations are computed by the server side. In the two-level-parallelism architecture being considered in this paper, the transition C1 → C2 needed for the computation of a new state required by the scheduler is calculated sequentially by one solver thread. Let’s us assume that there is enough servers to compute all the states simultaneously, i. e. the scheduler never sends a work to a server which is not free in that moment (this assumption will be addressed bellow). In that case, the time needed for the computation of the new state establishes the upper bound on the speed of the computations. This factor is given by two quantities fully determined by the mathematical model and FE mesh. The first, which is constant for the given mesh and material, is the total time needed for assembling and solving the linearized system in each Newton iteration. The second quantity which can vary over the space of deformations for the given mesh and material is the total number of the Newton iterations needed to attain the desired residual. Therefore, in the result section, the data showing the convergence properties for the particular mesh and material models are presented together with the times needed for the assembling and solving the linearized system. Another factor affecting the algorithm is represented by the size of the cloud being utilized by the scheduler. Since the spherical cloud is assumed, its size is given by its radius. Since the assumption about the distribution of the work among the free servers formulated above must hold, the number of servers must be equal or larger than the size of the cloud for a given radius. For this reason, the result section presents the relation between the size of the cloud and the number of processors. Finally, the last but extremely important factor which is evaluated is the speed of HIP motion. Clearly, the goal of the algorithm is to maximize the speed of this motion in any direction. Initially, the worst case concerning the direction of the motion when the speed directly depends on the speed of computations should be identified. First, let’s assume, that a computation of a new state S is started in time t0 . Let’s denote t1 the time when S is requested by the interpolator since HIP has already entered the cell having S as one of its corners. Further, let l denotes the length of the trajectory which was covered by the HIP between t0 and t1 . In the worst case, the difference t1 − t0 should be minimized for arbitrary speed. Obviously, this is true when the length l is minimal, i. e. the HIP moves along a straight line. Moreover, a small study shows that in this case the motion of HIP is limited by the speed of the motion of the cloud, i. e. how fast a new states join the set of computed states. However, this is again limited by the length of calculation of a single deformation as shown above. Putting it together, after leaving the initial cloud,
the HIP moving along a straight line is limited by the speed, how a new deformations are constructed in the direction of the HIP motion. It should be noted, that in case of irregular (random) motion of HIP, that as far as the HIP stays in the cloud computed before, it can move freely with no restriction on the speed. Since natural motion of the HIP handled by a human hand can be described by smooth curves, it is important to use larger clouds allowing better behavior for the random motion. In the result section, the maximal speed of HIP moving along the straight line is recorded for the mesh and FE models used in the experiments. The speed after leaving the initial cloud is considered, so the size of the initial cloud cannot artificially improve the results. 5.2 Results and Discussion First, the convergence results are briefly presented for both materials. The Tab. 1 shows the length of assembly and solution procedures for both materials. Second, during the large convergence evaluation when more than 100,000 deformation were computed in off-line experiments generating large deformations (10 cm in each direction) for two distinct sets of fixed nodes and various selections of the active node, the limitation of the mesh in combination with the particular materials was studied. The convergence problems were identified by occurrence of failure points where the convergence was not achieved anymore. The failure points can be therefore regarded as “boundaries” determining the parts of state space where the deformations can be safely computed for any position of HIP. The more detailed study of the failure points is beMaterial
StVenant
Mooney
Assembly time [s] Solution time [s] Line Search time [s]
0.21 0.03 0.05
0.51 0.11 0.14
Occurrence of failure points [%]
19.7
1.4
2.4 10
4.2 14
Average number of iters. Maximal number of iters.
Table 1: Quantities characterizing the deformation computations.
yond the scope of this paper and so we only mention that MooneyRivlin material shows better behavior that StVenant-Kirchhoff and so it allows bigger amount of configurations to be computed with larger magnitude of the deformation. For both materials, the average number of Newton iterations needed for achieving the convergence was measured as well and the results are also reported in Tab. 1. From this point of view, both materials can be used for the experiments, provided the HIP will be travelling in those parts of the state space where the convergence in guaranteed. Second, the relation between the number of server processes needed for various sizes of the cloud; the results are presented in Tab. 2. The important Cloud size [cm]
2.0
2.5
3.0
3.5
#processes needed for StVenant #processes needed for Mooney
15 15
31 35
37 44
57 56
Table 2: The relation between the size of the cloud and number of solver processes needed for each material to keep the maximal speed.
point here is that the table shows the number of processes which are needed to deliver the computations on time according to the assumption from the section 3.1. However, as the HIP moves, the number of processes actually computing the deformations varies. For the case when the StVenant-Kirchhoff material is used with the
6
C ONCLUSIONS
AND
F UTURE W ORK
In this paper, a distributed algorithm based on on-line precomputations has been presented. It overcomes the gap between the high refresh rate of the haptic loop and computationally demanding calculations needed for realistic non-linear deformation modelling. The main advantage of the algorithm is that no time consuming offline precomputation phase is need anymore, as the deformations are constructed on-line during the interaction. The distributed algorithm was described and evaluated showing its performance and limitations. For this purpose, a prototype implementation was developed and tested on a non-linear model of human liver containing more than 1700 elements. During the experiments, the main limitation of the algorithm was identified as the speed of computation of a single deformation which directly determines the maximal allowed speed of the HIP. Moreover, if the HIP moves along a straight line, the speed cannot be improved by employing more computational resources. Thus, the future work will be mainly focused on addressing this issue. First, a new level of parallelization will be added to speed up the computation of a single deformation and some more advanced scheduling strategies will be studied, e. g.employing motion prediction or prioritizing and preempting the computations of states. Further, since our approach enables us to change parameters of the model directly during the haptic interaction, we plan to focus on
# processes
radius 2.5 cm, the history of computational load is depicted by the graph 4 illustrating 40 seconds of the computations. The computations started in time t = 0, whereas the HIP was moving linearly approximately between 15th and 33rd second. During the first seven seconds of the computations, the initial cloud was computed using the maximal number of CPUs available. Nevertheless, the user does not need to wait until all the configurations in the cloud are available; only adjacent configurations around the initial position are necessary for initial interaction. After the motion of HIP started, new states were scheduled for computations. During the motion, the load was varying periodically according to the motion of the cloud. Finally, the maximal speed of HIP achieved for the linear motion along a straight line are presented. In case of the MooneyRivlin material, maximal speed of 3.28 mm/s was experimentally achieved. In case of StVenant-Kirchhoff material the maximal speed was 5.25 mm/s. The better result for the StVenant-Kirchhoff material is obviously given by the shorter time needed for the computation of a single deformation as shown in the Tab. 1. However, as explained in the section 5.1, the linear motion is the worst case, so for an irregular motion (which is cycling or moving around) much higher speeds can be achieved, as the states are already computed according to the cloud-based scheduling. In the following, the speeds worst-case maximal speeds are analyzed. In [12], the two speeds are used for analysis of the haptic perception of forces. Namely, the slow speed was defined as 14 mm/s and fast speed was defined as 28 mm/s. When comparing to the speeds achieved in our simulations, the HIP motion for the more complicated material is still 9× slower if fast speed is considered. There are at least two solutions how to overcome this gap. First, during the real haptic interaction, the user can first slowly travel with HIP, letting the algorithm to do the computation of the part of state space being visited. Then, after the sufficient number of states is computed, the speed of the motion is no more limited by the algorithm. The other possibility that is now being studied, is to introduce another parallelization level. In this case, the computation of a single deformation would be parallelized using 4 or 8 cores on computational nodes utilized for experiments. Since the assembly process which requires the highest load is embarrassingly parallel, the speed-up should be sufficient to increase the speed of computations significantly.
30 20 10 0 0
5
10
15
20
25
30
35
40
time [s]
Figure 4: Number of solver processes used during a linear motion of HIP for StVenant-Kirchhoff material with cloud of size 2.5 cm.
topological changes such as cutting and tearing, and more complex interaction with the tissue (e.g. multiple point interaction or contact modelling). ACKNOWLEDGEMENTS The research has been supported by research intent “Integrated Approach to Education of PhD Students in the Area of Parallel and Distributed Systems” (No. 102/05/H050). The access to the METACentrum computing facilities provided under the research intent MSM6383917201 is acknowledged. R EFERENCES [1] S.Misra, A.Okamura and K.T.Ramesh. Force Feedback is Noticeably Different for Linear versus Nonlinear Elastic Tissue Models In proc.Second Joint EuroHaptics Conference and Symposium on Haptic Interfaces, 2007,519–524. [2] S.Cotin, H.Delingette and N.Ayache. Real-time elastic deformations of soft tissues for surgery simulation. IEEE Trans.On Visual.and Comp.Graph., 5(1):62–73, 1999. [3] G.Picinbono, H.Delingette and N.Ayache. Non-linear and anisotropic elastic soft tissue models for medical simulation. In IEEE Int. Conf. Robotics and Automation 2001 [4] D.C.Popescu and M.Compton. A model for efficient and accurate interaction with elastic objects in haptic virtual environments. In GRAPHITE’03: Proc.of the 1st int.conf. on Computer graphics and interactive techniques 2003,245–250. [5] Y.Zhuang and J.Canny. Real-time simulation of physically realistic global deformation. In IEEE Vis’99, 1999. [6] X.Wu, M.S.Downes, T.Goktekin and F.Tendick. Adaptive nonlinear finite elements for deformable body simulation using dynamic progressive meshes. In EG 2001 Proceedings, [7] J.Barbiˇc and D.L.James. Real-Time Subspace Integration of St.VenantKirchhoff Deformable Models. In ACM Transactions on Graphics (ACM SIGGRAPH 2005), 2005, 24(3):982–990. [8] I.Peterl´ık and L.Matyska. An Algorithm of State-Space Precomputation Allowing Non-linear Haptic Deformation Modelling Using Finite Element Method. In Proceedings of the Second Joint EuroHaptics Conference and Symposium on Haptic Interfaces, 2007,231–236 [9] J.T.Oden. Finite Elements of Nonlinear Continua, McGraw Hill, 1972 [10] M.Bro-Nielsen. Finite element modeling in surgery simulation Proceedings of the IEEE 1998, 86(3):490–503. [11] E.Samur, M.Sedef, C.Basdogan, L.Avtan and O.Duzgun. Robotic Indenter for Minimally Invasive Measurement and Characterization of Soft Tissue Behavior In Medical Image Analysis 2007, 11(4):361–373. [12] X.-D.Yang, W.F.Bischof and P.Boulanger. The Effects of Hand Motion on Haptic Perception of Force Direction. In Lecture Notes in Computer Science, 5024/2008, 2008. [13] J.Pommier and Y. Renard. Getfem++, an open source generic C++ library for FEM, http://www-gmm.insa-toulouse.fr/getfem. [14] P. R. Amestoy, I. S. Duff and J.-Y. L’Excellent. Multifrontal parallel distributed symmetric and unsymmetric solvers. In Comput. Methods in Appl. Mech. Eng., 184, 501-520 (2000).