Mass-Spring Systems on the GPU Joachim Georgii a,* , R¨ udiger Westermann a a Computer Graphics & Visualization Group, Technische Universit¨ at M¨ unchen 1 Abstract We present and analyze different implementations of mass-spring systems for inter- active simulation of deformable surfaces on graphics processing units (GPUs). For the amount of springs we target, numerical time integration of spring displacements needs to be accelerated and the transfer of displaced point positions for rendering must be avoided. To fulfill these requirements, we exploit features of recent graphics accelerators to simulate spring elongation and compression on the GPU, saving dis- placed point masses in graphics memory, and then sending these positions through the GPU again to render the deformed surface. Two different simulation algorithms implementing scattering and gathering operations on the GPU are compared with respect to performance and numerical accuracy. We discuss GPU specific issues to be considered in simulation techniques showing similar computation and memory access patterns to mass-spring systems. Key words: Physics-based simulation, GPU simulation, mass-spring systems 1 Introduction To study the motion of a mechanical system caused by external forces, physics- based simulation is needed. For a set of connected rigid or flexible parts ex- hibiting material dependent properties, the equations of motion can be formu- lated and solved to predict the dynamic behavior of such systems. Even for simple abstractions, however, calculations involved are usually too expensive as to allow for real-time simulation of reasonably sized objects. To visualize the system dynamics, the geometric representation of the system has to be modified according to the computed motion. In every simulation frame, geometry has to be updated, and the data structure used by the sim- ulation engine has to be converted into a suitable format for rendering. If * Corresponding author. Email addresses: georgii@in.tum.de (Joachim Georgii), westermann@in.tum.de (R¨ udiger Westermann). 1 http://wwwcg.in.tum.de Preprint submitted to Elsevier Science 14 July 2005