| Virtual surgery is an important application of virtual reality technology in the medical field.It is based on medical images and constructs human organ models through computer graphics.It is a surgical system that interacts with the haptic device,so that the operator can feel the dual immersion of vision and touch.This paper used the laboratory’s PHANToM Desktop haptic feedback device,combined with its own software development tool OpenHaptics,three-dimensional graphics standard OpenGL(Open Graphics Library)and C++ in mixed programming,to establish a soft tissue deformation,cutting simulation system in VS2013 that can realize tactile feedback,and the main system functional modules also be studied.Firstly,according to the biomechanical characteristics of human organs,the modeling principles of different deformation models were discussed and compared.The mass spring model was established as the systematic deformation model according to the need of establishing surface soft tissue.Establish the basic mass and spring class of the system.And construct the dynamic equations of the system and solve them in different numerical methods to evaluate each method.Secondly,the overall structure and hardware and software components of the virtual system based on haptic feedback were analyzed,and the system software modules were studied.The HLAPI library based on OpenHaptics and OpenGL were used to build the system visual and tactile rendering framework.In the collision detection module,based on the AABB bounding box,an AABB hierarchical bounding box tree with multi-layer structure was established and detected collision through three stages of intersection calculation,then the algorithm was verified by an example.The spring-damper force feedback algorithm in HLAPI was improved.According to the model deformation principle,derived the force calculation formula,which was influenced by the model deformation size,propagation depth and spring coefficient,and realized it through asynchronous callback method combined with HD API and HLAPI.Thirdly,the deformation simulation experiments of different models were established according to the existing software module algorithms and hardware conditions.Several different soft tissue geometric modeling methods were discussed.Deformation simulation of plane model was carried out,and real-time feedback force was put out.Based on the system FPS,the impact of different data scales and numerical solution methods on system performance was analyzed.The data interface for reading the OBJ format graphic file was established.Based on the illumination model in graphics,the vertex dynamic normal vector was calculated in real time and rendered by OpenGL to enhance the visual authenticity.And the deformation of the model was simulated in the end.Finally,a cutting simulation experiment based on triangular surface model was established.The process of virtual cutting was analyzed,and two methods of mesh deletion and mesh subdivision were used to simulate and compare the results.The mesh subdivision method was applied to the tactile feedback experiment of plane model to simulate the formation of cutting path,and the surface friction force during the cutting process was taken into account to improve the effect of force feedback and form a better tactile reality. |