Cloth Simulation

전체 글

(1)

Mass-Spring Model based

Cloth Simulation

Wanho Choi

(2)
(3)

The explicit forward Euler time integration x = dv dt a = dv dt = d dt dx dt ⎛ ⎝⎜ ⎞⎠⎟ = d2x dt 2 = M−1 f : Newton' s 2nd law v = dx dt position : velocity : acceleration : differentiation differentiation integration integration d dt x v ⎡ ⎣ ⎢ ⎤ ⎦ ⎥ = v M−1f ⎡ ⎣ ⎢ ⎤ ⎦ ⎥ 1 Δt xn+1 − xn vn+1 − vn ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ = vn M−1f n ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ discretization f : force

(

)

M = m 0 0 0 m 0 0 0 m ⎡ ⎣ ⎢ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ⎥

: 3 × 3 mass matrix ← 3D :(x, y,z)

(4)

The explicit forward Euler time integration d dt x v ⎡ ⎣ ⎢ ⎤ ⎦ ⎥ = v M−1f ⎡ ⎣ ⎢ ⎤ ⎦ ⎥ 1 Δt xn+1 − xn vn+1 − vn ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ = vn M−1f n ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ discretization

(5)

1 Δt xn+1 − xn vn+1 − vn ⎛ ⎝ ⎜ ⎞ ⎠ ⎟ = v n+1 M−1f n+1 ⎛ ⎝ ⎜ ⎞ ⎠ ⎟

The implicit backward Euler time integration

⇐ f n+1 = f n + ∂f ∂x x n+1 − x n

(

)

+ ∂f ∂v v n+1 − v n

(

)

: the 1st order Taylor’s expansion

1 Δt xn+1 − xn Δt − v n ⎛ ⎝⎜ ⎞ ⎠⎟ = M −1 fn + ∂f ∂x x n+1 − xn

(

)

+ ∂f ∂v xn+1 − xn Δt − v n ⎛ ⎝⎜ ⎞ ⎠⎟ ⎡ ⎣ ⎢ ⎤ ⎦ ⎥ 1 Δt v n+1 − vn

(

)

= M−1 f n+1 = M−1 f n + ∂f ∂x x n+1 − xn

(

)

+ ∂f ∂v v n+1 − v n

(

)

⎡ ⎣⎢ ⎤ ⎦⎥ ⇐ v n+1 = x n+1 − xn Δt xn+1 − xn

(

)

− Δt2 vn = Δt2M−1 f n + ∂f ∂x x n+1 − xn

(

)

+ ∂f ∂v xn+1 − xn Δt − v n ⎛ ⎝⎜ ⎞ ⎠⎟ ⎡ ⎣ ⎢ ⎤ ⎦ ⎥ = Δt2M−1f n + Δt2M−1 ∂f ∂x x n+1 − xn

(

)

+ ΔtM−1 ∂f ∂v x n+1 − xn

(

)

− Δt2 M−1 ∂f ∂v v n I − Δt 2M−1 ∂f ∂x ⎛ ⎝⎜ ⎞⎠⎟

(

xn+1 − xn

)

= Δt2

(

vn + M−1f n

)

Ax

= b

We don't know fn+1 at n-th frame,

but we can estimate fn+1 from fn, xn and, vn.

I − Δt2M−1 ∂f ∂x − ΔtM −1 ∂f ∂v ⎛ ⎝⎜ ⎞⎠⎟

(

xn+1 − xn

)

= Δt2 ⎡⎣⎢vn + M−1⎛⎝⎜ f n − ∂∂vf vn⎞⎠⎟ ⎤⎦⎥ ⇐ ∂∂vf = 0 by later formulation I − Δt2M−1 ∂f ∂x ⎛ ⎝⎜ ⎞⎠⎟

(

xn+1 − xn

)

= Δt2

(

vn + M−1fn

)

f

n

: forces

x

n+1

: positions

n +1 ( ) instead of n

(6)

1 Δt 3 2 x n+1 − 2xn + 1 2 x n−1 3 2 v n+1 − 2vn + 1 2 v n−1 ⎛ ⎝ ⎜ ⎜ ⎜ ⎜ ⎞ ⎠ ⎟ ⎟ ⎟ ⎟ = vn+1 M−1f n+1 ⎛ ⎝ ⎜ ⎞ ⎠

: the 1st order Taylor’s expansion

The semi-implicit second-order backward time integration (BDF)

1 Δt 3 2 v n+1 − 2vn + 1 2 v n−1 ⎛ ⎝⎜ ⎞⎠⎟ = M−1f n+1 = M−1 f n + ∂ f ∂x x n+1 − xn

(

)

+ ∂f ∂v v n+1 − v n

(

)

