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
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
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
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