G RAPHICS P ROGRAMMING Lecture 3 - Simple Animation - Simple 3D Drawing.

Slides:



Advertisements
Similar presentations
Animation Marco Gillies. Computer Animation Making things move A key aspect of computer graphics Non-realtime for films Realtime for virtual worlds and.
Advertisements

Multimedia Authoring1 Animation What is Animation Animation is defined as the act of making something come alive. It is concerned with the visual or aesthetic.
Graphics You draw on a Graphics object The Graphics object cannot directly be created by your code, instead one is generated when the method paintComponent.
A Quick Introduction to Processing
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Programming Project 1 Truth Table Lecture 03, file P1 Due January.
Unit 6 – Multimedia Element: Animation
Processing Processing is a simple programming environment that was created to make it easier to develop visually oriented applications with an emphasis.
Processing Edges We rely on edges for information about the the uniform regions between them. When we see something, we first look for edges and then fill.
Macromedia Flash MX 2004 – Design Professional Animations CREATING.
Vertical Retrace Interval An introduction to VGA techniques for smooth graphics animation.
Lecture 17: Animation Yoni Fridman 7/27/01 7/27/01.
FLASH Introduction to Animation. Review: Intro to Computer Operation Information Technology Vocabulary Computer Hardware Motherboard CPU and Memory Peripheral.
1 Flash and Animation Presented by : Behzad Sajed Khosrowshahi.
Chapter 8 – Part I Interactive Multimedia Authoring with Flash: Animation “Computers and Creativity” Richard D. Webster, COSC 109 Instructor Office: 7800.
Animation Theory.
Animation. Where did animation start from? The original Steamboat Willie animation from Disney Each single frame was painted onto a cell – like a sheet.
Text. Graphics Images – photos Animation Video Audio Text Copyright issues.
ITIS 1210 Introduction to Web-Based Information Systems Chapter 41 How Animation on the Web Works.
2 What is pyGame? A set of Python modules to make it easier to write games. –home page: –documentation:
Using Coordinate Geometry to Create Moving Images In unit 29 we created a simple drawing for the background of a children’s game. We are going to start.
Faculty of Sciences and Social Sciences HOPE Website Development Graphics Stewart Blakeway FML 213
Dm11 – Flash Creating Animations Animations CREATING.
GCSE Computing#BristolMet Session Objectives#9 MUST identify the data needed for a computer to display an image correctly (metadata) SHOULD describe the.
Click your mouse for next slide Flash – Introduction and Startup Many times on websites you will see animations of various sorts Many of these are created.
CIS 205—Web Design & Development Flash Chapter 1 Getting Started with Adobe Flash CS3.
Images.  Images include graphics, such as backgrounds, color schemes and navigation bars, and photos and other illustrations  An essential part of a.
Animated text created using What is it?
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 14 Introduction to Computer Graphics.
1-1 OBJ Copyright 2003, Paradigm Publishing Inc. Dr. Joseph Otto Silvia Castaneda Christopher deCastro CSULA Macromedia Flash MX Introduction.
Flash Macromedia Flash Introduction. Bitmap vs. Vector based  Bitmap –Bitmaps are made up of single pixels  Vector based –Vector graphics are made up.
Announcements Assignment 9 is due Project 2 is due 7/27/04 We will be skipping chapter 22 Test 3 (chapters 18-21) will be on 7/29/04 Tip of the Day : Functions.
Java Programming, Second Edition Chapter Seventeen Multithreading and Animation.
General Information: This document was created for use in the "Bridges to Computing" project of Brooklyn College. This work is licensed under the Creative.
Introduction to Flash. Topics What is Flash? What can you do with it? Simple animation Complex interactive web application, such as an online store. Starting.
Flash Adobe Flash Introduction Kyungeun Park. Bitmap vs. Vector based  Bitmap –Bitmaps are made up of single pixels  Vector based –Vector graphics are.
Programming games Show your version of Bo the dog. Start cannonball Preview: video, audio work session (cannonball) Homework: Cannonball with ball in a.
Frame, Timeline and Vector Animation. Purposes of Animation Capture viewers attention –exampleexample Explain a system or process –exampleexample Set.
Multimedia Animation. Animation Principles Persistence of vision object seen by human eye remains mapped on retina for a brief time after viewing display.
What is animation? Animation is the rapid display of a sequence of images in order to create an illusion of movement.
Frame, Timeline and Vector Animation. Purposes of Animation Capture viewers attention –exampleexample Explain a system or process –exampleexample Set.
Animation Basic Concepts.
Flash CS 5 Interface BY NSCHEWCZYK | ©2012. MENU BAR A bar at the top of the window. It lists menu options including: File, Edit, View, Insert, Modify,
B. RAMAMURTHY Simulating Motion and Implementing Animation.
Reference: The Game Loop Animation / Game loop 1. Update variables 2. [Get input from the user] (GameLoop only) 3. Draw (using variables)
CIS 3.5 Lecture 2.2 More programming with "Processing"
Intro to Multimedia Unit 1.
Objects. The Heart of the Matter - The "Black Box" Object-oriented software is all about objects. An object is a "black box" which receives and sends.
“ Animation Through the Ages” Camelia McCallion. Main tasks What is computer animation? Hand drawn (cel) Flick books Animated cartoon Animation process.
Lesson 3: Arrays and Loops. Arrays Arrays are like collections of variables Picture mailboxes all lined up in a row, or storage holes in a shelf – You.
Anglo - SaxonsVisigoths Click for instructions on how to create this task.
File Input and Graphics An extract of slides from set 05_inout.ppt Designed to get you ready for the HW3.
Computer Science I Recap: variables & functions. Images. Pseudo-random processing.
G RAPHICS & I NTERACTIVE P ROGRAMMING Lecture 2 More Programming with Processing.
Computer Science I Animations. Bouncing ball. The if statement. Classwork/homework: bouncing something. Compress and upload work to Moodle.
Computer Science I More class examples. Paths. Jigsaw. Tolerance. Classwork/homework: Your class project. Post proposal for midterm project.
Introduction to Animation In animation, a series of images are rapidly changed to create an illusion of movement.
Animation in flash. Frame-by-Frame Animation An animation is made from a series of framed images displayed one after the other to create the motion. Flash.
Introducing Scratch Learning resources for the implementation of the scenario
CPT 450 Computer Graphics 12th Lecture – Animation.
David Meredith Aalborg University
Computer Graphics Lecture 3 Computer Graphics Hardware
Flash Interface, Commands and Functions
More on Graphical User Interfaces
Flash animation For beginners.
Objective % Explain concepts used to create digital animation.
More programming with "Processing"
Lecture 7: Introduction to Processing
Programming for Art: Images
CS297 Graphics with Java and OpenGL
Objective Explain concepts used to create digital animation.
Presentation transcript:

G RAPHICS P ROGRAMMING Lecture 3 - Simple Animation - Simple 3D Drawing

R ESOURCES Processing web site: Linear motion (moving stuff around): Bitmap animation (swapping pictures): Reference: MORE MORE MORE TUTORIALS

C ONTENT 1.On Human Perception 2.Animation 1.Vector Animation 2.Bitmap Animation 3.Movement and Animation 4.3D Images

A NIMATION Basic animation involves the following steps: 1. Drawing initial frame - perhaps in setup(). 2. Waiting some amount of time (e.g., 1/60th of a second) Processing does that automatically 3. Erasing the screen. Usually be reapplying the background ( often the first thing we do in the draw( ) function). 4. Drawing the next frame/image/picture. 5. Repeating steps 2-4, until you are ready to stop animating. There are two basic ways to implement animation: Drawing your own shapes, text, etc. Displaying a GIF or other image file There are issues with the "frame rate" that we choose.

O N H UMAN P ERCEPTION Human eyes and brains are unable to process properly images that are moving to fast. One famous example of this (which we can demonstrate) is the "flicker fusion" test. A black box and a white box are alternately presented in the same exact place on the screen. We change the frame rate so that those two boxes are alternated at faster and faster speeds. Depending on the ambient light, at somewhere between 30 and 60 frames per second you will see a only a single grey box. You may need to slow down your own animations to frames per second in order for some aspects of your animation to be visible. Most movies are and games are animated around the frames per second rate.

B ITMAP A NIMATION (1) In Bitmap Animation we have a series of pictures, each of which is slightly different. We can achieve the illusion of animation, by presenting those different pictures rapidly in succession. In practical terms we will want to store our images in an array (a type of list).

B ITMAP A NIMATION (2) int numFrames = 4; // The number of frames in the animation int frame = 0; // The picture to draw PImage[ ] images = new PImage[numFrames]; // List of picture objects void setup() { size( 200, 200 ); frameRate( 30 ); images[0] = loadImage("PT_anim0000.gif"); images[1] = loadImage("PT_anim0001.gif"); images[2] = loadImage("PT_anim0002.gif"); images[3] = loadImage("PT_anim0003.gif"); } void draw() { frame = ( frame + 1 ) % numFrames; // Cycle through frames image( images[frame], 50, 50 ); }

V ECTOR A NIMATION (1) In Vector Animation we change the pictures that are drawn each frame by subtly modifying our mathematical code. In the example to the right, only one line of code is changed, in order to get the two different pictures. We can use a "gate" variable, to switch between drawing the different pictures each time.

V ECTOR A NIMATION (2) int v_image=0; void setup() { frameRate(20); } void draw() { background(#FFFFFF); // clears the screen quad( 40,40, 95,60, 95,50, 5,70); //body of the helicopter if(v_image == 0) { line(40,40, 80,30); // Line to the right v_image = 1; } else { line(40,40, 0,50); // Line to the left v_image = 0; }

A NIMATION AND M OVEMENT

A NIMATION AND M OVEMENT (V ECTOR ) int v_image=0; int xPos = 0; // x Position of our image. void setup() { frameRate(20); } void draw() { background(#FFFFFF); xPos = xPos -1; if(xPos < -95) { xPos = 95; } quad( 40+ xPos,40, 95+ xPos,60, 95+ xPos,50, 5+ xPos,70); if(v_image == 0) { line( 40+ xPos,40, 80+ xPos,30 ); v_image = 1; } else { line( 40+ xPo s,40, 0+ xPos,50 ); v_image = 0; }

A NIMATION AND M OVEMENT (B ITMAP ) int numFrames = 4; int frame = 0; int xPos = 0; PImage[] images = new PImage[numFrames]; void setup() {... // Same as before... load the four images } void draw() { background(#ffffff); frame = ( frame + 1 ) % numFrames; image( images[frame], 50+xPos, 50 ); xPos = (xPos + 5); if( xPos > width) { xPos = -100; }