⎡ ⎣⎢ ⎤ ⎦⎥ 2Δt 3 v n+1 − 8Δt 9 v n + 2Δt 9 v n−1 = 4Δt 2 9 M −1 f n + 4Δt 2 9 M −1 ∂f ∂x x n+1 − 4Δt 2 9 M −1 ∂f ∂x x n+ 4Δt 2 9 M −1 ∂f ∂v v n+1 − 4Δt 2 9 M −1 ∂f ∂v v n ⇐ vn+1 = 1 Δt 3 2 x n+1 − 2xn + 1 2 x n−1 ⎛ ⎝⎜ ⎞⎠⎟ 2 3 3 2 x n+1 − 2xn + 1 2 x n−1 ⎛ ⎝⎜ ⎞⎠⎟ − Δt9

(

8vn − 2vn−1

)

= 4Δt2 9 M −1fn + 4Δt 2 9 M −1 ∂f ∂x x n+1 − 4Δt 2 9 M −1 ∂f ∂x x n+ 4Δt 9 M −1 ∂f ∂v 3 2 x n+1 − 2xn + 1 2 x n−1 ⎛ ⎝⎜ ⎞⎠⎟ − 4Δt2 9 M −1 ∂f ∂v v n xn+1 − 4 3 x n + 1 3 x n−1 − Δt 9 8v n − 2vn−1

(

)

= 4Δt2 9 M −1 fn + 4Δt 2 9 M −1 ∂f ∂x x n+1 − 4Δt 2 9 M −1 ∂f ∂x x n+ 2Δt 3 M −1 ∂f ∂v x n+1 − 8Δt 9 M −1 ∂f ∂v x n + 2Δt 9 M −1 ∂f ∂v x n−1 − 4Δt 2 9 M −1 ∂f ∂v v n ⇐ f n+1 = f n + ∂f ∂x x n+1 − x n

(

)

+ ∂f ∂v v n+1 − v n

(

)

second order time discretization

I − 4Δt 2 9 M −1 ∂f ∂x − 2Δt 3 M −1 ∂f ∂v ⎛ ⎝⎜ ⎞ ⎠⎟ x n+1 − xn − 1 3 x n − xn−1

(

)

− Δt 9 8v n − 2vn−1

(

)

= 4Δt2 9 M −1 fn − 4Δt 2 9 M −1 ∂f ∂x x n− 8Δt 9 M −1 ∂f ∂v x n + 2Δt 9 M −1 ∂f ∂v x n−1 − 4Δt 2 9 M −1 ∂f ∂v v n I − 4Δt 2 9 M −1 ∂f ∂x − 2Δt 3 M −1 ∂f ∂v ⎛ ⎝⎜ ⎞ ⎠⎟ x n+1 − I − 4Δt 2 9 M −1 ∂f ∂x x n− 2Δt 3 M −1 ∂f ∂v ⎛ ⎝⎜ ⎞ ⎠⎟ x n = 1 3 x n − xn−1

(

)

+ Δt 9 8v n − 2vn−1

(

)

+ 4Δt2 9 M −1 fn − 2Δt 9 M −1 ∂f ∂v x n + 2Δt 9 M −1 ∂f ∂v x n−1 − 4Δt 2 9 M −1 ∂f ∂v v n I − 4Δt 2 9 M −1 ∂f ∂x − 2Δt 3 M −1 ∂f ∂v ⎛ ⎝⎜ ⎞ ⎠⎟ x n+1 − xn

(

)

= 1 3 x n − xn−1

(

)

+ Δt 9 8v n − 2vn−1

(

)

− 2Δt 9 M −1 ∂f ∂v x n − xn−1

(

)

+ 4Δt2 9 M −1 fn − ∂f ∂v v n ⎛ ⎝⎜ ⎞⎠⎟

(7)

I − 4Δt 2 9 M −1 ∂f ∂x ⎛ ⎝⎜ ⎞ ⎠⎟ x n+1 − xn

(

)

= 1 3 x n − xn−1

(

)

+ Δt 9 8v n − 2vn−1

(

)

+ 4Δt2 9 M −1 fn I − 4Δt 2 9 M −1 ∂f ∂x − 2Δt 3 M −1 ∂f ∂v ⎛ ⎝⎜ ⎞ ⎠⎟ x n+1 − xn

(

)

= 1 3 x n − xn−1

(

)

+ Δt 9 8v n − 2vn−1

(

)

− 2Δt 9 M −1 ∂f ∂v x n − xn−1

(

)

+ 4Δt2 9 M −1 fn − ∂f ∂v v n ⎛ ⎝⎜ ⎞⎠⎟ ⇐ ∂ f ∂v = 0 by later formulation I − 4Δt 2 9 M −1 ∂f ∂x ⎛ ⎝⎜ ⎞ ⎠⎟ x n+1 − xn

