n Old motion picture※ in Japan (1907) Computer Graphics Course @Waseda University YouTube: https://www.youtube.com/watch?v=aUS30ya14wY ※ Motion picture is directly translated to “活動写真” (katsudo-shashin), but it means slightly different one from motion picture (it’s movie) in English. Copyright
while incrementally updating it. n Nowadays, it is almost replaced by “computer animation”. Computer Graphics Course @Waseda University YouTube: https://www.youtube.com/watch?v=wT5WUjueWr4 Copyright
(Studio Ghibli Inc. 2015) Computer Graphics Course @Waseda University Movieclips Film Festivals & Indie Films (YouTube): https://www.youtube.com/watch?v=9lDrkokymLQ Copyright
Type Frame rates Made with TV animation 8 - 12 fps Hand drawing / CG Movie 24 fps Mostly CG (offline rendering) Video games 60 fps CG (real-time rendering) • Video games require interactivity → real-time rendering • Highly parallelized processing using GPU is more effective CPU vs GPU? See the movie below! https://www.youtube.com/watch?v=-P28LKWTzrI
and projection matrices n e.g., dolly zoom (both camera/projection matrices updated) n Rigid transform to objects n Controlled by model matrix Computer Graphics Course @Waseda University
between successive draws n Enable current FPS checking n Show FPS to window title n Individual animation controls to objects n One rotates 1 degree, the other rotates 2 degrees, etc. Computer Graphics Course @Waseda University
n Use sprintf (*1 to setup title text n Pass title text to glfwSetWindowTitle Computer Graphics Course @Waseda University *1) Visual Studio needs “#define _CRT_SECURE_NO_WARNINGS”
differently n 1st cube rotates 2 degree of angle in 1 frame. n 2nd cube rotates 1 degree of angle in 1 frame. Computer Graphics Course @Waseda University How can this be achieved?
1st cube and draw! glRotatef(theta * 2, 0, 1, 0); drawCube(); ... // Rotate 2nd cube and draw! glRotatef(theta, 0, 1, 0); drawCube(); This is a stupid solution! Take care the lifetime of “glRotatef”.
Rotate 1st cube and draw! glRotatef(theta * 2, 0, 1, 0); drawCube(); ... // Rotate 2nd cube and draw! glRotatef(theta, 0, 1, 0); drawCube(); ← Matrix rotates 1st cube by (2 * theta) ← Matrix rotates 1st cube by (theta + 2 * theta) → Matrix multiplication is accumulated! This is a stupid solution! Take care the lifetime of “glRotatef”.
queue = FIFO) n glPushMatrix → Stack a new matrix on the top n glPopMatrix → Pop the matrix on the top Computer Graphics Course @Waseda University Camera matrix gluLookAt Camera matrix glPushMatrix Identity matrix glRotatef Camera matrix Rotate matrix glPopMatrix Camera matrix
clock using glPushMatrix / glPopMatrix. n Hint: Use thin triangles/rectangle for second hand, minute hand and hour hand. n Hint: To get current time, “localtime()” in C can be useful. Computer Graphics Course @Waseda University
deprecated in Visual Studio n This affects sprintf, fprintf, scanf, fscanf, localtime, etc. n Specify this macro to either of following two: n Property sheet → “C++” → “Preprocessor” → “Preprocessor definition” n Topmost line of source code in which you use above methods. Computer Graphics Course @Waseda University