Real-Time Knot Tying Simulation
Total Page:16
File Type:pdf, Size:1020Kb
Real-Time Knot Tying Simulation Joel Brown(1) Jean-Claude Latombe(1) Kevin Montgomery(2) (1) Computer Science Department (2) Department of Surgery Stanford University, Stanford, CA 94305 Abstract While rope is arguably a simpler system to simulate than cloth, the real-time simulation of rope, and knot tying in particular, raise unique and difficult issues in contact detection and management. Some practical knots can only be achieved by complicated cross- ings of the rope, yielding multiple simultaneous contacts, especially when the rope is pulled tight. This paper describes a simulator allowing a user to grasp and smoothly manipulate a virtual rope and to tie arbitrary knots, including knots around other objects, in real-time. One component of the simulator precisely detects self- collisions in the rope, as well as collisions with other objects. An- other component manages collisions to prevent penetration, while Figure 1: Forceps pull a suture which (a) Pulls a vessel down, making the rope slide with some friction along itself and other ob- (b) Pulls two vessels together jects, so that knots can be pulled tight in believable manner. An additional module uses recent results from knot theory to identify which topological knots have been tied, also in real-time. This work was motivated by surgical suturing, but simulation in other domains, such as sailing and rock climbing, could benefit from it. CR Categories: I.3.7 [Computer Graphics]: Three-Dimensional Graphics and Realism—Animation; I.3.5 [Computer Graphics]: Computational Geometry and Object Modeling—Physically Based Modeling; Keywords: rope simulation, knot tying, knot identification, self- collision detection, collision management, friction modeling, surgi- cal suturing Figure 2: Two practical knots: (a) bowline (b) prusik knot 1 Introduction Today there is growing interest in real-time surgical simulation, es- Other possible applications of knot-tying simulation include pecially as a tool for training surgeons [Dawson 2002]. Recent re- learning to tie knots for sailing and rock-climbing. Many books de- search has focused on creating efficient computational models of scribe knots used in these domains [Graydon 1992; Pawson 1998]. visco-elastic tissue structures [Delingette 1998]. But surgical simu- A system is presented in [Phillips et al. 2002] where a rope in a lation involves many aspects other than tissue deformation. In par- loosely knotted configuration is pulled tight, and the knot is pre- ticular, a key component of many surgical procedures is suturing. served, using an impulse model for collision handling. The rope It involves manipulating a non-elastic suture through tissue, pulling is modeled as a spline of linear springs, with spheres placed on the strands to bring tissue surfaces in contact with one another, and the control points to represent the rope volume. The spheres tend tying knots. Figure 1 shows two snapshots during the simulation of to bunch up or stretch apart during the simulation, due to the an anastomosis operation (suturing of a severed blood vessel). Su- spring model, but collision handling prevents the rope from pass- ture simulation is discussed in [Kuhnapfel¨ et al. 2000] and a method ing through itself. This system is not interactive, as it takes several is presented in [Brown et al. 2002], including the interaction be- minutes of computation to tighten simple knots, like the overhand tween the suture and both deformable tissue and rigid surgical in- or square knots. Moreover, most ropes, including surgical sutures, struments. However, to our knowledge, there still exists no surgical only stretch by small amounts. Off-line motion planning techniques simulator addressing the issues that arise when the suture comes to undo a knot are also presented in [Ladd and Kavraki 2002]. The into contact with itself (self-collision). In [Kuhnapfel¨ et al. 2000] notion of knot energy and knot untangling by energy minimization these issues are regarded as the most difficult part of collision man- are discussed in [Kusner and Sullivan 1998]. agement. Contacts must be detected and handled to enable the user Rope simulation is related to cloth simulation, an area that has re- to naturally tie arbitrary knots. The task of knot-tying in surgical cently attracted much attention in Computer Graphics (e.g., [Baraff simulation is identified in [Brown et al. 2002], but no solution is and Witkin 1998; Bridson et al. 2002; House and Breen 2000; offered. It is also mentioned in [Larsson 2001], where some ideas Provot 1995; Volino and Magnenat-Thalmann 1995]). In many for modeling a suture using masses and springs are sketched, with- ways, a rope is a much simpler system to simulate. While clothes out providing an actual algorithm or results. Specific knots useful are 2-D objects embedded in 3-D space and can take many shapes, in surgery are described in [Silverstein 1999]. ropes are essentially 1-D objects with relatively simple geometry. But knot tying is quite specific to ropes and raises unique issues We move the rope by grasping one or several of its nodes and in contact detection and management. Some very practical knots displacing them. In our experimental system, this is done by means can only be achieved by complicated crossings of the rope, yield- of one or several devices, ranging from a simple mouse to 3-D ar- ing multiple simultaneous contacts when the rope is pulled tight ticulated linkages, allowing the user to position and move a graphic (Figure 2). While collision detection between rigid objects is a cursor or any representation of grasping tools (e.g., surgical for- well studied problem, collision detection between deformable ob- ceps). jects and self-collision detection within a deformable object are rel- Events like rope grasping and self-collisions, as well as colli- atively new topics (see Section 4). Changes of shape make it more sions with other objects, result in creating new constraints. Un- difficult to use precomputed data structures for expediting collision grasping and contact disappearance yield constraint removal. For tests during simulation. Moreover, collisions within a thin 1-D ob- example, when a node is grasped, this creates a “grasp” constraint, ject are easy to miss in discrete-step simulation, and missing any forcing the node’s position to agree with the position of the grasping would cause the object to unrealistically pass through itself. tool. Also, when a link of the rope comes into contact with another In this paper, we describe a simulator allowing a user to grasp link or with another object, “contact” constraints are created, whose and smoothly manipulate a virtual rope and to tie arbitrary knots, treatment will be described in Section 5. including knots around other objects, in real-time. During simula- The overall simulation algorithm is the following, where each tion, the rope’s length is kept approximately constant. Its configu- execution of the loop is called a cycle: ration is re-computed at rates up to 140Hz. One component of the simulator precisely detects all self-collisions in the rope and colli- sions with other objects. Another key component handles collisions to prevent penetration, while making the rope slide against itself Algorithm Rope-Simulator and other objects at contact points with some frictional sticking, so that knots can be pulled tight in realistic manner. We propose a Loop: new collision response scheme that is based on coordinating local 1. Read the new positions of the grasped nodes micro-motions of the rope. This scheme creates a natural model 2. Compute the new rope configuration of friction, which provides a convenient and efficient alternative to 3. Find all (self-)collisions in this configuration the classical Coulomb’s model. An additional module, independent 4. Adjust the rope configuration to remove overlaps of the main simulator, identifies which topological knots have been 5. Display the final configuration tied in the rope, also in real-time. This module is based on recent results from knot theory. Although our techniques are fairly general, we have created them The computation of the new rope configuration at Step 2 is done specifically for surgical suturing. In this application, the mechani- by the FTL (Follow The Leader) algorithm presented in Section 3, cal properties of both the suture (very light weight relative to bend- taking into account contact constraints established at the previous ing stiffness) and its environment (viscous solution) allow our sim- cycle. Finding (self- )collisions at Step 3 is discussed in Section 4. ulator to ignore gravity. At first sight, this may be seen an over- simplification for other applications. In fact, only a small compo- It is essential that the rope cannot pass through itself at any cycle. nent of the simulator relies on this assumption, and this component This could happen if grasped nodes were moved too quickly. So, we could be easily modified to handle gravity. The key components set a threshold δ on the distance that any grasped node may travel – detection and management of self-collisions, and knot identifica- between two successive executions of Step 1. As FTL will cause no tion – do not depend on it. Note also that many ropes have relatively points in the rope to move by more than δ, we set δ to be slightly high bending stiffness, which limits the effect of gravity and actu- smaller than the rope’s radius R. Therefore, if the simulator runs at ally facilitates knot making. Q Hz, each grasped node can be moved by up to Q×R units/second without noticeably lagging behind the grasping tool. In the rest of this paper, without loss of generality, we set the 2 Overview of Rope Simulator length of each link to one unit. We denote the number of links by n, so that the length L of the rope is equal to n.