(

)

= 1 3 x n − xn−1

(

)

+ Δt 9 8v n − 2vn−1

(

)

+ 4Δt 2 9 M −1 f n

I

− Δt

2

M

−1

∂f

∂x

⎝⎜

⎠⎟

(

x

n+1

− x

n

)

= Δt

2

(

v

n

+ M

−1

f

n

)

Ax

= b

The explicit forward Euler time integration

The implicit backward Euler time integration : 3n × 3n symmetric matrix equation

(n : the number of mesh vertices)

: We need to derive f(= force) and ∂f

(8)

Stretch Force & Jacobian

for a Linear Spring

(9)

Eij = kij 2

(

xij − Lij

)

2 fi (= −fj ) = − ∂Eij ∂xi = kij 1− Lij xij ⎛ ⎝ ⎜ ⎞ ⎠ ⎟ xij

x

i

x

j

x

ij

= x

j

− x

i

: Hook’s law (Lij : rest length)

E

ij

L

ij : the 1st derivative ∂fi ∂x j = kij xijxijT xijTxij + kij 1− Lij xij ⎛ ⎝ ⎜ ⎞ ⎠ ⎟ I − xijxij T xijTxij ⎛ ⎝⎜ ⎞ ⎠⎟ : the 2nd derivative (elastic energy) (force) (Jacobian) (3x3 symmetric matrix) ∴ ∂f ∂x

⎝⎜ ⎞⎠⎟ i = j∈neighbors

∂x∂fij : the Jacobian of i-th node (3x3 symmetric matrix)

(10)

proof) fi = − ∂Eij ∂xi = kij 1− Lij xij ⎛ ⎝ ⎜ ⎞ ⎠ ⎟ xij = kij

(

xij − Lij

)

xij xij = kij 1− Lij xij ⎛ ⎝ ⎜ ⎞ ⎠ ⎟ xij fi = − ∂Eij ∂xi = − ∂∂xi kij 2

(

xij − Lij

)

2 ⎡ ⎣⎢ ⎤ ⎦⎥ = − kij 2 ∂ ∂xi

(

xij − Lij

)

2 ⎡ ⎣⎢ ⎤⎦⎥ = −kij

(

xij − Lij

)

∂xi

(

xij − Lij

)

⎛ ⎝⎜ ⎞ ⎠⎟ = −kij

(

xij − Lij

)

∂xi xij ⎛ ⎝⎜ ⎞ ⎠⎟ ⇐ ∂∂xi xij = − xij xij proof) ∂fi ∂x j = kij xijxijT xijTxij + kij 1− Lij xij ⎛ ⎝ ⎜ ⎞ ⎠ ⎟ I − xijxij T xijTxij ⎛ ⎝⎜ ⎞ ⎠⎟ ∂fi ∂xj = ∂ fi ∂xij ∂xij ∂xj = ∂ fi ∂xij∂xj

(

x j − xi

)

= ∂ fi ∂xij I = ∂ fi ∂xij = ∂∂xij kij 1− Lij xij ⎛ ⎝ ⎜ ⎞ ⎠ ⎟ xij ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ = kij∂xij 1− Lij xij ⎛ ⎝ ⎜ ⎞ ⎠ ⎟ xij ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ = k ∂∂x 1− L x ⎛ ⎝⎜ ⎞ ⎠⎟ x ⎡ ⎣ ⎢ ⎤ ⎦ ⎥

: Let’s omit ij index for convenience = k 1− L x ⎛ ⎝⎜ ⎞ ⎠⎟ I + x ∂∂x 1− L x ⎛ ⎝⎜ ⎞ ⎠⎟ ⎧ ⎨ ⎪ ⎩⎪ ⎫ ⎬ ⎪ ⎭⎪ T ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ∵ ∂ ∂x[ f (x)x] = f (x)I + x ∂⎣⎢∂x f (x)⎦⎥ T ⎛ ⎝⎜ ⎞ ⎠⎟ ∂ ∂x 1− L x ⎛ ⎝⎜ ⎞ ⎠⎟ = ∂∂x x − L x ⎛ ⎝⎜ ⎞ ⎠⎟ = ∂∂x xTx − L xTx ⎛ ⎝ ⎜ ⎞ ⎠ ⎟ = ∂ ∂x x T x − L

(

)

xTx − x

(

Tx − L

)

∂x x T x ⎛ ⎝⎜ ⎞⎠⎟ xTx = 2x 2 xTx x T x − x

(

Tx − L

)

2x 2 xTx xTx = x − x − L

(

)

