Eurographcs/ ACM SIGGRAPH Symposum on Computer Anmaton (007), pp. 1 10 D. Metaxas and J. Popovc (Edtors) CORDE: Cosserat Rod Elements for the Dynamc Smulaton of One-Dmensonal Elastc Objects J. Spllmann M. Teschner Computer Graphcs, Unversty of Freburg, Germany Abstract Smulatng one-dmensonal elastc objects such as threads, ropes or har strands s a dffcult problem, especally f materal torson s consdered. In ths paper, we present CORDE(french rope ), a novel deformaton model for the dynamc nteractve smulaton of elastc rods wth torson. We derve contnuous energes for a dynamcally deformng rod based on the Cosserat theory of elastc rods. We then dscretze the rod and compute energes per element by employng fnte element methods. Thus, the global dynamc behavor s ndependent of the dscretzaton. The dynamc evoluton of the rod s obtaned by numercal ntegraton of the resultng Lagrange equatons of moton. We further show how ths system of equatons can be decoupled and effcently solved. Snce the centerlne of the rod s explctly represented, the deformaton model allows for accurate contact and self-contact handlng. Thus, we can reproduce many mportant loopng phenomena. Further, a broad varety of dfferent materals can be smulated at nteractve rates. Experments underlne the physcal plausblty of our deformaton model. Categores and Subject Descrptors (accordng to ACM CCS): Graphcs and Realsm: Anmaton I.3.7 [Computer Graphcs]: Three-Dmensonal Keywords: Physcally-based modelng, Lagrangan dynamcs, Elastc rods, Cosserat theory 1. Introducton Physcally-based modelng of elastc objects has always been an actve research area n computer graphcs. In the past, approaches have been proposed to model one-, twoand three-dmensonal elastc objects. Elastc objects whose confguraton space s one-dmensonal play an mportant role n many research felds, e. g. n engneerng or mcrobology. In computer anmaton, one-dmensonal objects represent threads, ropes or har strands. These objects are consstently denoted as elastc rods, ndependent of ther actual materal propertes. Despte the fact that the confguraton space of a rod has only one dmenson, ts mathematcal representaton s dffcult. Ths comes from the observaton that an elastc rod can not only bend or stretch, but also twst around ts centerlne. Thus, the confguraton of a deformed rod can not be descrbed n terms of the poston of ts centerlne alone. Instead, the orentaton of each cross-secton ntroduces an addtonal degree of freedom. Snce the postons and orentatons are mechancally coupled, a rod s an ntrnscally constraned system. In the late 19th century, the Cosserat brothers ntroduced a theory for elastc rods. Nowadays, ths approach has become a fundamental part of nonlnear elastcty theory. In computer graphcs, many approaches have been presented that model elastc rods wth unorented mass-sprng chans wthout torson [BLM04]. However, many mportant nonlnear effects such as bfurcaton or out-of-plane bucklng (see Fg. 1) arse solely due to the presence of torsonal torques. Recently, approaches have been proposed that employ the Cosserat theory of elastc rods to handle the dynamcs of har strands or catheters n vrtual surgery [BAC 06,Pa0]. These approaches result n boundary value problems that can be solved by employng shootng methods. They are, however, less sutable for handlng contacts and self-contacts. Stll, many effects such as loopng phenomena requre a robust handlng of self-contacts, as llustrated n Fg. 1. Our contrbuton. We propose CORDE, a physcallybased deformaton model for one-dmensonal elastc objects wth torson that s nspred by the Cosserat theory of elastc rods. Our deformaton model can be used to smulate a broad varety of materals, rangng from flexble structures such as threads, ropes or har strands to stff objects wth ntrnsc bendng and torson such as sprngs or wres. We formulate the contnuous knetc, potental and dsspaton energy for the elastc rod based on quaternon algebra. To smulate the rod dynamcs, we dscretze the rod nto elements. From the contnuous energes, we derve dscrete energes by employng fnte element methods. As a consequence, the global behavor of the rod s ndependent of the dscretzaton. The equatons of moton are obtaned by takng varatons of the Lagrangan. We then show how to Eurographcs/ ACM SIGGRAPH Symposum on Computer Anmaton (007)
Spllmann et al. / CORDE: Cosserat Rod Elements for the Dynamc Smulaton of One-Dmensonal Elastc Objects Fgure 1: Dynamc loopng phenomenon of a rod under torsonal stran: A rod s spanned between two anchors, and ts ends are clamped. A torque transducer on the left vares the end-to-end rotaton of the rod. We observe a bfurcaton sequence that results n a loopng wth an ncreasng number of self-contacts. Ths behavor can not be reproduced by approaches that do not consder materal torson. decouple the resultng system of equatons n order to solve t drectly. In addton, we model the nternal frcton such that the rgd body moton of the rod s not affected. In contrast to exstng approaches that smulate the rod by solvng a boundary value problem, e. g. [BAC 06, Pa0], we can handle complex collson and self-collson confguratons. Thus, our deformaton model enables the dynamc smulaton of knots and loopng phenomena. Moreover, the approach s elegant and smple to mplement, and snce t s lnear n the number of nodes, ropes and threads can be anmated at nteractve rates. Organzaton. After dscussng the prevous work, we gve n Secton 3 a short ntroducton of the Cosserat model for elastc rods that s essental for an understandng of our approach. Further, we derve expressons for the contnuous potental, knetc and dsspaton energy of the deformng rod. In order to numercally smulate the rod, t s necessary to dscretze t nto elements, as dscussed n Secton 4. The potental, knetc and dsspaton energy of each element s then expressed n terms of the contnuous energes. Ths secton results n the dscrete equatons of moton for the rod. These equatons could be solved by employng teratve numercal methods. However, ths can not be done at nteractve rates. Thus, we dscuss n Secton 5 how to decouple the system of equatons such that t can be solved drectly. Ths wll nclude some mportant smplfcatons of the problem that result n an elegant and fast method. In Secton 6, we evaluate our deformaton model wth respect to physcal plausblty and applcablty.. Related work The Cosserat theory of elastc rods s well-nvestgated n the feld of nonlnear elastcty. A comprehensve dscusson of the topc s gven n the book of Antman [Ant95]. Amongst others, Cosserat rods are used n robotcs, mcro-electronc mechancal systems [CLW06], and n computatonal bology to model the mechancs of DNA molecules [MM96]. In physcs, most approaches deal wth the analyss of elastc rod equlbra, assumng that the rods are unshearable and nextensble. The defnton of a poston and an orentaton of the start and end pont of the rod results n a boundary value problem (BVP). The analyss and numercal soluton of the correspondng system of ordnary dfferental equatons s dscussed n, e. g., [Keh97]. The analyss of the dynamcs of nextensble rods s consdered n, e. g., [Dc94]. Our approach s nspred by fnte element methods based on the Cosserat theory, notably by the works of Smo et al. [Sm85] and Cao et al. [CLW06]. In contrast to these works, we gan effcency and smplcty by decouplng the resultng system of equatons. Physcally-based smulaton and anmaton of deformable objects s an mportant research area n computer graphcs. A good overvew on the topc s gven n [NMK 05]. Physcally-based anmaton of solds s also dscussed n [MG04]. There exst two dfferent classes of approaches to smulate and anmate elastc rods, namely by consderng the rod as a chan of lnear objects, or by consderng the rod as a curve n space. E. g. Chang et al. [CJY0] proposed an approach that s focused on har nteractons, where the har strand s modeled from clusters lnked by bendng sprngs. Brown et al. [BLM04] publshed an approach to smulate knottng of ropes, ncludng a robust collson handlng scheme. They model the rope from a chan of masses and sprngs. However, n contrast to our deformaton model, nether of these models s able to handle torsonal torques. A deformable model that handles torsonal torques has been presented by Wang et al. [WBD 05]. Smlar to [BLM04], they model a thread from a chan of sprngs. In addton, they lnk the segments by torsonal sprngs. In contrast to ther work, we employ an energy-based approach to compute the restoraton forces. Recently, Hadap [Had06] descrbes a methodology based on dfferental algebrac equatons to smulate chan of rgd bodes that ncludes torsonal stffness dynamcs. In turn, ths approach s computatonally expensve and thus less sutable for nteractve applcatons. Poneerng work n modelng elastc rods from curves has been done by Terzopoulos [TPBF87] by proposng the energy formulaton of the curve n space subject to geometrc deformaton. Later, Qn and Terzopoulos [QT96] proposed a physcally-based deformaton model of a NURBS curve. They derve contnuous knetc and deformaton energes, and evolve the curve by employng Lagrangan mechancs. A fnte element analyss enables the smulaton of the curve at nteractve rates. Smlar n sprt s the approach of Remon et al. [RNG00]. They employ successons of splne segments to model kntted cloth. In contrast to [QT96], they consder the control ponts as the degrees of freedom of the contnuous object. The use of splnes was also suggested by Lenor et al. and by Phllps et al. [LMGC0, PLK0] n order to model threads. These approaches can also handle complex collson confguraton. However, they have n common that materal torson can not be represented. In contrast, Eurographcs/ ACM SIGGRAPH Symposum on Computer Anmaton (007)
Spllmann et al. / CORDE: Cosserat Rod Elements for the Dynamc Smulaton of One-Dmensonal Elastc Objects 3 our deformable model handles both bendng and torson of rods n contact. The Cosserat theory for elastc rods has frst been ntroduced to the communty by Pa n 00 [Pa0]. He models the statcs of thn deformable structures such as catheters or sutures. He assumes the rod to be unshearable and nextensble. The confguraton of the rod s obtaned by solvng the resultng BVP. Ths approach provdes an effcent and physcally correct way to anmate contnuous elastc rods. However, the model does not handle dynamcs. Furthermore, self-contact and nteractons requre numercally senstve shootng technques to solve the dfferental equatons. Recently, Bertals et al. [BAC 06] proposed an mportant extenson of Pa s work. Ther approach s a combnaton of a dscrete and a contnuous model. They smulate har strands as chans of helcal segments. Smlar to the classcal Cosserat rod model, they defne approprate start and end condtons. The dynamcs of the super-helces are obtaned by feedng the Lagrangan equaton of moton wth the approprate energy terms. The confguraton of the har strand s reconstructed from the generalzed coordnates that conform to twst and curvature of the segments. Ths deformable model s by far the most advanced way to represent elastc rods. However, t has some mportant restrctons: Snce the segments have an ntrnsc curvature, the smulaton of n- pont contacts [vdhngt03] or knots requres a large number of segments. As ther approach has complexty O(N ) wth N the number of segments, such self-collson confguratons can hardly be smulated at nteractve rates. In contrast, our scheme s lnear n the number of elements, and desgned to handle complex contact confguratons such as knots. Further, we replace the vscous dsspaton energy of [BAC 06] by a term that addtonally consders nternal frcton wthout affectng the rgd body moton of the rod. The approaches that are most closely related to ours are the works of Grégore et al. [GS06] and Loock et al. [LS01]. They proposed to model a cable from joned elements where each element has a poston and an orentaton, the latter expressed n terms of quaternons. Then they derve constrant energes and assocated forces. The goal s to fnd statc equlbra states of cables n vrtual assembly smulaton. We augment ther work by consderng the dynamcs of rods, whch provdes unque challenges. Further, we employ fnte element methods to derve dscrete energes whle they smulate the rod as a smple mass-sprng system. 3. Cosserat theory of elastc rods In ths secton, we gve a bref ntroducton of the Cosserat theory of elastc rods. For a more comprehensve dscusson of the topc, we refer to the book of Antman [Ant95]. 3.1. Representaton of rods A rod can be thought of as a long and thn deformable body. We assume that ts length s sgnfcantly larger than ts radus, and thus we do not explctly represent ts volume. Instead, we characterze the contnuous confguraton of the rod by the centerlne r(σ) = (r x(σ),r y(σ),r z(σ)) T. Here, r(σ) : [0,1] R 3 assgns a poston n space to each lne parameter value σ [0,1]. Wth ths concept alone, we can not express the torson of the rod. Thus, we thnk n each mass pont of the rod a rght-handed orthonormal bass d 1 (σ),d (σ),d 3 (σ). The d are called drectors. d 3 (σ) s defned to be tangental to the centerlne, thus d 3 s parallel to r : r r d 3 = 0 (1) Ths mportant constrant realzes the mechancal couplng between the centerlne and ts orentaton. Later, t wll turn out that ths constrant s not mplctly fulflled but has to be explctly enforced. Fg. llustrates the representaton of the rod. Notce that the prme y (σ,t) always denotes the spatal dervatve y, whle the dot ẏ(σ,t) denotes the temporal σ dervatve y t. Fgure : The confguraton of the rod s defned by ts centerlne r(σ). Further, the orentaton of each mass pont of the rod s represented by an orthonormal bass, called the drectors. d 3 (σ) s constraned to be parallel to r (σ) The length of the spatal dervatve r (σ) ndcates the stretch of the centerlne r at σ. Wthout loss of generalty, we assume the length of the rod to be 1. As a consequence, r = 1 f the rod s unstretched. Some varants of the Cosserat rod model [MM96, BAC 06] consder the rod to be nextensble, whch does, however, lead to stff equatons. The spatal dervatves d k of the drectors ndcate the spatal rate of change n bendng and torson. From dfferental geometry, t s known that there exsts a vector u wth d k = u d k, k = 1,,3 () u s called the Darboux vector. The Darboux vector s an mportant quantty n the Cosserat theory snce the stran rates for the bendng and torson can be expressed as u k = u d k, k = 1,,3 (3) The values u 1 and u measure the stran n the two bendng drectons whle u 3 measures the torsonal stran. Later, we derve the expresson for the potental energy from these stran rates. The temporal dervatve ṙ(σ) of the centerlne ndcates the translatonal velocty of the mass pont at σ. The angular velocty ω s related to the temporal dervatves of the drectors by ḋ k = ω d k, k = 1,,3 (4) The components ω k = ω d k measure the angular velocty of the cross secton rotatng around drector d k. Eurographcs/ ACM SIGGRAPH Symposum on Computer Anmaton (007)
4 Spllmann et al. / CORDE: Cosserat Rod Elements for the Dynamc Smulaton of One-Dmensonal Elastc Objects 3.. Representaton of rotaton In order to relate the drectors d to the reference frame, we have to choose a representaton of rotaton,. e. a representaton for the group of orthogonal rotatons SO(3). In the lterature, both Euler angles, and quaternons (also known as Euler parameters) have been proposed. The Euler angles use the mnmum number of parameters to represent the rotaton, but they suffer from sngulartes such as the gmbal lock. Havng ths n mnd, we use quaternons to represent the rotaton. A quaternon can be thought of as a quadruple q = (q 1,q,q 3,q 4 ) T wth q R. Only unt quaternons represent pure rotatons, thus the q are not ndependent but coupled by the constrant q = 1. The drectors d n terms of the quaternon q are gven by: d 1 = q 1 q q 3 + q 4 (q 1 q + q 3 q 4 ) (q 1 q 3 q q 4 ) d 3 =,d = (q 1 q 3 + q q 4 ) (q q 3 q 1 q 4 ) q 1 q + q 3 + q 4 (q 1 q q 3 q 4 ) q 1 + q q 3 + q 4 (q q 3 + q 1 q 4 ) (5) The stran rates u k n the local frame are obtaned as u k = q B kq q (6) where B k R 4 4 s a constant skew-symmetrc matrx. For the angular velocty components ω k n the local frame, a smlar relaton s stated as ω k = q B kq q (7) The angular velocty components ω 0 k wth respect to the reference frame are ω 0 k = q B0 kq q (8) where B 0 k R4 4 s a constant skew-symmetrc matrx. ω 0 s requred to derve the angular dsspaton energy. The dervaton of (6) and (7) and the expressons for B k and B 0 k are gven n the Appendx. 3.3. Energy formulaton Based upon the stran-dsplacement and angular velocty relatons (6), (7) and (8), we derve the contnuous knetc, potental and dsspaton energy of the deformed rod. 3.3.1. Potental energy The potental energy conssts of two parts, namely the energy V s of the stretch deformaton, and the energy V b of the bendng and torsonal deformaton. The stretch energy V s s gven as V s = 1 Z 1 K s( r 1) dσ (9) 0 where shear s neglected. K s s the stretchng stffness constant that s computed from a stretchng Young s modulus E s wth K s = E s πr. The bendng energy V b follows from the stran rates (6) V b = 1 Z 1 3 K kk ( 0 k=1 q B kq q û k ) dσ (10) The û k conform to the ntrnsc bendng and torson of the rod and K = (K kk ) R 3 3 s the stffness tensor. Snce we assume that the rod has a unform cross secton, we can neglect the off-dagonal terms n K. From textbooks on mechancs we get K 11 = K = E πr 4, K 33 = G πr (11) wth E denotng the Young s modulus governng the bendng resstance, G denotng the shear modulus governng the torsonal resstance, and r denotng the radus of the rod s cross secton. For deal rods, the stretchng Young s modulus E s s equal to the bendng Young s modulus E. However, n order to get an addtonal degree of freedom, t s useful to defne two ndependent constants E and E s. Ths s motvated by the observaton that e. g. nylon ropes do not have a unform cross secton, but are composed of several strands. As a consequence, the observed bendng resstance s much lower than the theoretcal bendng resstance computed from the Young s modulus. Together, we obtan the potental energy V as V = V s + V b. The values for r, E, E s and G depend on the smulated materal (see Appendx). 3.3.. Knetc energy The knetc energy of the rod conssts of two parts, namely the translatonal energy T t of the centerlne r, and the rotatonal energy T r of the rod cross secton. The translatonal energy s T t = 1 Z 1 ρπr ṙ ṙdσ (1) 0 where ρ s the densty per unt length, and r s the radus of the rod. The rotatonal energy follows from the expressons for the angular veloctes (7) T r = 1 Z 1 3 I kk ( 0 k=1 q B kq q) dσ (13) where I = (I kk ) R 3 3 s the nerta tensor that s approxmated as I 11 = I = ρ πr 4, I 33 = ρ πr (14) As before, the off-dagonal terms n I can be neglected. The total knetc energy T s then T = T t + T r. The numercal values for ρ and r are gven n the Appendx. 3.3.3. Dsspaton energy The dsspaton energy captures nternal frcton and vscoelastc effects. A heurstc model for vsco-elastc effects has been proposed n [BAC 06]. To model nternal frcton, we propose an approach that s nspred by the poneerng work Eurographcs/ ACM SIGGRAPH Symposum on Computer Anmaton (007)
Spllmann et al. / CORDE: Cosserat Rod Elements for the Dynamc Smulaton of One-Dmensonal Elastc Objects 5 of Baraff and Wtkn [BW98] on constraned cloth smulaton. The nternal frcton damps relatve velocty n the rod. The relatve translatonal velocty can be computed as the spatal dervatve of the temporal dervatve of the centerlne r actng n the tangental drecton r. The translatonal dsspaton energy D t s D t = 1 Z 1 γ tv (rel) v (rel) dσ (15) 0 where γ t s the translatonal nternal frcton coeffcent. v (rel) = 1 r (ṙ r ) s the projected relatve translatonal r velocty of the mass ponts. The relatve angular velocty s obtaned from the spatal dervatve of the angular velocty ω 0. It s mportant to compute the angular velocty n the reference frame n order to consder all quanttes n the same bass. The rotatonal dsspaton energy D r s then D r = 1 Z 1 γ r ω 0 ω 0dσ (16) 0 where γ r s the rotatonal nternal frcton coeffcent. ω 0 can be obtaned from (8). The total dsspaton energy D = D t + D r s the sum of the translatonal and rotatonal dsspaton energy. 3.4. Lagrangan equaton of moton The dynamc equlbrum confguraton of an elastc rod s characterzed as a crtcal pont of the Lagrangan L = T V + D subject to the holonomc constrants C p r r d 3 = 0 (17) C q q 1 = 0 (18) The vector-valued constrant (17) states that the thrd drector conforms to the spatal dervatve of the centerlne r. Ths constrant couples the orentatons and the postons of the rod. The scalar constrant (18) states that the quaternon has unt length and thus represents a proper rotaton. By employng calculus of varatons and by ntroducng Lagrangan multplers λ R 3 and µ R for the constrants, we obtan the Lagrangan equaton of moton for an elastc rod: d T T + V + D + λ C p + µ Cq Z 1 = F edσ dt ġ g g ġ g g 0 (19) Here, the g {r x,r y,r z,q 1,q,q 3,q 4 } are the coordnates, and F e are external forces and torques. Detals can be found n the book of Goldsten [Gol81]. 4. Dscrete energy formulaton In ths secton, we dscretze the rod nto elements. We then derve expressons for the potental and knetc energy per element by employng fnte element methods. Ths dscretzaton allows for an effcent numercal soluton of the equatons of moton (19). 4.1. Dscretzaton of the rod We represent the centerlne r(σ) of the rod as a chan of N nodes r R 3, [1,N]. The centerlne elements r +1 r may dffer n sze. The orentatons of the centerlne elements are represented by quaternons q j, j [1,N 1], as llustrated n Fg. 3. A smlar representaton has been proposed by Grégore and Schömer n [GS06]. In contrast to pure geometrc approaches such as [LMGC0], ths representaton allows to model materal torson. Fgure 3: The centerlne of the rod s dscretzed nto nodes r. The orentaton of the centerlne element r +1 r s represented by a quaternon q j that s attached to the centerlne element at ts mdpont. The dscrete spatal dervatve r of the centerlne s obtaned as r = r +1 r. By assumng a hgh stretch stffness, we approxmate r r +1 r as r 1 l (r +1 r ) (0) where l = r 0 +1 r0 s the restng length of the centerlne element. Here, the r 0 are the ntal postons of the mass ponts. To derve an expresson for the dscrete spatal dervatve q j of the orentaton, we consder that the quaternon q j represents the orentaton of the centerlne element r +1 r. Thus, an orentaton element j starts at the mdpont of centerlne element and ends at the mdpont of centerlne element + 1. For q j, we thus approxmate q j 1 l j (q j+1 q j ) (1) where l j = 1 ( r0 + r0 +1 + r0 +1 r0 ) s the restng length of the orentaton element j. 4.. Dscrete energes In ths secton, we derve the formulatons of the potental, knetc and dsspaton energy for the dscrete Cosserat rod. We compute the energes per centerlne and orentaton element by ntegratng the energes over the length of the respectve element. The total energy of the rod could then be obtaned by summng up the ndvdual energes. However, ths wll not be necessary snce we solve the Lagrangan equaton of moton per node. In our dscrete settng, the dsplacements are only gven at the nodes. Therefore, we nterpolate the dsplacements Eurographcs/ ACM SIGGRAPH Symposum on Computer Anmaton (007)
6 Spllmann et al. / CORDE: Cosserat Rod Elements for the Dynamc Smulaton of One-Dmensonal Elastc Objects wthn the elements. For smplcty, we employ constant shape functons - r(ξ) and - q(ξ),. e. and -r (ξ) = - r = 1 (r + r +1 ) () -q j (ξ) = - q j = 1 (q j + q j+1 ) (3) These shape functons result n partcularly smple expressons when ntegrated over the element length. Experments ndcate that hgher-order shape functons do barely ncrease the vsual plausblty, but requre sgnfcantly more computatons. 4..1. Dscrete potental energy To derve the expresson for the stretch energy, we ntegrate over the length l of the centerlne segment. Assumng that the spatal dervatve r stays constant per element, the stretch energy per element follows from (9) as V s [] = 1 Z l 0 K s ( r 1) dξ = 1 l K s( 1 l (r+1 r ) (r +1 r ) 1) (4) To derve the expresson for the bendng energy, we ntegrate over the length l j of the orentaton element j. We further assume that the spatal dervatve q j stays constant. Thus V b [ j] = 1 Z l j 3 K kk ( 0 k=1 q - j B kq - j q j û k ) dξ (5) } {{ } = l j 3 k=1 K kk (B k (q j + q j+1 ) 1 l j (q j+1 q j ) û k ) where we made the smplfyng assumpton that the quaternons have unt length, whch s justfed snce the untconstrant (18) s explctly enforced. 4... Dscrete knetc energy Smlar to the prevous secton, we consder the knetc translatonal energy per centerlne element, and the knetc rotatonal energy per orentaton element. By pluggng () nto (1) and ntegratng over the centerlne element, we get T t [] = 1 Z l 0 ρπr - r - r dξ = 1 8 ρπr l (ṙ +1 + ṙ ) (ṙ +1 + ṙ ) (6) For the rotatonal knetc energy, we ntegrate over the orentaton element j. The resultng energy expresson s T r[ j] = 1 Z l j 3 I kk ( 0 k=1 q - j B kq - j q - j ) dξ } {{ } = l 3 j 8 I kk (B k (q j + q j+1 ) ( q j + q j+1 )) (7) k=1 4..3. Dscrete dsspaton energy To obtan the dsspaton energy expresson, we proceed as n the prevous sectons. Agan, the translatonal dsspaton energy s obtaned by ntegratng over the centerlne elements, and the rotatonal dsspaton energy s obtaned by ntegratng over the orentaton elements. For the translatonal dsspaton energy D t we get D t [] = 1 Z l 0 γ t v (rel) v (rel) dξ = l γ tv (rel) v (rel) (8) wth the projected relatve translatonal velocty v (rel) v (rel) = 1 r r (ṙ } {{ r ) } 1 = 1 ( ) 3 l (r +1 r ) (ṙ +1 ṙ ) (r +1 r ) as (9) where we made the smplfyng assumpton that r 1, whch s vald for rods wth a large stretchng stffness. The rotatonal dsspaton energy D r s obtaned as D r [ j] = 1 Z l j 3 γ r 0 k=1( 1 B 0 l kq j+1 q j+1 1 B 0 j l kq j q j ) dξ j = l j γ r 3 k=1(b 0 kq j+1 q j+1 B 0 kq j q j ) (30) where we assume q j 1 for all j. Notce that here we do not nterpolate the dsplacements wthn the orentaton element but compute the relatve rotatonal velocty between the two orentaton nodes. It s mportant to take the relatve veloctes wth respect to the reference frame. 5. Numercal soluton In the last secton, we have dvded the rod nto elements. For each element, we have derved the potental, knetc and dsspaton energy. We now show how we can solve the Lagrangan equaton of moton by employng those energy terms. We further propose an effcent mplementaton of the necessary constrants such that the system of equatons s decoupled. 5.1. Assembly of the equatons of moton The Lagrangan equaton of moton (19) characterzes the dynamc equlbrum of the rod. By substtutng the contnuous energes n (19) wth the per-element energes derved n the prevous secton, we arrve at the dscrete Lagrangan equaton of moton that characterzes the dynamc equlbrum per element. The necessary symbolc dfferentaton s performed by employng the computer algebra software Maple. Ths results n a system of equatons of the form M g + f(ġ,g) = (F e τ e) T (31) The matrx M(ġ,g) contans nonlnear terms n ġ = {ṙ, q} and g = {r,q}. Further, f(ġ,g) conforms to a nonlnear stffness functon that s obtaned by symbolcally dfferentatng Eurographcs/ ACM SIGGRAPH Symposum on Computer Anmaton (007)
Spllmann et al. / CORDE: Cosserat Rod Elements for the Dynamc Smulaton of One-Dmensonal Elastc Objects 7 the potental and dsspaton energy wth respect to the coordnates. Evaluatng ths functon results n nternal forces and torques. F e and τ e are the external forces and torques that act on the rod. The system of equatons can be solved by employng teratve methods, e. g. wth a conjugate gradent method. However, the numercal soluton s expensve and can hardly be done at nteractve rates for larger rods. In the next two sectons, we propose two smplfcatons of the problem that result n a decoupled system of equatons that can be solved drectly. 5.. Implementaton of the constrants The couplng between the orentaton of the rod and ts centerlne s realzed by the constrant (17). To mplement the constrants n (19), we have ntroduced Lagrangan multplers. At ths pont, we underlne that a Cosserat rod s an ntrnscally constraned system. In computer graphcs, many approaches have been presented on mantanng constrants n dynamc systems. An applcaton of Lagrangan multplers to artculated rgd bodes has e. g. been proposed by Baraff [Bar96]. Earler, Wtkn et al. [WFB87] have proposed to express geometrc constrants by energy functons, an approach that s also known as penalty method. They formulated a constrant as an energy functon E(x) : R n R wth E(x) = 0 f the constrant s satsfed. Dfferentatng ths energy functon wth respect to x yelds constrant forces F that accelerate the system towards the desred confguraton. The advantage of the penalty method s ts effcency: The constrants do not appear as addtonal equatons n the Lagrangan equaton of moton, but they act as addtonal forces on the system. The dsadvantage s the loss of physcal accuracy: Snce the constrant forces act durng a tme perod h on the system, they volate the prncple of vrtual power [Gol81]. However, snce our goal s to obtan a smulaton that behaves n a physcal plausble way, we decded to employ energy constrants. We thus express the parallel constrant (17) by an energy functon E p = 1 Z 1 0 κ( r r d 3) ( r r d 3)dσ (3) where κ s a sprng constant. In our dscrete model, the drecton of the centerlne element r +1 r has to conform to the thrd drector of the bass representng the orentaton of ths element. Thus, the dscrete constrant energy per centerlne element reads as E p [] = 1 Z l ( r ) ( κ r ) 0 r d 3(q ) r d 3(q ) dξ (33) = l ( κ r+1 r ) ( r +1 r d r+1 r ) 3(q ) r +1 r d 3(q ) What have we ganed wth ths constrant transformaton? The constrant energy E p[] can now be treated as an addtonal potental energy term n the Lagrangan equaton of moton of the rod. By symbolc dfferentaton, we obtan an addtonal nternal force term actng on the mass ponts and an addtonal nternal torque term actng on the quaternons. In fact, these forces and torques are responsble for many rod phenomena such as bucklng and loopng. The numercal values of κ depend on the smulated materal (see Appendx). To enforce the quaternon unt length constrant (18), we employ an even smpler method that s sometmes referred as coordnate projecton [ESF98]: In each teraton of the numercal smulaton, we explctly renormalze the quaternons ˆq,. e. q ˆq. Although ths technque does not ˆq guarantee energy conservaton, t does not harm the vsual qualty of the smulaton. 5.3. Decouplng of the state equatons By expressng the constrant (17) by an energy functon, we have reduced the number of equatons n (31). The acceleratons q and r are obtaned by nvertng the mass matrx M. Ths s accomplshed by consderng the structure of M. Snce the postons and orentatons are exclusvely coupled by the constrant energy, M has a block-dagonal form ( ) Mr 0 M = (34) 0 M q where M r s the mass matrx governng the state equatons of the mass ponts r, and M q s the mass matrx of the quaternons q j. Snce we assume that the mass s lumped n the mass ponts r, the mass matrx M r s dagonal. The equatons of moton for the mass ponts are obtaned as v = F m ṙ = v (35) where F s the sum of nternal and external forces actng on the mass pont, v ts velocty, and m ts mass. The mass matrx M q governng the evoluton of the quaternons s not dagonal. However, t s possble to express the equatons of moton not by the quaternons and ther tme dervatves, but to use the angular veloctes ω j together wth the quaternons q j as state varables [SM06]. Ths results n a dagonalzed system of equatons for the quaternons, ω j = I 1 (τ j ω j Iω j ) q j = ( ) 1 0 Q j ω j (36) Here, τ j s the sum of nternal and external torques that act on the quaternon, I s the nerta tensor, and Q j s the quaternon matrx of q j. The quaternon matrx allows to wrte a quaternon multplcaton as a matrx-vector product, (35) and (36) defne an ntal value problem (IVP), where the ntal confguraton of the rod s user-defned. The IVP s solved by numercal ntegraton, as dscussed n the subsequent secton. 5.4. Numercal soluton of the ntal value problem We summarze the smulaton process. The stffness functon f(ṙ,r, q,q) that governs the computaton of the nternal forces and torques s obtaned by dfferentatng the potental and constrant energy wth respect to the coordnates r and Eurographcs/ ACM SIGGRAPH Symposum on Computer Anmaton (007)
8 Spllmann et al. / CORDE: Cosserat Rod Elements for the Dynamc Smulaton of One-Dmensonal Elastc Objects q, and by dfferentatng the dsspaton energy wth respect to the tme dervatves ṙ and q. Ths symbolc dfferentaton s done as a preprocessng step. Subsequent postons r t+h and orentatons q t+h are obtaned by tme ntegraton of the state equatons (35) and (36). The nternal forces and torques are obtaned from evaluatng f(ṙ t,r t, q t,q t ) n the current confguraton of the rod. External forces nclude gravty, contact forces, and user nteractons. External torques are neglected. We denote the resultng sum of nternal and external forces n the current confguraton as F t and the resultng nternal torques as τ t. To evolve the mass ponts, we numercally ntegrate the state equatons (35) by employng a sem-mplct Euler scheme: v t+h = v t + h m F t (37) r t+h = r t + hv t+h (38) Ths scheme provdes suffcent condtonal stablty at mnor computatonal overhead. The evoluton of the orentatons s slghtly more nvolved. The torques τ t R 4 resultng from evaluatng f are dual to the quaternons. However, to evolve the angular veloctes ω, we need to transform the τ t nto Eucldean torques τ t R 3. Ths transformaton s accomplshed by a multplcaton wth the transposed quaternon matrx, ( ) = 0 τ 1 j QT jτ j (39) For detals on quaternon transformatons we refer to Schwab and Mejaard [SM06]. The numercal ntegraton of the rotatonal state equatons (36) s also realzed wth the sem-mplct Euler scheme, ω t+h j = I 1 ( τ t j ω t j (Iω t j))h + ω t j (40) ˆq t+h j = 1 ( ) 0 Qt j ω t+h h + q t j (41) j q t+h j = ˆqt+h j ˆq t+h j where the last step explctly normalzes the quaternons. 6. Results (4) The purpose of the experments s to llustrate the physcal plausblty of our deformaton model. Further, we show that the approach s well-suted for nteractve applcatons. To enable contact and self-contact confguratons, we have mplemented a standard deformable model collson handlng scheme [TKH 05]. To detect collsons, we employ axs-algned boundng box herarches, and to compute the repulson forces, we employ an adaptaton of the constrantbased response scheme from [SBT07]. All experments have been staged on an Intel Xeon PC, 3.8GHz. The offlne renderng s accomplshed wth a raytracer, the real-tme renderng wth OpenGL. For renderng, the rods are sknned wth a tubcal, B-splne nterpolated surface mesh. # Elements Force comp. [ms] Integraton [ms] 50 0.051 0.018 100 0.096 0.035 1000 0.91 0.33 Table 1: Tmngs for the force computaton and ntegraton of dscretzed rods. The tmngs ndcate that the method s lnear n the number of elements. 6.1. Dscrete rods The purpose of these experments s to show that the dynamc global behavor of real rods can be reproduced. The materal parameters are summarzed n Tab. n the Appendx. In a frst experment, we study the global deformaton of clamped rods that occur when the end-to-end rotaton s vared. These experments are nspred by recent research n the feld of nonlnear mechancs [vdhngt03]. The expermental setup s shown n Fg. 1 on the left. A torque transducer exerts a contnued torsonal rotaton on the rod, whle the rght end of the rod stays clamped. The rod forms a loopng wth an ncreasng number of self-contacts. The number of self-contacts s obvously lmted by the number of elements of the rod. The radus and the locaton of the loop are nfluenced by the rato of bendng and torson stffness [vdhngt03]. The tme step of the smulaton s h = 0.1ms. The rod s dscretzed nto 100 elements. To valdate our deformaton model, we performed the same experment wth a real rope. Fg. 4 llustrates the loopng sequence of the rope under torsonal stran. Although the materal parameters of the real rope dffer n magntude, ts global deformaton s comparable to the smulated vrtual rope. Fgure 4: To valdate our deformaton model, we performed the vared end-to-end rotaton experment wth a real rope. The global deformaton s comparable to the smulated vrtual rope n Fg. 1. Fgure 5: Colng up three clamped rods. The rods are dscretzed nto 1000, 100 and 50 elements, llustratng that the global deformaton s ndependent of the dscretzaton. Eurographcs/ ACM SIGGRAPH Symposum on Computer Anmaton (007)
Spllmann et al. / CORDE: Cosserat Rod Elements for the Dynamc Smulaton of One-Dmensonal Elastc Objects 9 In a second experment, we clamp the left ends of three rods to torque transducers. The transducers exert a contnued rotaton on the rods, thus colng up the rods (see Fg. 5). The front rod s dscretzed nto 1000 elements, the mddle rod s dscretzed nto 100 elements and the back rod s dscretzed nto 50 elements. The tme step s h = 0.1ms. The fgures llustrate that the global deformaton of the rods s ndependent of the dscretzaton. Further, ths experment llustrates that our deformaton model s lnear n the number of elements. Tmngs are summarzed n Tab. 1. 6.. Pre-shaped stff objects Due to the robustness of our deformaton model, a broad varety of dfferent materals can be smulated. We can smulate hghly flexble structures such as ropes as well as stff objects such as bars. By defnng an ntrnsc bendng and torson, t s also possble to smulate pre-shaped objects such as sprngs. In these experments, we model stff wrelke objects whose materal parameters are summarzed n Tab. n the Appendx. Each rod s dscretzed nto 50 elements. The stff equatons requre a small tme step h = 0.05ms. Fg. 6 llustrates the dynamc smulatons. Fgure 6: Dynamc smulaton of stff objects. Left: Stackng of rods. Rght: Objects wth ntrnsc bendng and torson. 6.3. Vrtual nteractve ropes and threads Snce our approach s lnear n the number of elements, elastc rods can be smulated at nteractve rates. Further, nternal frcton mnmzes oscllatons and makes the materal look more realstc. To llustrate that our deformaton model can be used n nteractve applcatons, we run a smulaton of a thread consstng of 100 elements. Its materal parameters are summarzed n Tab. n the Appendx. Whle one end of the thread s clamped, the user can freely nteract wth the centerlne (Fg. 7). In ths experment, the user tes a knot nto the thread. The tme step s h = ms, and the confguraton s rendered after 0 smulaton steps. The smulaton runs at 6 frames per second. As ndcated n Fg. 7 on the bottom rght, t s also possble to nteract wth an ntrnscally coled thread. 7. Concluson and future work We have presented CORDE, a physcally-based deformaton model to smulate one-dmensonal elastc objects. The deformaton model s nspred by the Cosserat theory of elastc rods. We have dscretzed the rod nto elements. For each element, we have derved the Lagrange equatons Fgure 7: Interactve smulaton of threads. The user can freely nteract wth the thread. Oscllatons are mnmzed by modelng nternal frcton. of moton by employng fnte element methods. By numercally ntegratng these equatons, the rod s evolved n tme. In contrast to prevous mass-sprng approaches, the rod behavor s ndependent of the underlyng dscretzaton, and the fnte element approach enables physcally plausble smulaton. In contrast to prevous boundary value approaches [Pa0, BAC 06], the nodal approach allows for accurate and effcent collson and self-collson handlng. By employng our deformaton model, a broad varety of dfferent materals can be plausbly smulated and anmated. Ths s partally enabled by modelng nternal frcton such that the rgd body moton of the rod s not affected. Snce our method s lnear n the number of nodes, the approach s partcularly nterestng for nteractve applcatons. Moreover, the approach s elegant and smple to mplement. However, ths deformaton model s just a startng pont for future research. In order to mprove the physcal accuracy of the method, a constrant handlng that consders the prncple of vrtual power would be favorable. Snce the constrant couples postons and orentatons, ths s a challengng problem. Further, vrtual suturng requres that the thread can be ted to tght knots, whch requres a sold collson handlng. Currently, we are nvestgatng nto mproved collson detecton and response methods. Snce the elements may dffer n sze, the rod can be adaptvely refned n regons where precse collson handlng s necessary. References [Ant95] ANTMAN S. S.: Nonlnear Problems of Elastcty. Sprnger Verlag, 1995. [BAC 06] BERTAILS F., AUDOLY B., CANI M.-P., QUERLEUX B., LEROY F., LÉVÊQUE J.-L.: Super-helces for predctng the dynamcs of natural har. In ACM Transactons on Graphcs (Proc. SIGGRAPH) (006), pp. 1180 1187. [Bar96] BARAFF D.: Lnear-tme dynamcs usng lagrange multplers. Computer Graphcs (Proc. SIGGRAPH) (1996), 137 146. [BLM04] BROWN J., LATOMBE J.-C., MONTGOMERY K.: Real-tme knot tyng smulaton. The Vsual Computer 0, 3 (004), 165 179. [BW98] BARAFF D., WITKIN A.: Large steps n cloth smulaton. In Proc. SIGGRAPH (1998), pp. 43 54. [CJY0] CHANG J. T., JIN J., YU Y.: A practcal model for har mutual nteractons. In Proc. ACM SIGGRAPH/Eurographcs symposum on Computer anmaton (00), pp. 73 80. [CLW06] CAO D. Q., LIU D., WANG C. H.-T.: Three dmensonal nonlnear dynamcs of slender structures: Cosserat rod element approach. Internatonal Journal of Solds and Structures 43, 3 4 (006), 760 783. [Dc94] DICHMANN D. J.: Hamltonan Dynamcs of a Spatal Elastca and the Stablty of Soltary Waves. PhD thess, 1994. Unversty of Maryland. [ESF98] EICH-SOELLNER E., FÜHRER C.: Numercal methods n multbody dynamcs. European Consortum for Mathematcs n Industry. B. G. Teubner, Stuttgart, 1998. [Gol81] GOLDSTEIN H.: Classcal Mechancs, ed. Addson-Wesley, 1981. [GS06] GRÉGOIRE M., SCHÖMER E.: Interactve smulaton of one-dmensonal flexble parts. In Proc. ACM Symposum on Sold and physcal modelng (006), pp. 95 103. Eurographcs/ ACM SIGGRAPH Symposum on Computer Anmaton (007)
10 Spllmann et al. / CORDE: Cosserat Rod Elements for the Dynamc Smulaton of One-Dmensonal Elastc Objects [Had06] HADAP S.: Orented strands: dynamcs of stff mult-body system. In Proc. ACM SIGGRAPH/Eurographcs symposum on Computer anmaton (006), pp. 91 100. [Keh97] KEHRBAUM S.: Hamltonan Formulatons of the Equlbrum Condtons Governng Elastc Rods: Qualtatve Analyss and Effectve Propertes. PhD thess, 1997. Unversty of Maryland. [LMGC0] LENOIR J., MESEURE P., GRISONI L., CHAILLOU C.: Surgcal thread smulaton. Modellng & Smulaton for Computer-aded Medcne and Surgery (00), 10 107. [LS01] LOOCK A., SCHÖMER E.: A vrtual envronment for nteractve assembly smulaton: From rgd bodes to deformable cables. In Proc. 5th World Multconference on Systemcs, Cybernetcs and Informatcs (001), vol. 3, pp. 35 33. [MG04] MÜLLER M., GROSS M.: Interactve vrtual materals. In Proc. Graphcs nterface (004), pp. 39 46. [MM96] MANNING R. S., MADDOCKS J. H.: A contnuum rod model of sequencedependent dna structure. J. Chem. Phys. 105 (1996), 566 5646. [NMK 05] NEALAN A., MÜLLER M., KEISER R., BOXERMANN E., CARLSON M.: Physcally Based Deformable Models n Computer Graphcs. In Eurographcs-STAR (005), pp. 71 94. [Pa0] PAI D.: Strands: Interactve smulaton of thn solds usng cosserat models. Computer Graphcs Forum (Eurographcs) 1, 3 (00), 347 35. [PLK0] PHILLIPS J., LADD A., KAVRAKI L. E.: Smulated knot tyng. In Proc. IEEE Internatonal Conference on Robotcs & Automaton (00), pp. 841 846. [QT96] QIN H., TERZOPOULOS D.: D-NURBS: A Physcs-Based Framework for Geometrc Desgn. IEEE Transactons on Vsualzaton and Computer Graphcs, 1 (1996), 85 96. [RNG00] REMION Y., NOURRIT J.-M., GILLARD D.: A dynamc anmaton engne for generc splne objects. Journal of Vsualzaton and Computer Anmaton 11, 1 (000), 17 6. [SBT07] SPILLMANN J., BECKER M., TESCHNER M.: Non-teratve computaton of contact forces for deformable objects. Journal of WSCG 15, 1-3 (007), 33 40. [Sm85] SIMO J. C.: A fnte stran beam formulaton. the three-dmensonal dynamc problem. part I. Computer Methods n Appled Mechancs and Engneerng 49 (1985), 55 70. [SM06] SCHWAB A. L., MEIJAARD J. P.: How to draw euler angles and utlze euler parameters. In Proc. IDETC/CIE 006, ASME 006 Internatonal Desgn Engneerng Techncal Conferences & Computers and Informaton n Engneerng Conference (006). [TKH 05] TESCHNER M., KIMMERLE S., HEIDELBERGER B., ZACHMANN G., RAGHUPATHI L., FUHRMANN A., CANI M.-P., FAURE F., MAGNENAT-THALMANN N., STRASSER W., VOLINO P.: Collson Detecton for Deformable Objects. Computer Graphcs Forum 4, 1 (005), 61 81. [TPBF87] TERZOPOULOS D., PLATT J., BARR A., FLEISCHER K.: Elastcally deformable models. Computer Graphcs (Proc. SIGGRAPH) 1, 4 (1987), 05 14. [vdhngt03] VAN DER HEIJDEN G., NEUKIRCH S., GOSS V., THOMPSON J.: Instablty and self-contact phenomena n the wrthng of clamped rods. Internatonal Journal of Mechancal Scences 45, 1 (003), 161 196. [WBD 05] WANG F., BURDET E., DHANIK A., POSTON T., TEO C.: Dynamc thread for real-tme knot-tyng. In Proc. Frst Jont Eurohaptcs Conference and Symposum on Haptc Interfaces for Vrtual Envronment and Teleoperator Systems (005), pp. 507 508. [WFB87] WITKIN A., FLEISCHER K., BARR A.: Energy constrants on parameterzed models. Computer Graphcs 1, 4 (1987), 5 3. Appendx A: Dervaton of stran rates n terms of quaternons In ths secton, we derve the expresson (6) that relates the stran rates u k to the quaternons q. The dervaton of the relaton between the angular velocty ω and the quaternons q s smlar. The constructon s a summary from the correspondng ssue n the thess of Dchmann [Dc94]. For further detals, we refer the reader to the cted document. We know that there exsts the Darboux vector u that s related to the drectors d k by d k = u d k, k = 1,,3 (43) where the components u k of u are drectly proportonal to the stran rates. Snce the d k defne an orthonormal bass, we wrte u = u 1 d 1 + u d + u 3 d 3. For d 3, we then obtan for example d 3 = (u 1 d 1 + u d + u 3 d 3 ) d 3 = u 1 d 1 d 3 + u d d 3 + u 3 d 3 d 3 = u 1 d + u d 1 (44) where we used the denttes d 3 = d 1 d and d k d k = 0,k = 1,,3. Multplyng (44) by d yelds d d 3 = u 1 d d u d 1 d = u 1 (45) For u and u 3, we smlarly obtan u = d 3 d 1 and u 3 = d 1 d. The relaton between the drectors d k and the quaternon q s gven n (5). To compute d k, we note that d k s a functon of q and q s a functon of the curve parameter σ: d k = d k (q(σ)) = d k(q(σ)) σ = d k q q σ = J kq (46) where we employed the chan rule of partal dfferentaton. J k s the Jacob matrx J k = d k that s obtaned by symbolc dfferentaton. q For u 1, we now wrte u 1 = d J 3 q = J T 3d q (47) whch results from applyng basc lnear algebra denttes. Smlar expressons are obtaned for u and u 3. To brng (47) to the desred form (6), we symbolcally evaluate the product J T 3 d to obtan J T 3d = q ( q 4 q 3 q q 1 ) T = q B 1q (48) wth the skew-symmetrc matrx B 1 0 0 0 1 B 1 = 0 0 1 0 0 1 0 0 1 0 0 0 The stran rate u 1 can then be obtaned by combnng (47) and (48). The matrces B and B 3 are obtaned n a smlar manner as 0 0 1 0 0 1 0 0 B = 0 0 0 1 1 0 0 0, B 3 = 1 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 The skew-symmetrc matrces B k and the resultng vectors B k q have several mportant propertes that are dscussed n [Dc94]. A smlar analyss [Dc94] can be done to obtan the angular veloctes ω 0 k wth respect to the reference frame, resultng n matrces B 0 k : B 0 1 = and 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 B 0 3 =, B 0 = 0 1 0 0 1 0 0 0 0 0 0 1 0 0 1 0 Appendx B: Materal parameters 0 0 1 0 0 0 0 1 1 0 0 0 0 1 0 0 Ropes Wres Threads Length [m] Radus r [m] 10 0.01 0.1 0.001 1 0.001 Densty ρ [kg m 3 ] 1300 7860 1300 Young modulus E [MPa] 0.5 00 10 5 Shearng modulus G [MPa] Stretch modulus E s [MPa] 0.5 0 100 100 10 5 0.0 Sprng const. κ [10 3 kg m s ] 100 300 0.1 γ t [10 6 kg m 3 s 1 ] 10 0.05 1 γ r [10 6 kg m 3 s 1 ] 1 0.01 0.1 Table : Materal parameters for the objects smulated n the experments. The parameter values have been determned by vsually comparng the behavor of the smulated objects to ther real counterparts. Eurographcs/ ACM SIGGRAPH Symposum on Computer Anmaton (007)