• No results found

Computational Efficiency of the Interactive Design Framework 117

CHAPTER 6 SIMULATION STUDIES AND PERFORMANCE EVALUATION

6.5   Computational Efficiency of the Interactive Design Framework 117

The interactive design framework consists of collision detection algorithm, B-spline surface patches merging algorithm, and mass spring system. In previous sections, these algorithms were independently implemented to determine the efficiency and accuracy of

these algorithms. In this section, these algorithms were combined and the overall computational time was determined. As discussed in Sections 3.3 and 5.2, the collision detection and mass spring system algorithm has two phases. In the pre-processing phase, blending matrices and their inverses are determined. At the same time the nodes for the mass spring system and the properties of the springs and dampers are determined, based on the material properties assigned to the virtual model. The computational cost of pre- processing phase does not affect the run-time computational time. During the run-time phase, the total computational cost includes the cost of collision detection, and cost of determining the deformation of the model using mass spring system.

6.5.1 Pre-processing phase

During the pre-processing phase the algorithm receives input of the control points, knot vector, type of surface (open or closed), maximum number of points to be generated on the B-spline surface at the lowest level of detail, the number of nodes for the mass spring system, and the material properties to be assigned to the model. If the knot vector is not given, it is calculated by the algorithm.

As discussed in Section 3.3, two blending matrices are generated for each B-spline surface. At the same time, the inverse of these blending matrices is calculated. The computation time for calculating these blending matrices is small. For a B-spline surface with a control point mesh of size 50×50 and having a maximum of 244×244 number of points that can be generated on the B-spline surface at the lowest level of detail, the computational time to calculate blending matrices and their inverses is 1.434 seconds.

The size of the blending matrix in u direction will be 50×244 and the size of the blending

matrix in v direction will be 244×50. This time reduces to 8 milliseconds for a B-spline

surface having a control point mesh of size 8×8 and 82×82 number of points that can be generated on the B-spline surface at the lowest level of detail.

The computation time to generate nodes for mass spring system depends upon the size of the mass spring mesh and the number of learning cycles used to generate VSOFM mesh. More cycles (up to 1000) are needed when the VSOFM models is required to generate the mass spring mesh from a very large cloud point set. In the algorithm

presented in this thesis, very small number of nodes is given for generation of mass spring nodes. Thus, fewer learning cycles (100) give very good results. In the present algorithm, 300 learning cycles were used. For a 12×12×12 mass spring mesh, it takes 3.471 seconds to generate the mass spring damper model. Table 6.7 shows the computational time for generation of mass spring mesh of different sizes. Even for 20×20×20 mass spring mesh the pre-processing time is less than half minute, which is very reasonable.

Table 6.7 Pre-processing time for generation of mass spring system for different node sizes.

Number of nodes Pre-Processing Time (seconds)

10×10×10 2.44 15×15×15 7.88 20×20×20 28.48 25×25×25 76.90 30×30×30 213.02 35×35×35 353.19 40×40×40 958.10

The computation time increase with increased size nodes for the mass spring system. Figure 6.16 shows the correlation between the size of the mass spring mesh being generated and the pre-processing time for calculating the mesh by using volumetric self organizing feature map.

Figure 6.16 Pre-processing time for calculating the mass spring mesh of different sizes.

6.5.2 Run-time phase

During the run-time phase the total computational time is sum total of the computation times for collision detection and force response system. Number of control points used to represent the B-spline surface and the maximum number of points to be generated on the B-spline surface determine the computational time for collision detection. At the same time, the number of nodes needed to represent mass-spring system mesh and the number of iterations performed to calculate deformation of the model determines the computational cost for the force response model.

The computational times for different algorithms were enumerated in Sections 6.2, 6.3, and 6.4 under different conditions. For implementing the interactive design framework B-spline surface was represented by a control point net of size 8×8. Maximum of 82×82 points can be generated on the B-spline surface at the lowest level of detail. Thus the B-spline surface can be represented at very good resolution with sufficient number of control points. The size of the nodes for the mass spring system was 12×12×12. The variables were assigned for a general case. However, these variables can be varied by the user as per his/her requirements.

Figure 6.17 (a) Deformable B-spline model (b) Points for collision detection (c) Mass spring mesh.

Figure 6.17(a) show a deformable tear drop B-spline model, the maximum number of points that can be generated at the lowest level of detail (Figure 6.17(b)), and the mass spring system for the model (Figure 6.17(c)). The thick red lines in Figure 6.17(c) show the boundaries of the hexahedron mass spring mesh. These boundaries were the edges of a cube and adapt to the shape of the B-spline model. The model was made to interact with different types of tools. These included point-based, implicit surface-based (sphere, plane), and deformable B-spline surface-based tools. The algorithm can generate frame rate in excess of 30 Hz.