x x xTx = L x x xTx = L x x xTx ∴ ∂fi ∂xj = k 1− L x ⎛ ⎝⎜ ⎞ ⎠⎟ I + x L x x xTx ⎛ ⎝⎜ ⎞ ⎠⎟ T ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ = k 1− L x ⎛ ⎝⎜ ⎞ ⎠⎟ I + L x xxT xTx ⎡ ⎣ ⎢ ⎤ ⎦ ⎥ = k 1− L x ⎛ ⎝⎜ ⎞ ⎠⎟ I + xxT xTxxxT xTx + L x xxT xTx ⎡ ⎣ ⎢ ⎤ ⎦ ⎥ = k 1− L x ⎛ ⎝⎜ ⎞ ⎠⎟ I + xxT xTx − 1− L x ⎛ ⎝⎜ ⎞ ⎠⎟ xxT xTx ⎡ ⎣ ⎢ ⎤ ⎦ ⎥ = k xx T xTx + 1− L x ⎛ ⎝⎜ ⎞ ⎠⎟ I − 1− L x ⎛ ⎝⎜ ⎞ ⎠⎟ xxT xTx ⎡ ⎣ ⎢ ⎤ ⎦ ⎥ = k xx T xTx + 1− L x ⎛ ⎝⎜ ⎞ ⎠⎟ IxxT xTx ⎛ ⎝⎜ ⎞ ⎠⎟ ⎡ ⎣ ⎢ ⎤ ⎦ ⎥ = k xx T xTx + k 1− L x ⎛ ⎝⎜ ⎞ ⎠⎟ IxxT xTx ⎛ ⎝⎜ ⎞ ⎠⎟

(11)

∂fi ∂x j = kij xijxijT xijTxij + kij 1− Lij xij ⎛ ⎝ ⎜ ⎞ ⎠ ⎟ I − xijxij T xijTxij ⎛ ⎝⎜ ⎞ ⎠⎟

Geometric meaning of Jacobian

projection operator complementary projection operator X = x x a b y = a + b a = X ⋅ y

(

)

X = X X ⋅ y

(

)

= XX

( )

T y = x x xT x y = xxT xTx y = Pay Pa = xxT xTx : projection operator on x b = y − a = y − Pay = I − P

(

a

)

y = Pby Pb = I − xx T

xTx : complementary projection operator on x x

(12)

Stretch Force & Jacobian

for a Triangular Spring

(13)

static triangle per frame deformed triangle (uv-coordinate) (xyz-coordinate) (ui,vi ) (uj,vj ) (uk ,vk ) xk (xk , yk , zk ) xi (xi, yi, zi ) x j (x j, yj, zj ) S(u,v) = (x, y,z) x j − xi = Su

(

uj − ui

)

+ Sv

(

vj − vi

)

xk − xi = Su

(

uk − ui

)

+ Sv

(

vk − vi

)

x j − xi xk − xi ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ = uj − ui vj − vi uk − ui vk − vi ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ Su Sv ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ = uij vij uik vik ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ Su Sv ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ Su = ∂S ∂u , Sv = ∂ S ∂v : 3D vectors ⎛ ⎝⎜ ⎞⎠⎟ ∴ Su Sv ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ = uij vij uik vik ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ −1 x j − xi xk − xi ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ = 1 uijvik − vijuik vik −vij −uik uij ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ x j − xi xk − xi ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ Su = vik

(

x j − xi

)

− vij

(

xk − xi

)

2A Sv = −uik

(

x j − xi

)

+ uij

(

xk − xi

)

2A

Triangle based Stretch Spring (Baraff’s 98)

∂Su ∂xi = vij − vik 2A ∂Sv ∂xi = uik − uij 2A ∂Su ∂x j = vik 2A ∂Su ∂xk = −vij 2A ∂Sv ∂x j = − uik 2A ∂Sv ∂xk = uij 2A

3D vectors scalar values

= 1 2A vik −vij −uik uij ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ x j − xi xk − xi ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ A = areauv = uijvik − vijuik 2 ⎛ ⎝⎜ ⎞ ⎠⎟

(14)

fi = − ∂Eij ∂xi = kij 1− Lij xij ⎛ ⎝ ⎜ ⎞ ⎠ ⎟ xij (elastic energy) (force) (Jacobian) Et = At kt 2

(

Su −1

)

2 + At kt 2

(

Sv −1

)

2 fi = − ∂Et ∂xi = Atkt 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ Su ∂Su ∂xi + 1− 1 Sv ⎛ ⎝⎜ ⎞ ⎠⎟ Sv ∂Sv ∂xi ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ = At kt ∂Su ∂xi ∂Su ∂x j SuSuT SuTSu + Atkt 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ ∂Su ∂xi ∂Su ∂x j ISuSuT SuTSu ⎛ ⎝⎜ ⎞ ⎠⎟ (elastic energy) (force) (Jacobian)

Stretch “Linear” Spring Stretch “Triangular” Spring

