| Virtual Reality(VR)technology is the art and science of creating a realistic virtual environment,and virtual surgery is the application of this technology in fields such as medicine and education.Virtual surgery not only compensates for the high cost and long duration of traditional surgical training,but also allows surgeons to develop more detailed surgical plans before surgery to avoid surgical risks.However,in real surgery,it is often necessary to rinse excess blood near the wound with water,otherwise it will affect the doctor’s surgical vision and increase the risk of surgical failure.At the same time,due to the complex composition of blood,there are many difficulties and problems in simulating the fusion of blood and water.Therefore,it is necessary to add a real blood water fusion model to the virtual surgery simulation system.In this regard,this article conducted research and analysis on the main blood simulation and fluid simulation technologies both domestically and internationally in recent years.It was found that although existing methods can simulate the phenomenon of blood water fusion to a certain extent,there are still problems with poor realism and real-time performance for virtual surgery.In response to the above problems,this article proposes the following two improvement measures:Firstly,this article adopts the popular smooth particle fluid dynamics algorithm to physically simulate the mixed fluid of blood and water.This algorithm first searches for the support domain of each particle,and then calculates the density,pressure,viscosity,and external forces of each particle one by one,ultimately obtaining the particle’s position.However,this algorithm may experience low computational efficiency and long time consumption when simulating blood water fusion.Therefore,this article uses the block partitioning based SPH method to accelerate simulation efficiency.This method can partition regions based on the initial spacing of particles,and then assign different time steps to each region block,and solve at different rates.The improved algorithm can minimize computational costs,improve computational speed,and ultimately achieve real-time simulation of blood water fusion while considering simulation accuracy.Secondly,this article adopts a widely used implicit surface triangular mesh construction method-the moving cube algorithm-for surface reconstruction of blood and water fusion.The algorithm first builds a small cube mesh according to the scalar field,then sets a threshold to find the cube that contacts the liquid surface,and finally calculates the position of the triangle patch vertex on the cube edge through the linear interpolation method,and then draws.In order to enable this method to quickly render a more realistic fusion effect of blood and water in virtual surgery,this paper uses particle kernel interpolation method to calculate the implicit surface of blood and water mixed liquid,and uses GPU accelerated traversal method to more efficiently reconstruct a smooth surface,thus achieving real-time and realistic rendering of blood and water fusion.Finally,this article conducts comparative experiments and summarizes and analyzes the above research.The experimental results show that the physical simulation method and surface reconstruction method used in this article can effectively simulate the phenomenon of blood water fusion in virtual surgery,with good stability,high realtime performance,and strong realism,which can enhance the realism and immersion of the virtual surgery system.In addition,this article presents research prospects for the simulation of future blood water fusion,and the improved model can be applied to a wider range of fields. |