Fall 2007ACS-1805 Ron McFadyen1 Chapter 2 Creating Your First Animation (An Introduction to Programming)

Slides:



Advertisements
Similar presentations
Alice.
Advertisements

Princess & Dragon – Version 2 By Michael Hoyle under the direction of Professor Susan Rodger Duke University July 2012 Part 2: Using Methods.
Class-level Methods Alice. World / Class Method World method A general method that may refer to multiple objects; not closely associated with any particular.
Introduction to Alice Alice is named in honor of Lewis Carroll’s Alice in Wonderland Modified by Serita Scott Further modified by Suzy Crowe.
Vehicle Property and Inheritance By Ruthie Tucker, under the direction of Professor Susan Rodger, Duke University, 2008.
CSC1401 Animation Creating methods/instructions (class-level)
1 Fall 2009ACS-1805 Techniques for designing code Storyboards Text (aka pseudocode) Diagrams Flowcharts (a procedural technique shown in text) Directed.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Alice: A Visual Introduction to Programming Third Edition.
Fall 2008ACS-1805 Ron McFadyen1 Programming Concepts Chapter 4 introduces more advanced OO programming techniques. Construction of a programs usually requires:
Presenter: Carol Liss, Co presenter: Christian Lizier,
Programming in Alice Chapter 2. Today’s Agenda Designing a Program Writing Methods Executing Instructions Simultaneously Comments Tips for Setting Up.
Fall 2009ACS-1805 Ron McFadyen1 Point of View An object’s Point of View comprises its position and orientation. Position tells us where the object is in.
1 Fall 2008ACS-1805 Techniques for designing code Storyboards Text (aka pseudocode) Diagrams Flowcharts (a procedural technique) Text presents one of these.
Fall 2007ACS-1805 Ron McFadyen1 Chapter 3 Programming - Putting Together the Pieces.
Fall 2007ACS-1805 Ron McFadyen1 Chapter 8 Recursion.
Fall 2009ACS-1805 Ron McFadyen1 ACS-1805 Introduction to Programming using Alice.
Creating an Animation Program Alice. Step 1: Design Decide on the problem to be solved Design a solution We will use a storyboard design technique, commonly.
CS320n –Visual Programming Interactive Programs Mike Scott (Slides 5-1)
Copyright 2011 Wanda Dann, Steve Cooper, Don Slater Alice Workshop Problem Solving with Alice 2 & Friends.
Fall 2007ACS-1805 Ron McFadyen1 Chapter 4 OO Programming Concepts.
Fall 2008ACS-1805 Ron McFadyen1 Programming Concepts Chapter 4 introduces more advanced OO programming techniques. Construction of a programs usually requires:
Fall 2007ACS-1805 Ron McFadyen1 Chapter 3 Programming.
Animation Programs Alice. Overview 4-step process for creating animations Step 1: Understand Problem Step 2: Design Step 3: Implementation Step 4: Test.
Programming: Simple Control Structures Alice. Control Statements We have been using Do in order and Do together to control the way instructions are executed.
Creating An Animation Program Alice Web Design Section 8-4.
Animation Programs: Scenarios and Storyboards Alice Web Design Section 8-3.
CS320n –Visual Programming Introduction to Alice Mike Scott (Slides 2)
Classes, Objects, and World-level Methods Alice. Larger Programs As you become more skilled in writing programs, you will find that programs quickly increase.
Storyboards in Alice Summer 2010 Prof. Susan Rodger.
Alice Programming Step 1:Design Copyright 2011 Wanda Dann, Don Slater, Steve Cooper.
Creating An Animation Program Part 2 Alice. Method A segment of program code (instructions) that defines how to perform a specific task.
CS329e – Elements of Visual Programming Implementing Programs Mike Scott (Slides 2-2)
Programming: Simple Control Structures Alice. Control Statements We have been using Do in order and Do together to control the way instructions are executed.
Animation Programs: Scenarios and Storyboards Alice.
A first program Sept 14, 2010 – Day 3 Object-oriented Programming thru Video Games TIDE 1840 Harry Howard Tulane University.
Alice Program Design and Implementation. Scenarios and storyboards The previous magician example illustrated a simple storyboard which depicts a scenario.
Classes, Objects, and World-level Methods Alice. Larger Programs As you become more skilled in writing programs, you will find that programs quickly increase.
1 Fall 2007ACS-1903 Techniques for designing code Storyboards Text (aka pseudocode) Diagrams Flowcharts (a procedural technique) Text presents one of these.
Creating An Animation Program Alice. Step 1: Design Decide on the problem to be solved Design a solution We will use a storyboard design technique, commonly.
Storyboarding1 Steve Cooper Barb Ericson August 2009 Storyboarding.
Creating An Animation Program Alice. Recall We began the animation creation process We introduced the concept of storyboard We will continue using the.
Animation Programs: Scenarios and Storyboards
Piñata Game: Keeping Score in Alice By Maggie Bashford Professor Susan Rodger Duke University July
Animation Programs Alice.
Bunny Eat Broccoli Repetition – Simple loops and Conditional loops Susan Rodger Duke University July 2011.
Creating an Animation Program
Fall 2009ACS-1805 Ron McFadyen1 Chapter 2 Program Design & Implementation.
Storyboarding and Program Design Alice. Step 1: Design Decide on the problem to be solved Design a solution We will use a storyboard design technique,
Review for test! Alice Chapter 1&2 Test is tomorrow! - March 26 th March 25th.
Programming: Simple Control Structures
Learning to Program with Alice September 22, 2009.
Methods (part 2) Alice In Action, Ch 2 Slides Credit: Joel Adams, Alice in Action CS 120 Lecture 03 4 September 2012.
Interactive Programming Alice. Control of flow Control of flow -- how the sequence of actions in a program is controlled. What action happens first, what.
Animation Programs: Scenarios and Storyboards Alice.
Creating an Animation Program Alice. The programming steps.
Program design and implementation Sept 7, 2010 – Day 2 Object-oriented Programming thru Video Games TIDE 1840 Harry Howard Tulane University.
Princess & Dragon Part 3: A Knight Comes Riding In—Cameras & Events By Elizabeth Liang under the direction of Professor Susan Rodger Duke University June.
Creating an Animation Program Alice. Step 1: Design Decide on the problem to be solved Design a solution We will use a storyboard design technique, commonly.
Alice in Action with Java Chapter 2 Methods. Alice in Action with Java2 Objectives Build world-level methods to help organize a story into scenes and.
1 Quiz Show Programming Terms. 2 Alice - 3D Virtual Programming Vocabulary Quiz Board Chapter 1 Chapter 2a Chapter 2b Chapter 3 Chapter 4 $100 $200 $300.
Programming in Alice Chapter 2.
Classes, Objects, and World-level Methods
Creating Animations in Alice
Alice in Action with Java
Creating an Animation Program
Classes, Objects, and World-level Methods
Design and Implementation
Creating an Animation Program
Animation Programs: Scenarios and Storyboards
Programming: Simple Control Structures
Presentation transcript:

Fall 2007ACS-1805 Ron McFadyen1 Chapter 2 Creating Your First Animation (An Introduction to Programming)

Fall 2007ACS-1805 Ron McFadyen2 Creating an Animation Given the description of a story, game, simulation create an Alice animation

Fall 2007ACS-1805 Ron McFadyen3 Creating an Animation Recommended approach Read the scenario, Design an animation using storyboards, Implement your design Test your design If the animation is not correct repeat this process

Fall 2007ACS-1805 Ron McFadyen4 Example Read the “First Encounter” scenario: “After traveling through space, … Design From the scenario, determine the problem to be solved: What is the story to be told? What objects are required? What actions are needed? Use the storyboard technique to outline a solution Implementation Create an initial scene Translate the storyboard actions into code Test Determine if the implementation meets the requirements of the scenario See pages 20+

Fall 2007ACS-1805 Ron McFadyen5 Creating Your First Animation First Encounter scenario: After traveling through space, a robot-manned craft has just made a landing on a moon. The robot is on the moon and has set up a camera so earthbound scientists in Houston can view this historic event. The camera view shows the robot, the lunar Lander and some nearby rock formations. Suddenly an alien peeks out from behind a rock, surprising the robot. The robot looks around, spots the alien, and walks over to take a closer look. The alien is frightened and hides behind the rocks.