∂fi ∂x j = kij xijxijT xijTxij + kij 1− Lij xij ⎛ ⎝ ⎜ ⎞ ⎠ ⎟ I − xijxij T xijTxij ⎛ ⎝⎜ ⎞ ⎠⎟ ∂fi ∂x j +Atkt ∂Sv ∂xi ∂Sv ∂x j SvSvT SvTSv + Atkt 1− 1 Sv ⎛ ⎝⎜ ⎞ ⎠⎟ ∂Sv ∂xi ∂Sv ∂x j ISvSvT SvTSv ⎛ ⎝⎜ ⎞ ⎠⎟ Eij = kij 2

(

xij − Lij

)

2

(Lij : rest length)

(

t : triangle index

)

1: rest stretch ratio

(15)

proof) fi = − ∂Eij ∂xi = kij 1− Lij xij ⎛ ⎝ ⎜ ⎞ ⎠ ⎟ xij

from the equation

For the force in u − direciton

By chain rule, fi = Atkt 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ Su ∂Su ∂xi ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ let kij = Atkt, xij = Su , and Lij = 1. By chain rule, fi = At kt 1− 1 Sv ⎛ ⎝⎜ ⎞ ⎠⎟ Sv ∂Sv ∂xi ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ let kij = Atkt, xij = Sv, and Lij = 1. ∴fi = Atkt 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ Su ∂Su ∂xi ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ + Atkt 1− 1 Sv ⎛ ⎝⎜ ⎞ ⎠⎟ Sv ∂Sv ∂xi ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ fi = − ∂Et ∂xi = Atkt 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ Su ∂Su ∂xi + 1− 1 Sv ⎛ ⎝⎜ ⎞ ⎠⎟ Sv ∂Sv ∂xi ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥

(16)

proof) ∂fi ∂x j = Atkt ∂Su ∂xi ∂Su ∂x j SuSuT SuTSu + At kt 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ ∂Su ∂xi ∂Su ∂x j ISuSuT SuTSu ⎛ ⎝⎜ ⎞ ⎠⎟ + Atkt ∂Sv ∂xi ∂Sv ∂x j SvSvT SvTSv + Atkt 1− 1 Sv ⎛ ⎝⎜ ⎞ ⎠⎟ ∂Sv ∂xi ∂Sv ∂x j ISvSvT SvTSv ⎛ ⎝⎜ ⎞ ⎠⎟ ∵ ∂ ∂x [ f (x)x] = f (x)I + x ∂⎣⎢∂x f (x)⎦⎥ T ⎛ ⎝⎜ ⎞ ⎠⎟ = Atkt ∂Su ∂xi ∂Su ∂x j ⋅ 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ I + Su∂Su 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ ⎧ ⎨ ⎪ ⎩⎪ ⎫ ⎬ ⎪ ⎭⎪ T ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ = Atkt ∂Su ∂xi ∂Su ∂x j ⋅ 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ I + Su 1 Su Su SuTSu ⎛ ⎝⎜ ⎞ ⎠⎟ T ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ∵ ∂ ∂x 1− L x ⎛ ⎝⎜ ⎞ ⎠⎟ = L x x xTx ⇒ ∂∂Su 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ = 1 Su Su SuTSu ⎛ ⎝⎜ ⎞ ⎠⎟ = Atkt ∂Su ∂xi ∂Su ∂x j ⋅ 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ I + 1 Su SuSuT SuTSu ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ = Atkt ∂Su ∂xi ∂Su ∂xj ⋅ 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ I + SuSuT SuTSuSuSuT SuTSu 1 Su SuSuT SuTSu ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ = Atkt ∂Su ∂xi ∂Su ∂xj ⋅ 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ I + SuSuT SuTSu − 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ SuSuT SuTSu ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ = Atkt ∂Su ∂xi ∂Su ∂x jSuSuT SuTSu + 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ ISuSuT SuTSu ⎛ ⎝⎜ ⎞ ⎠⎟ ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ = Atkt ∂Su ∂xi ∂Su ∂xj SuSuT SuTSu + Atkt 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ ∂Su ∂xi ∂Su ∂x j ISuSuT SuTSu ⎛ ⎝⎜ ⎞ ⎠⎟ u − direciton : ∂fi ∂xj = ∂ fi ∂Su ∂Su ∂x j = ∂ Su ∂xj ∂fi ∂Su = ∂ Su ∂xj∂Su Atkt 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ Su ∂Su ∂xi ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ = Atkt ∂Su ∂xi ∂Su ∂x j ⋅ ∂∂Su 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ Su ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ v − direciton : ∂fi ∂xj = Atkt ∂Sv ∂xi ∂Sv ∂xj SvSvT SvTSv + Atkt 1− 1 Sv ⎛ ⎝⎜ ⎞ ⎠⎟ ∂Sv ∂xi ∂Sv ∂x j ISvSvT SvTSv ⎛ ⎝⎜ ⎞ ⎠⎟ in a similar way ∴ ∂fi ∂x j = ∂ fi ∂xj ⎛ ⎝⎜ ⎞ ⎠⎟u + ∂ fi ∂xj ⎛ ⎝⎜ ⎞ ⎠⎟ v = Atkt ∂Su ∂xi ∂Su ∂x j SuSuT SuTSu + Atkt 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ ∂Su ∂xi ∂Su ∂xj ISuSuT SuTSu ⎛ ⎝⎜ ⎞ ⎠⎟ + Atkt ∂Sv ∂xi ∂Sv ∂x j SvSvT SvTSv + Atkt 1− 1 Sv ⎛ ⎝⎜ ⎞ ⎠⎟ ∂Sv ∂xi ∂Sv ∂x j ISvSvT SvTSv ⎛ ⎝⎜ ⎞ ⎠⎟

