A kind of soft tissue deformation simulation method of the automated adaptive mesh refinement based on pliability
Technical field
The present invention relates to computer graphics techniques field more particularly to a kind of automated adaptive mesh refinements based on pliability
Soft tissue deformation simulation method.
Background technology
Soft tissue deformation computation model mainly has mass-spring modeling, finite element model and mesh free model.Lim et al.
(Lim Y.J, De S. Real time simulation of nonlinear tissue response in using
the point collocation-based method of finite spheres[J]. Computer Methods in
Applied Mechanics and Engineering.2007,196 (31):3011-3024)Using based on point without net
Lattice method establishes the deformation physics mould soft tissue deformation model of soft tissue, although this method is higher than finite element method computational efficiency,
Stability is poor.Li etc.(Yan-Dong L I, Zhu L, Xiu-Fen YE, et al. Modeling and
Simulation of Soft Tissue Deformation Based on Local Dynamic Model[J].
Computer Science, 2013, 40(10):283-288.)In conjunction with the characteristics of ALMSDM propose local updating with it is expected that
The strategy of vertex scheme vector is calculated, real-time increases, but in the case where deformation is larger, stability is insufficient.Application No. is
CN201110213387.5, the entitled soft tissue deformation simulation method coupled with mass spring based on mesh free gal the Liao Dynasty gold, should
Invention makes up Galerkin method and is not suitable for solving the defect of extensive problem, but be difficult to realize between multi-model without slot coupling.It is old
Defend east etc.(Chen Weidong, Chen Panpan, Zhu Qi light are ground based on the deformable modeling and force feedback algorithm for improving spring-mass model
Study carefully [J] biomedical engineering magazines, 2015 (5):989-996.)It is proposed on the basis of spring-mass model a kind of new
Variable diamond topology controlment realize the model by changing the length and spring constant, initial angle of diamond shape side spring
Deformation simulation to Different Organs, and compromised in computational accuracy and two aspect of real-time.
In conclusion the simulation of soft tissue deformation has consequence, emulation technology in virtual operation research
More and more concerns are obtained.Soft tissue deformation is simulated in order to true to nature in real time in virtual operation, in soft tissue
There is to be solved problem there are many more in terms of physical deformation model.
Traditional thinning method is to carry out global refinement with mesh refinement algorithm on original three-dimensional grid model, is made
Reach improve simulation accuracy requirement.However a traditional thinning method prodigious drawback when being mesh refinement data volume be in
Geometric progression is incremented by, it is difficult to meet the requirement of emulation real-time.
Invention content
Insufficient for the above-mentioned prior art, the present invention provides a kind of soft tissue of the automated adaptive mesh refinement based on pliability
Deformation emulating method is encrypted triangle gridding using mesh refinement method in operation on soft tissue's deformation region, improves deformation
The sense of reality of emulation, and then retain the lower triangle grid model of original precision in non-surgical, improve computational efficiency.
To achieve the above object, the technical scheme is that:A kind of automated adaptive mesh refinement based on pliability it is soft
Deformation emulating method is organized, is included the following steps:
Step S1:Detect the point of impingement between soft tissue model and external force using collision detection algorithm, according to stress point address with
Closest to the point of impingement particle as outer point of force application;
Step S2:The conductance range for calculating external force, determines the refinement regional extent of deformation grid;
Step S3:Soft tissue model is calculated in the pliability in the refinement region of deformation grid, mesh refinement is calculated according to pliability
Threshold value;
Step S4:The grid in refinement region is determined according to mesh refinement threshold value, if some patch grids in refinement region
The length of side then further refines the dough sheet more than mesh refinement threshold value;
Step S5:The dough sheet that need not be refined is designated as unleavened dough, it would be desirable to which the grid of refinement is designated as face living, using loop refinements
Method calculates the normal vector and three-dimensional coordinate of new summit and related old vertex, and vertex is carried out according to corresponding Topology connection rule
Connection, complete mesh refinement;
Step S6:Xenogenesis grid is set to carry out transition using crack elimination algorithm;
Step S7:Step S4-S6 is repeated, until grid is all met the requirements.
Further, the step S2 is specially:A threshold value is pre-set, when the stress of outer point of force application is less than the threshold
When value, it is assumed that active force will not be further continued for conducting toward next particle, and the boundary in refinement region is determined by the conductance range of power.
Further, the threshold value is set as 0.01N.
Further, the step S3 is specifically included:
Step S31:According to the acceleration difference and deformation region itself curvature between the adjacent particle of soft tissue model, calculates soft tissue and exist
The pliability in deformation mesh refinement region:
Adjacent particlei、jBetween acceleration difference be:
The curvature of deformation region is calculated with the normal difference of the tri patch where each vertex, adjacent particle i, j institute
It is in the normal difference of tri patch:
Wherein,, xiAnd xjThe coordinate of particle i and particle j are indicated respectively,a i Witha j Particle i and matter are indicated respectively
The acceleration of point j,aIndicate particle acceleration, n i And n j The normal of tri patch, n are indicated where indicating particle i and particle j respectively
Particle normal, pliability S calculate as follows:
Wherein,,,Indicate that the peak acceleration of particle is poor,Indicate the maximum extreme value of normal difference;
Step S32:Calculate the length of side max-thresholds of refinement region tri patch:
Wherein, SiAnd SjThe pliability of particle i and particle j are indicated respectively;
Step S33:The minimum length of side of tri patch is set。
Further,。
Further, the step S6 is specially:A new point is inserted on needing the Grid Edge that refines, with transition
Crack is generated at the adjacent side of grid;
Then the opposite vertexes of new point and adjacent transition grid on the side are connected, transitional trellis are made to be divided into two so that
The region refined and the region not being refined also, which are realized, smoothly to be connected.
Compared with prior art, the present invention has advantageous effect:
(1)The method of mesh refinement is applied in soft tissue organs model, it is thin in deformation region when soft tissue deforms upon
Change grid, the geometrical property of deformation region can not only be shown, moreover it is possible to which more true simulation is carried out to deformation process;
(2)Triangle gridding is encrypted using mesh refinement method in operation on soft tissue's deformation region, improves deformation emulating
The sense of reality.And then retain the lower triangle grid model of original precision in non-surgical, improve computational efficiency.
Description of the drawings
Fig. 1 is that a kind of flow of the soft tissue deformation simulation method of the automated adaptive mesh refinement based on pliability of the present invention is shown
It is intended to;
Fig. 2 is that particle 1- neighborhoods refine area schematic in the embodiment of the present invention;
Non- tessellated mesh schematic diagram when Fig. 3 (a) is avoiding cracks in the embodiment of the present invention;
Avoiding cracks schematic diagram after once being refined when Fig. 3 (b) is avoiding cracks in the embodiment of the present invention;
Avoiding cracks schematic diagram after secondary refinement when Fig. 3 (c) is avoiding cracks in the embodiment of the present invention;
Fig. 4 is that mesh adaption refines experimental model schematic diagram in the embodiment of the present invention;
Fig. 5 is that the grid overall situation refines experimental model schematic diagram in the embodiment of the present invention;
Fig. 6 is refined model tensile deformation design sketch of adaptive mesh in the embodiment of the present invention;
Fig. 7 is global refined model tensile deformation design sketch in the embodiment of the present invention;
Fig. 8 is the secondary refined model tensile deformation design sketch of adaptive mesh in the embodiment of the present invention.
Specific implementation mode
The present invention will be further described with reference to the accompanying drawings and embodiments.
As shown in Figure 1, a kind of soft tissue deformation simulation method of the automated adaptive mesh refinement based on pliability, including it is following
Step:
Step S1:Detect the point of impingement between soft tissue model and external force using collision detection algorithm, according to stress point address with
Closest to the point of impingement particle as outer point of force application;
Step S2:The conductance range for calculating external force, determines the refinement regional extent of deformation grid;
Step S3:Soft tissue model is calculated in the pliability in the refinement region of deformation grid, mesh refinement is calculated according to pliability
Threshold value;
Step S4:The grid in refinement region is determined according to mesh refinement threshold value, if some patch grids in refinement region
The length of side then further refines the dough sheet more than mesh refinement threshold value;
Step S5:The dough sheet that need not be refined is designated as unleavened dough, it would be desirable to which the grid of refinement is designated as face living, using loop refinements
Method calculates the normal vector and three-dimensional coordinate of new summit and related old vertex, and vertex is carried out according to corresponding Topology connection rule
Connection, complete mesh refinement;
Step S6:Xenogenesis grid is set to carry out transition using crack elimination algorithm;
Step S7:Step S4-S6 is repeated, until grid is all met the requirements.
When being operated to soft tissue, either with instrument lift or press, the surface contacted is all to concentrate
The region of stress and the larger place of deformation, therefore using the stress size of particle as the criterion of local refinement.In this implementation
In example, the step S2 is specially:A threshold value is pre-set, when the stress of outer point of force application is less than the threshold value, it is assumed that make
It will not firmly be further continued for conducting toward next particle, the boundary in refinement region is determined by the conductance range of power.
Threshold value is smaller, and the region of refinement is bigger.As illustrated in fig. 2, it is assumed that external force acts on the position of particle 0 in figure, particle 0
Displacement can to the particle of its 1- neighborhood generate pulling force, may then be transmitted to 2- neighborhoods, 3- neighborhoods etc., more outward transmit power more
It is small, it is just no longer calculated until being less than threshold value.
In the present embodiment, the threshold value is set as 0.01N.
If soft tissue particle movement situation in stress has defined, characterizes deformation most true to nature with " pliability " and imitate
Fruit, this pliability are again related with the fine degree of grid.Soft tissue stomach inner wall movement under force-pliability-grid is established with this
The relationship of fine degree.
By Newton's second lawUnderstand that object will produce acceleration, and acceleration and institute in movement under force
The power received is directly proportional, so characterizing the movement under force state of particle in grid with the acceleration of particle.The softness known to analysis
Degree is related with mesh motion, and the acceleration difference in grid between adjacent particle needs pliability.
In the present embodiment, the step S3 is specifically included:
Step S31:According to the acceleration difference and deformation region itself curvature between the adjacent particle of soft tissue model, calculates soft tissue and exist
The pliability in deformation mesh refinement region:
Adjacent particlei、jBetween acceleration difference be:
In addition to the acceleration difference of particle movement, the curvature of deformation region itself is also required to certain pliability, deformation region
Curvature is calculated with the normal difference of the tri patch where each vertex, the method for tri patch where adjacent particle i, j
Line difference is:
Wherein,, xiAnd xjThe coordinate of particle i and particle j are indicated respectively,a i Witha j Respectively indicate particle i and
The acceleration of particle j,aIndicate particle acceleration, n i And n j The normal of tri patch, n tables where indicating particle i and particle j respectively
Show that particle normal, pliability S calculate as follows:
Wherein,,,Indicate that the peak acceleration of particle is poor,Indicate the maximum extreme value of normal difference;It is the zone of influence in order to avoid one of factor is infinitely amplified that maximum value, which is arranged,
The calculating of domain pliability, preferably to control mesh refinement process;
Step S32:Since the bigger triangle gridding needs of pliability are finer, the length of side that grid gets over detailed rules and regulations triangle is smaller.So
The length of side threshold value of triangle gridding can be determined according to softness values computed above, calculate refinement region tri patch
Length of side max-thresholds:
Wherein, SiAnd SjThe pliability of particle i and particle j are indicated respectively;
Step S33:The minimum length of side of tri patch is set, only provide tri patch refinement maximal side not enough, be
Avoid refinement from too fine phenomenon occur, occur some while close to threshold value and some while very short tri patch, cause
Many small ropy triangles of area, influence simulation efficiency in region, and the quality to be refined to tri patch controls, institute
With the minimum length of side of setting。
In the present embodiment, it sets。
Since equalizing self-adapting refinement strategy may cause crack to migrate and refine excessive, lack of balance adaptive refinement strategy
After carrying out repeatedly different refinement, the refinement level of proximal surface changes, and eventually leads to the refinement level of proximal surface respectively not phase
With influence refinement quality in turn, therefore the present invention proposes a kind of improved crack elimination algorithm on the basis of both strategies,
Shown in its operating diagram such as Fig. 3 (a) Fig. 3 (b) Fig. 3 (c).With just on tessellated mesh side, adjacent non-tessellated mesh was referred to as
Cross grid.
In the present embodiment, the step S6 is specially:A new point is inserted on needing the Grid Edge that refines, with
Crack is generated at the adjacent side of transitional trellis;Then the opposite vertexes of new point and adjacent transition grid on the side are connected,
Transitional trellis is set to be divided into two so that the region refined and the region not being refined also are realized and smoothly connected.It is refining
The different region of level also makes the grid between different refinement levels realize good transition using identical method, makes model net
Lattice are more smooth, reach relatively good visual effect.
Specific experiment is in Intel (R) Core (TM) i7-5500U CPU 2.40GHz, 8G RAM, video card ATI
Radeon R9 M375, video memory are on the computer of 2G, the use of VS2010 are that exploitation is flat based on OpenGL increases income shape library
Platform, C++ realize for development language.In order to preferably be compared, two kinds of models are set in an experiment, and one is that particle number is
715 soft tissue model for mesh adaption refinement experiment, as shown in figure 4, one be the model overall situation refinement after model,
As shown in Figure 5.
The gross mass that model particle is arranged in experiment is 75, and the coefficient of elasticity of spring is 3, damped coefficient 0.5, time step
A length of 0.01, iterations are 10 times.The soft tissue model and the overall situation for controlling 715 particles of surgical instrument pair using mouse are thin
The model of change is stretched, and Tensile Test Results are as shown in figs 6-8.
Fig. 6 is that soft tissue model realizes the tensile deformation design sketch that once refines of adaptive mesh, by collision detection and
Stress point addressing obtain soft tissue on stress particle, centered on the particle calculate power transmission range, using the range as
The region of mesh refinement, and the side length of element threshold value according to calculating refines grid, to realize the adaptive net of soft tissue
The deformation simulation of lattice refinement, as can be seen from the figure deformation effects are truer.Fig. 7 is soft tissue overall situation refined model larger
Tensile deformation design sketch under force effect, deformation effects are also relatively truer.Fig. 8 be soft tissue model under larger force effect by
The grid of tensile deformation realizes the design sketch of secondary refinement, and as can be seen from the figure soft tissue produces larger deformation, still
Since mesh refinement improves the precision of deformation region grid, so the comparable deformation of model reached with overall situation refinement is imitated
Fruit.
The above are preferred embodiments of the present invention, all any changes made according to the technical solution of the present invention, and generated function is made
When with range without departing from technical solution of the present invention, all belong to the scope of protection of the present invention.