Marist School Computational Media. Processing Exercise 01 Bouncing Ball Animation. Description:



Similar documents
Mobile App Tutorial Animation with Custom View Class and Animated Object Bouncing and Frame Based Animation

The aim of this investigation is to verify the accuracy of Pythagoras Theorem for problems in three dimensions.

Graphic Objects and Loading Them into TGF2/MMF2

While Loops and Animations

How to create pop-up menus

Fireworks 3 Animation and Rollovers

Course Project Lab 3 - Creating a Logo (Illustrator)

Smart Board Notebook Software A guide for new Smart Board users

Fireworks CS4 Tutorial Part 1: Intro

Using Kid Pix Deluxe 3 (Windows)

WAYNESBORO AREA SCHOOL DISTRICT CURRICULUM INTRODUCTION TO COMPUTER SCIENCE (June 2014)

Autodesk Fusion 360: Assemblies. Overview

How to create buttons and navigation bars

1.0-Scratch Interface 1.1. Valuable Information

PowerPoint 2013: Basic Skills

Creating Animated Apps

Create a Presentation on Marketing. Intel Easy Steps Intel Corporation All rights reserved.

TRIGONOMETRY FOR ANIMATION

Using the ELMS Management Tool (EMT) to Create Independent Study Spaces in ELMS Canvas

Intro to 3D Animation Using Blender

3dCart Shopping Cart Software V3.X Rewards Points Guide

Graphic Design. Background: The part of an artwork that appears to be farthest from the viewer, or in the distance of the scene.

BallBounce: A simple game app

Advanced Presentation Features and Animation

Fireworks for Graphics and Images

PowerPoint 2007 Basics Website:

DESIGN A WEB SITE USING PUBLISHER Before you begin, plan your Web site

Microsoft Word Quick Reference Guide. Union Institute & University

The first step is to upload the Helicopter images from a strip. 1) Click on Resources > Create Sprite 2) Name it spr_helicopter 3) Click Edit Sprite

Welcome to CorelDRAW, a comprehensive vector-based drawing and graphic-design program for the graphics professional.

CSC Off Campus Network Access Instructions

Flash MX 2004 Animation Lesson

Outlook Calendar Tips & Tricks

Introduction to ANSYS ICEM CFD

Grade 6 Mathematics Performance Level Descriptors

Computer Basics: Tackling the mouse, keyboard, and using Windows

User Guide Thank you for purchasing the DX90

TUTORIAL 4 Building a Navigation Bar with Fireworks

Centurion PLUS CPC4 Download Guide

Publisher 2010 Cheat Sheet

Microsoft PowerPoint 2010 Computer Jeopardy Tutorial

Making Visio Diagrams Come Alive with Data

2. Select Point B and rotate it by 15 degrees. A new Point B' appears. 3. Drag each of the three points in turn.

Orders.java. ArrayList of Drinks as they are ordered. Functions to calculate statistics on Drinks

Using Patterns of Integer Exponents

Data Visualization. Brief Overview of ArcMap

Lesson 7 - Creating Animation II

Lession: 2 Animation Tool: Synfig Card or Page based Icon and Event based Time based Pencil: Synfig Studio: Getting Started: Toolbox Canvas Panels

Create a Poster Using Publisher

Making a Poster Using PowerPoint 2007

MicroStrategy Quick Guide: Creating Prompts ITU Data Mart Support Group, Reporting Services

You ve Got Mail Groupwise 6.5 for OSX

Number Sense and Operations

Making a Web Page with Microsoft Publisher 2003

CATIA Basic Concepts TABLE OF CONTENTS

Board Games. With Monkey Friends. 15 Multiplication Board Games to practice multiplication up to 10 x 10

P39 Financial USER MANUAL. Honor the Lord with your wealth, with the first fruits of your crops; Proverbs 3:9. Revision: 1

Click on various options: Publications by Wizard Publications by Design Blank Publication

Bates Gmail Labels, Filters, and Signatures

Using the Local Document Organizer in ProjectWise

Creating Appointment Groups using Scheduler

Introduction to the TI-Nspire CX

SMART Board Training Packet. Notebook Software 10.0

Chapter 1. Creating Sketches in. the Sketch Mode-I. Evaluation chapter. Logon to for more details. Learning Objectives

Making a Website with Hoolahoop

CDOT Linking Excel Documents to MicroStation

Shape 5 Flex Menu Plugin Tutorials

How to Build a Simple Pac-Man Game

Creating a Logo in CorelDRAW

An introduction to 3D draughting & solid modelling using AutoCAD

Using an Automatic Back Up for Outlook 2003 and Outlook 2007 Personal Folders

How to Login Username Password:

Graphs of Polar Equations