(17)

fi = − ∂Et ∂xi = At kt 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ Su ∂Su ∂xi + 1− 1 Sv ⎛ ⎝⎜ ⎞ ⎠⎟ Sv ∂Sv ∂xi ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ fj = − ∂Et ∂x j = Atkt 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ Su ∂Su ∂x j + 1− 1 Sv ⎛ ⎝⎜ ⎞ ⎠⎟ Sv ∂Sv ∂x j ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ fk = − ∂Et ∂xk = At kt 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ Su ∂Su ∂xk + 1− 1 Sv ⎛ ⎝⎜ ⎞ ⎠⎟ Sv ∂Sv ∂xk ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ Forces ∂fi ∂x j = ∂fj ∂xi ⎛ ⎝⎜ ⎞ ⎠⎟ = Atkt ∂Su ∂xi ∂Su ∂x j SuSuT SuTSu + 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ ISuSuT SuTSu ⎛ ⎝⎜ ⎞ ⎠⎟ ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ + Atkt ∂Sv ∂xi ∂Sv ∂x j SvSvT SvTSv + 1− 1 Sv ⎛ ⎝⎜ ⎞ ⎠⎟ ISvSvT SvTSv ⎛ ⎝⎜ ⎞ ⎠⎟ ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ∂fi ∂xk = ∂ fk ∂xi ⎛ ⎝⎜ ⎞ ⎠⎟ = Atkt ∂Su ∂xi ∂Su ∂xk SuSuT SuTSu + 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ ISuSuT SuTSu ⎛ ⎝⎜ ⎞ ⎠⎟ ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ + At kt ∂Sv ∂xi ∂Sv ∂xk SvSvT SvTSv + 1− 1 Sv ⎛ ⎝⎜ ⎞ ⎠⎟ ISvSvT SvTSv ⎛ ⎝⎜ ⎞ ⎠⎟ ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ∂fj ∂xk = ∂ fk ∂x j ⎛ ⎝⎜ ⎞ ⎠⎟ = Atkt ∂Su ∂x j ∂Su ∂xk SuSuT SuTSu + 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ ISuSuT SuTSu ⎛ ⎝⎜ ⎞ ⎠⎟ ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ + Atkt ∂Sv ∂x j ∂Sv ∂xk SvSvT SvTSv + 1− 1 Sv ⎛ ⎝⎜ ⎞ ⎠⎟ ISvSvT SvTSv ⎛ ⎝⎜ ⎞ ⎠⎟ ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ Jacobians ∂Su ∂xi = vij − vik 2A ∂Sv ∂xi = uik − uij 2A ∂Su ∂x j = vik 2A ∂Su ∂xk = −vij 2A ∂Sv ∂x j = − uik 2A ∂Sv ∂xk = uij 2A

(18)

Shear Force & Jacobian

for a Triangular Spring

(19)

Shear “Triangular” Spring

Replace

S

u

→ S

(

u

+ S

v

)

S

v

→ S

(

u

− S

v

)

1

→ 2

Et = At kt 2

(

Su −1

)

2 + At kt 2

(

Sv −1

)

2 fi = − ∂Et ∂xi = Atkt 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ Su ∂Su ∂xi + 1− 1 Sv ⎛ ⎝⎜ ⎞ ⎠⎟ Sv ∂Sv ∂xi ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ = Atkt ∂Su ∂xi ∂Su ∂x j SuSuT SuTSu + Atkt 1− 1 Su ⎛ ⎝⎜ ⎞ ⎠⎟ ∂Su ∂xi ∂Su ∂x j ISuSuT SuTSu ⎛ ⎝⎜ ⎞ ⎠⎟ (elastic energy) (force) (Jacobian) ∂fi ∂x j +Atkt ∂Sv ∂xi ∂Sv ∂x j SvSvT SvTSv + At kt 1− 1 Sv ⎛ ⎝⎜ ⎞ ⎠⎟ ∂Sv ∂xi ∂Sv ∂x j ISvSvT SvTSv ⎛ ⎝⎜ ⎞ ⎠⎟ t : triangle index

