420 likes | 436 Views
This paper explores the concept of illusory motion using repeated asymmetric patterns. The authors propose a method called RAP (Repeated Asymmetric Patterns) that utilizes the direction of the patterns to create the illusion of motion. The paper discusses the basic idea of RAP, its applications, and its implementation using OpenGL graphics pipeline.
E N D
Viewing Transformation Tong-Yee Lee
Self-Animating Images: Illusory Motion Using Repeated Asymmetric Patterns (Siggraph 2008) • Basic Idea: • RAP has its direction • Use RAP direction to follow flow direction
Front and Back Clipping Planes • Frustum • Volume of space between front and back clipping planes • What camera can see – what drawn on screen • Near and far clipping planes defined by distance along Look Vector • Objects appearing outside of view volume don't get drawn • Objects intersecting view volume get clipped
OpenGL: Field of View, gluPerspectiveYet another way to set viewing front plane aspect = w/h • Can always use: glFrustum(left, right, bottom, top, near, far) • This is certainly sufficient • But may be inconvenient in some applications • Can be difficult to get desired view • May want to use: gluPerspective(fovy, aspect, near, far) • specifies field of view along y axis • angle θ made by the sides of frustum • aspect ratio of viewport • just (width / height)
Back-face culling (trivial rejection) One method of implementing back-face culling is by discarding all triangles where the dot product of their surface normal and the camera-to-triangle vector is greater than or equal to zero where P is the view point, V0 is the first vertex of a triangle and N is its normal, defined as a cross product of two vectors representing sides of the triangle adjacent to V0 N V2 Reject condition P V1 V0
Back-face culling (trivial rejection) Group average normal v if degree(v, E_eye)<=90+ᵟ E_eye p
X axis vector Y axis vector Z axis vector
Not easy for user to pick up exact up vector!! So, we compute v automatically from up vector.
俯仰 偏航 翻滾 u (i.e., x) axis n (i.e.,z) axis v (i.e., y) axis Treat yourself (viewer) as a airplane heading to –Zc Note that: as a viewer is moving, the object is moving in opposite direction on the viewing plane!!
How about slide() • Sliding a camera means to move it along one of its own axes-that is in the u,v,n direction-without rotating it. • Along n means forward or backward • Along u is left and right • Along v is up and down • Assume slide(delU, delV, delN) 延camera座標軸 walking
Flythrough a Scene!!! ‘P’-64 =ctrl+‘P’ Homework #2 (optional) Add this camera control!!
Light v.s. Eye coordinate Camera Frame
Motion Overview of Human Actions http://graphics.csie.ncku.edu.tw/Motion_Overview/ Same v.s. Different camera paths for different motions
v’ n’ n u n’ u’ v n This is x-like rotation (pitch) This is y-like rotation (yaw)