Introduction to Microsoft PowerPoint

Pro/ENGINEER Wildfire 4.0 Basic Design

Data Visualization. Prepared by Francisco Olivera, Ph.D., Srikanth Koka Department of Civil Engineering Texas A&M University February 2004

Adding A Student Course Survey Link For Fully Online Courses Into A Canvas Course

EDIT202 PowerPoint Lab Assignment Guidelines

Plotting: Customizing the Graph

Determine If An Equation Represents a Function

Using WINK to create custom animated tutorials

Using PowerPoint To Create Art History Presentations For Macintosh computers running OSX with Microsoft Office 2008

NIS-Elements Viewer. User's Guide

Adobe InDesign Creative Cloud

EQUIPMENT OVERVIEW... 4 SETTING UP CALL MANAGER...5

FREE FALL. Introduction. Reference Young and Freedman, University Physics, 12 th Edition: Chapter 2, section 2.5

INTRODUCTION TO DESKTOP PUBLISHING

Writer Guide. Chapter 15 Using Forms in Writer

Done. Click Done to close the Capture Preview window.

SMART NOTEBOOK 10. Instructional Technology Enhancing ACHievement

BallBounce: A simple game app

How to Use the Drawing Toolbar in Microsoft Word

Create a new file/canvas to work with by going to the file menu and selecting new.

Arena Tutorial 1. Installation STUDENT 2. Overall Features of Arena

Chapter 15 Using Forms in Writer

LEARNING RESOURCE CENTRE GUIDE TO OFFICE 365

Blender Notes. Introduction to Digital Modelling and Animation in Design Blender Tutorial - week 9 The Game Engine

MetroBoston DataCommon Training

User guide. Business

Transcription:

Marist School Computational Media Processing Exercise 01 Bouncing Ball Animation Description: In this exercise we will create an animation to show shapes moving and bouncing off the edges of the screen. We will model or represent the data for our moving objects with variables that store the values for position and speed. We will model our ball with four variables: Variables for Position of the ball: ballx -> Integer representing the horizontal position of the ball bally -> Integer representing the vertical position of the ball Variables for Speed of the ball: balldx -> Horizontal speed of the ball balldy -> Vertical speed of the ball Why DX and DY? D stands for delta or change of X and Y position. To create the animation of movement and bouncing, we will add change ballx by balldx and bally by balldy for each frame of the animation. In addition, we will use if statements to check the position of the ball against the edges and change the balldx or balldy to allow the ball to bounce off the edges of the screen.

Process: 1. Start processing and select File-Save and navigate to your Processing Projects folder in Computatational Media Lastname. Save the file as Lastname_Bouncing.

2. Type in the following comments to note your name and state the purpose of the project:

3. We will now define the variables for the x and y position of the ball:

4. We will now define the DX and DY for the ball. These variables control the speed of the ball, so we will set them to 10 for now.

5. We will set up the processing animation. Type the void setup() function outline as follows. Remember, when we run the program, setup() will only run one time.

6. Select Tools-Color Selector to pull up the color menu:

7. In the setup() function, define the size and color of the canvas. (You may pick any color you wish).

8. Click the Run icon and test the program. (Circle with triangle) You would see a window showing the canvas and background color.

9. Close the canvas window if it works. We will continue with the void draw() function. The draw() function runs in a loop (repeats during the program s life). Inside the draw() function we will perform the calculations and commands for movement and drawing to create the animation. 10. The process of animation consists of these steps: a. Lay down the background b. Perform the math to calculate the position of the objects (Model the movement) c. Draw the object to the canvas. (The View)

First, write the code to lay down the background. We will use the same color as the setup() background.

11. We will now do the math to calculate movement. First, we will add the balldx and balldy to the ballx and bally positions.

12. We now will do step where we draw the ball to the screen. Add the following code to set the shape color and draw the ball.

13. Click the Run icon and you should see the ball move diagonally down and off the screen. (We have not set the bouncing yet...)

14. We now need to program the bouncing of the ball. Add the following if statements to check the position of the ball and then change the balldx or balldy if it is off the edge of the screen. (Notice we multiply by -1 to change direction by positive or negative). Add the following code between the change ball position section and the draw ball section:

15. Click the Run icon and you should now see the ball bouncing about the screen:

16. For this assignment you will need to create two additional bouncing objects. Remember, you must do the following steps to add an additional object: a. Define position and speed variables for the object. (Before the setup() function). An example would be:

b. In the draw() function, add the code to calculate the position and bounce and then draw the shape. The following comments suggest the outline. Remember, it will follow an very similar format to the code for the ball: Note: This code is done in the draw() function below the animation code for the ball. 17. Experiment with different shapes, colors, and values for speed.