rigid body dynamics - caucau.ac.kr/~kjpark/courses/2008_2_ca/lec9.pdf · 2008-12-02 ·...
TRANSCRIPT
Rigid Body Dynamics
Kyoungju ParkKyoungju Park
중앙대학교 첨단영상대학원 박 경 주
In MayaIn Maya
Ri id b d 란?• Rigid body란?– 모양이 불변하는 surface– 애니메이션 도중에 collide (rather than pass
through)D i 시뮬레이션에 사용– Dynamics 시뮬레이션에 사용
• To animate rigid body motion– Fields, keyframes, expressions, rigid body
i lli i i h i l hconstraints or collisions with particles or other rigid bodies
중앙대학교 첨단영상대학원 박 경 주
Constraints(Maya)Constraints(Maya)
움직임을 제한• 움직임을 제한• pins, nails, barriers, hinges 와
springs 과 같은 행동을 시뮬레이션springs 과 같은 행동을 시뮬레이션할 때 사용
• Hinge constraints– Rigid body의 특정 축 방향으로 속박
D hi li k ti t i• Door on a hinge, link connecting train cars, pendulum of a clock
• Y축으로 90도까지만 회전가능하도록 속박박
•
중앙대학교 첨단영상대학원 박 경 주
Running a dynamics simulation(Maya)Running a dynamics simulation(Maya)
A ti• Active– Dynamics (fields, collisions, springs) 에 따른 애
니메이션 수행니메이션 수행– 예) ball 과 plank 가 충돌하면, 중력에 내려가던
ball이 plank 와 충돌후에 rebound 함p
• Passive– Active rigid body 와 충돌가능– Translation 과 rotation attributes 를 셋팅함– 예) 제일 아래 plank 가 충돌 후 아무 반응 없게
셋팅 가능
중앙대학교 첨단영상대학원 박 경 주
Maya 실습: Chap 8 2Maya 실습: Chap 8.2
중앙대학교 첨단영상대학원 박 경 주
Rigid body dynamicsRigid body dynamics
For objects with spatial extentParticle system is not enough
중앙대학교 첨단영상대학원 박 경 주
Rigid body dynamicsRigid body dynamics
Problems
• Unconstrained
Performance is important
simulation– No contact
• Constrained systemC lli i d t t– Collision and contact
C t l i thi !Control is everything!
중앙대학교 첨단영상대학원 박 경 주
Particle simulationParticle simulation
중앙대학교 첨단영상대학원 박 경 주
Rigid body conceptsRigid body concepts
중앙대학교 첨단영상대학원 박 경 주
Position and orientationPosition and orientation• Translation of the body ⎛ ⎞• Translation of the body
x( )x
t y⎛ ⎞⎜ ⎟= ⎜ ⎟⎜ ⎟
Rotation of the body
z⎜ ⎟⎜ ⎟⎝ ⎠
• Rotation of the body
xx yx zxr r r⎛ ⎞⎜ ⎟( )
xx yx zx
xy yy zyR t r r rr r r
⎜ ⎟= ⎜ ⎟⎜ ⎟⎝ ⎠
⇒Spacial variables of a rigid body
xz yz zzr r r⎜ ⎟⎝ ⎠
중앙대학교 첨단영상대학원 박 경 주
p g y
Body spaceBody space
중앙대학교 첨단영상대학원 박 경 주
Position and orientationPosition and orientation
중앙대학교 첨단영상대학원 박 경 주
Position and orientationPosition and orientation
• x(t) 와 R(t)를 사용해서body space 를 world space 로 transform
• Body 의 포인트 roi 의• Body 의 포인트 roi 의world coordinate 은?
중앙대학교 첨단영상대학원 박 경 주
Position and orientationPosition and orientation
• Rigid body 가 일정한 밀도라고 가정하면, x(t) 의 물리적 의미는?( ) 의 물리적 의미는– 질량의 중심 over time
• R(t) 의 물리적 의미는?– It’s a bit tricky
중앙대학교 첨단영상대학원 박 경 주
Position and orientationPosition and orientation
B d 의 축을 생각해 면 (1 0 0)• Body space 의 x축을 생각해보면, (1,0,0) 이라는 백터좌표를 가지고 있다. 시간 t 일때 ld di 에서의 이 벡터의 방때 world coordinate 에서의 이 벡터의 방향은?
1⎛ ⎞ ⎛ ⎞1( ) 0
xx
xy
rR t r
⎛ ⎞ ⎛ ⎞⎜ ⎟ ⎜ ⎟=⎜ ⎟ ⎜ ⎟⎜ ⎟ ⎜ ⎟
which is the first column of R(t)
축
0 xzr⎜ ⎟ ⎜ ⎟⎜ ⎟ ⎜ ⎟⎝ ⎠ ⎝ ⎠
• 따라서, R(t) 는 body space 의 x, y, z 축을world space at time t 로 나타내게 된다.
중앙대학교 첨단영상대학원 박 경 주
Position and orientationPosition and orientation
• 그러므로 x(t) 와 R(t) 는 시간 t 일 때 rigid body 의 position과 orientation 을 정의한y 의 p 과 을 정의한다
• Next, position 과 orientation 은 시간이p흐름에 따라 어떻게 변화하는가에 관한 정의가 필요!의가 필요!
중앙대학교 첨단영상대학원 박 경 주
velocityvelocity
Linear velocityLinear velocity
Angular velocityCOM(center of mass) 의 위치를 고정한다면
어떤 움직임이든 COM 을 지나가는 축을 기준으로 b d i i 으어떤 움직임이든 COM 을 지나가는 축을 기준으로 body spinning 으로 야기됨
그렇지 않다면 COM 자체가 움직임
중앙대학교 첨단영상대학원 박 경 주
그렇지 않다면, COM 자체가 움직임
Angular velocityAngular velocity
S i 을 t ( )t• Spin 을 vector– Direction?– Magnitude?
( )tω
Magnitude?
• Linear position 과 velocity 는
• Angular position(orientation) 과 angular velocity 는 어
중앙대학교 첨단영상대학원 박 경 주
Angular position(orientation) 과 angular velocity 는 어떤 관계?
Angular velocityAngular velocity
H R( ) d 의 관계는?( )tω• How are R(t) and 의 관계는?( )tω
• Hint:Hint:– 시간 t, world space 에서의
벡터 r(t) 를 고려하면, r(t)의 순각적인 속도 값은
( ) ( ) ( )r t b t t bω ω= = ×( ) ( ) ( )r t b t t bω ω ×
( ) ( ) ( ) ( ) ( ) ( )r t t b t b t a t b aω ω ω ω= × = × + × = × +
중앙대학교 첨단영상대학원 박 경 주( ) ( ) ( )r t t r tω= ×
Angular velocityAngular velocity
의 리적 을 려할때 의 l 어떤 의( )R• R(t) 의 물리적 뜻을 고려할때, 의 column 은 어떤 의미?
( )Rt
• 시간 t 일 때, rigid body 의 x 축방향은(world space) 에R(t) 의 첫번째 column 임R(t) 의 첫번째 column 임
xxrr⎛ ⎞⎜ ⎟⎜ ⎟
시간 t 에서 R(t) 의 첫번째 l 의 d i ti 는?
xy
xz
rr⎜ ⎟⎜ ⎟⎝ ⎠
• 시간 t 에서, R(t) 의 첫번째 column 의 derivative는?
중앙대학교 첨단영상대학원 박 경 주
Angular velocityAngular velocity
중앙대학교 첨단영상대학원 박 경 주
Angular velocityAngular velocity
V t l ti ( ) ( ) ( )r t t r tω ×Vector relation:
Matrix relation:
( ) ( ) ( )r t t r tω= ×
중앙대학교 첨단영상대학원 박 경 주
Perspective of particlePerspective of particle
• Rigid body 가 수많은 수의 조그마한particle 로 이루어져있다고 상상p 이루어져있다 상상– Particle 은 1 부터 N 까지 인덱스 되어지고
각각의 particle 은 body space에서 위치 불– 각각의 particle 은 body space에서 위치 불변시간 t 에서 i 번째 ti l 의 ld 에– 시간 t 에서 i 번째 particle의 world space 에서의 위치는
중앙대학교 첨단영상대학원 박 경 주
Velocity of a particleVelocity of a particle
Angular velocity Linear velocityAngular velocity Linear velocity
중앙대학교 첨단영상대학원 박 경 주
Next classNext class
• Mass, inertia• momentum• Force/torque
And….constrained dynamics(collision/contact)
중앙대학교 첨단영상대학원 박 경 주