(

)

1: rest stretch ratio

(

)

Caution) Shearing force may be unstable espetially using without stretching force. Also, shearing force cannot detect reverse triangle.

(20)

Bend Force & Jacobian

for a Triangular Spring

(21)

x1 x2 x3 x4 x34 = x4 − x3 : bending element (elastic energy) E = k 2

θ

2 (

θ

: the angle between triangle x

134 and triangle x243) n1 n2 n1 = x13 × x14 = x

(

3 − x1

)

× x

(

4 − x1

)

n2 = x24 × x23 = x

(

4 − x2

)

× x

(

3 − x2

)

cos

θ

= n1 ⋅n2 n1 ⋅ n2

θ

= cos −1 n1 ⋅n2 n1 ⋅ n2 ⎛ ⎝⎜ ⎞ ⎠⎟

(22)

fi = − ∂E ∂xi = − ∂∂xi k 2

θ

2 ⎛ ⎝⎜ ⎞⎠⎟ = −k

θ

∂x

θ

i = k

θ

sin

θ

∂xi

(

cos

θ

)

∵ ∂ ∂xi

(

cos

θ

)

= −sin

θ

θ

∂xi = k

θ

sin

θ

⋅ ∂∂xi n1 ⋅n2 n1 ⋅ n2 ⎛ ⎝⎜ ⎞ ⎠⎟ ∵cos

θ

= n1 ⋅n2 n1 ⋅ n2∂xi n1 ⋅n2 n1 ⋅ n2 ⎛ ⎝⎜ ⎞ ⎠⎟ = ∂ ∂xi

(

n1 ⋅n2

)

⎡ ⎣ ⎢ ⎤ ⎦ ⎥⋅ n

(

1 ⋅ n2

)

− n

(

1 ⋅n2

)

⋅ ∂∂x i n1 ⋅ n2

(

)

⎡ ⎣ ⎢ ⎤ ⎦ ⎥ n1 2 ⋅ n2 2 ∵ ∂ ∂x f g ⎛ ⎝⎜ ⎞ ⎠⎟ = ∂ f ∂x g − f ∂ g ∂x g2 ∂ ∂xi

(

n1 ⋅n2

)

= ∂ n1 ∂xi ⎛ ⎝⎜ ⎞ ⎠⎟ T n2 + ∂n2 ∂xi ⎛ ⎝⎜ ⎞ ⎠⎟ T n1∂xi

(

n1 ⋅ n2

)

= ∂ n1 ∂xi ⋅ n2 + n1 ⋅ ∂ n2 ∂xi = ∂ n1 ∂xi ⎛ ⎝⎜ ⎞ ⎠⎟ T n1 n1 ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥⋅ n2 + n1 ⋅ ∂ n2 ∂xi ⎛ ⎝⎜ ⎞ ⎠⎟ T n2 n2 ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ∵ ∂( u ) ∂w = ∂ u ∂w ⎛ ⎝⎜ ⎞⎠⎟ T u u = n2 n1 ⋅ ∂ n1 ∂xi ⎛ ⎝⎜ ⎞ ⎠⎟ T n1 ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ + n1 n2 ⋅ ∂ n2 ∂xi ⎛ ⎝⎜ ⎞ ⎠⎟ T n2 ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ∵ ∂(u⋅v) ∂w = ∂ u ∂w ⎛ ⎝⎜ ⎞⎠⎟ T v + ∂v ∂w ⎛ ⎝⎜ ⎞⎠⎟ T u ∴fi = k

θ

sin

θ

1 n1 ⋅ n2 ∂n1 ∂xi ⎛ ⎝⎜ ⎞ ⎠⎟ T n2 + 1 n1 ⋅ n2 ∂n2 ∂xi ⎛ ⎝⎜ ⎞ ⎠⎟ T n1n1 ⋅n2 n1 2 ⋅ n2 2 n2 n1 ∂n1 ∂xi ⎛ ⎝⎜ ⎞ ⎠⎟ T n1n1 ⋅n2 n1 2 ⋅ n2 2 n1 n2 ∂n2 ∂xi ⎛ ⎝⎜ ⎞ ⎠⎟ T n2 ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥

(23)

from ∂(u × v) ∂w = u * ∂v ∂w − v * ∂u ∂w ∂n1 ∂xi = ∂∂xi ⎡⎣

(

x3 − x1

)

× x

(

4 − x1

)

⎤⎦ = x