Fall 2007ACS-1805 Ron McFadyen6 Storyboards Two forms you might use: Visual hand-sketched screen captures Textual Algorithm Pseudocode

Fall 2007ACS-1805 Ron McFadyen7 Storyboards The text’s textual storyboard The above outlines an algorithm – a set of instructions to follow to accomplish a task The above is also referred to as pseudocode – it is very close to the program code generated by Alice Do the following steps in order alien moves up alien says "Slithy toves?" robot's head turns around robot turns to look at alien Do together robot moves toward the alien robot legs walk alien moves down

Fall 2007ACS-1805 Ron McFadyen8 Your First Program Implementing the design Select a world Choose your objects Create an initial scene Edit World.my first method create instructions using objects, methods, … See class demo Note how the animation is developed piece by piece - incrementally Do in order Do together If/Else Loop While For all in order For all together Wait Print // comments

Fall 2007ACS-1805 Ron McFadyen9 Your First Program Testing your implementation Play your world Observe the behaviour Is the behaviour what you expected? If yes … then you are done Otherwise … you have a bug and you need to Determine what needs to change Is the scenario correct? Is your design correct? Is your code correct? Make the changes and repeat this whole process again See class demo

Fall 2007ACS-1805 Ron McFadyen10 Point of View An object’s Point of View comprises its position and orientation. Position tells us where the object is in the world. Orientation tells us the direction an object is facing. An object’s position is given by 3 values: location in the world’s LR axis, location in the world’s FB axis, location in the world’s UD axis. See the pointOfView.position property values. An object’s orientation is given by 3 values: yaw, pitch, roll. Yaw is the objects rotation about the UD axis. Pitch is the object’s rotation about the LR axis. Roll is the object’s rotation about the FB axis. See The PointOfView property for objects

Fall 2007ACS-1805 Ron McFadyen11 Orientation of objects Each object has its own coordinate system that provides its own sense of direction If Bob is asked to turn left ¼ revolution, Bob’s sense of direction turns with him forward Bob Note here that Bob rotated on his up-down axis. An object’s yaw is how much the object is rotated along this up-down axis since its original position.

Fall 2007ACS-1805 Ron McFadyen12 Orientation of objects Bob had just turned… Now if we ask Bob to move forward, Bob advances along the forward-backward axis forward

Fall 2007ACS-1805 Ron McFadyen13 Orientation of objects Bob had moved forward… Now if we ask Bob to turn forward, Bob rotates on the left- right axis forward right Note here that Bob rotated on his left-right axis. An object’s pitch is how much the object is rotated along this left-right axis since its original position.

Fall 2007ACS-1805 Ron McFadyen14 Orientation of objects Consider Bob back at … Now if we ask Bob to roll left, Bob rotates on the forward- backward axis Note here that Bob rotated on his forward- backward axis. An object’s roll is how much the object is rotated along this forward-backward axis since its original position. forward

Fall 2007ACS-1805 Ron McFadyen15 Orientation of objects Each object has its own coordinate system that provides its own sense of direction If Dave and Peter are asked to move forward, they go in opposite directions You reset an object’s coordinate system by using orient to to give both the same sense of direction Dave orient to Peter forward Dave Peter

Fall 2007ACS-1805 Ron McFadyen16 Arguments Duration: the default length of time for an action is one second – this can be modified Style: the smoothness of an action is controlled using one of the values begin gently, begin abruptly, end gently, end abruptly As seen by: the sense of direction (orientation) for an action is by default determined by the object that is acting, but this can be changed by specifying a different object to use for direction