(

3 − x1

)

* ∂ ∂xi

(

x4 − x1

)

− x

(

4 − x1

)

* ∂ ∂xi

(

x3 − x1

)

∂n2 ∂xi = ∂∂xi ⎡⎣

(

x4 − x2

)

× x

(

3 − x2

)

⎤⎦ = x

(

4 − x2

)

* ∂ ∂xi

(

x3 − x2

)

− x

(

3 − x2

)

* ∂ ∂xi

(

x4 − x2

)

∂n1 ∂x1 = x

(

3 − x1

)

* ∂ ∂x1

(

x4 − x1

)

− x

(

4 − x1

)

* ∂ ∂x1

(

x3 − x1

)

= − x

(

3 − x1

)

* + x

(

4 − x1

)

* = x

(

4 − x3

)

* = x*34 ∴ ∂n1 ∂x1 ⎛ ⎝⎜ ⎞ ⎠⎟ T = −x*34 ∂n1 ∂x2 = x

(

3 − x1

)

* ∂ ∂x2

(

x4 − x1

)

− x

(

4 − x1

)

* ∂ ∂x2

(

x3 − x1

)

= 0 − 0 = 0 ∴ ∂n1 ∂x2 ⎛ ⎝⎜ ⎞ ⎠⎟ T = 0 ∂n1 ∂x3 = x

(

3 − x1

)

* ∂ ∂x3

(

x4 − x1

)

− x

(

4 − x1

)

* ∂ ∂x3

(

x3 − x1

)

= 0 − x

(

4 − x1

)

* = −x14* ∴ ∂n1 ∂x3 ⎛ ⎝⎜ ⎞ ⎠⎟ T = x14* ∂n1 ∂x4 = x

(

3 − x1

)

* ∂ ∂x4

(

x4 − x1

)

− x

(

4 − x1

)

* ∂ ∂x4

(

x3 − x1

)

= x

(

3 − x1

)

* − 0 = x13* ∴ ∂n1 ∂x4 ⎛ ⎝⎜ ⎞ ⎠⎟ T = −x13* ∂n2 ∂x1 = x

(

4 − x2

)

* ∂ ∂x1

(

x3 − x2

)

− x

(

3 − x2

)

* ∂ ∂x1

(

x4 − x2

)

= 0 − 0 = 0 ∴ ∂n2 ∂x1 ⎛ ⎝⎜ ⎞ ⎠⎟ T = 0 ∂n2 ∂x2 = x

(

4 − x2

)

* ∂ ∂x2

(

x3 − x2

)

− x

(

3 − x2

)

* ∂ ∂x2

(

x4 − x2

)

= − x

(

4 − x2

)

* + x

(

3 − x2

)

* = x

(

3 − x4

)

* = −x*34 ∴ ∂n2 ∂x2 ⎛ ⎝⎜ ⎞ ⎠⎟ T = x*34 ∂n2 ∂x3 = x

(

4 − x2

)

* ∂ ∂x3

(

x3 − x2

)

− x

(

3 − x2

)

* ∂ ∂x3

(

x4 − x2

)

= x

(

4 − x2

)

* − 0 = −x*24 ∴ ∂n2 ∂x3 ⎛ ⎝⎜ ⎞ ⎠⎟ T = x*24 ∂n2 ∂x4 = x

(

4 − x2

)

* ∂ ∂x4

(

x3 − x2

)

− x

(

3 − x2

)

* ∂ ∂x4

(

x4 − x2

)

= 0 − x

(

3 − x2

)

* = −x*23 ∴ ∂n2 ∂x4 ⎛ ⎝⎜ ⎞ ⎠⎟ T = x*23

(24)

f1 = kθ sinθ 1 n1 ⋅ n2 ∂n1 ∂x1 ⎛ ⎝⎜ ⎞ ⎠⎟ T n2 + 1 n1 ⋅ n2 ∂n2 ∂x1 ⎛ ⎝⎜ ⎞ ⎠⎟ T n1n1 ⋅n2 n1 2 ⋅ n2 2 n2 n1 ∂n1 ∂x1 ⎛ ⎝⎜ ⎞ ⎠⎟ T n1n1 ⋅n2 n1 2 ⋅ n2 2 n1 n2 ∂n2 ∂x1 ⎛ ⎝⎜ ⎞ ⎠⎟ T n2 ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ = kθ sinθ 1 n1 ⋅ n2 −x34 *

( )

n2 + 1 n1 ⋅ n2 ( )0 n1 − n1 ⋅n2 n1 2 ⋅ n2 2 n2 n1 −x34 *

( )

n1n1 ⋅n2 n1 2 ⋅ n2 2 n1 n2 ( )0 T n2 ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥

수치

Updating...

참조

Updating...

관련 주제 :