1 / 27

Animation Programs

Alice. Animation Programs. Overview. 4-step process for creating animations Step 1: Understand Problem Step 2: Design Step 3: Implementation Step 4: Test. Programming Methodology. Understand the problem and think about a strategy for a solution Create an algorithm to solve the problem

Download Presentation

Animation Programs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Alice Animation Programs

  2. Overview • 4-step process for creating animations • Step 1: Understand Problem • Step 2: Design • Step 3: Implementation • Step 4: Test

  3. Programming Methodology • Understand the problem and think about a strategy for a solution • Create an algorithm to solve the problem • Storyboards are helpful for problems involving animation • Implement the algorithm • Test and refine

  4. Step 1 & 2: The Problem • Decide on the problem to be solved • Often the problem to be solved is given to you by your instructor, team leader, etc. • Other times, you get to make it up! • We will practice both • Design a solution • We will use a storyboard design

  5. An example problem (scenario) • The scenario is: Several snow-people are outdoors, on a snow-covered landscape. A snowman is trying to meet a snowwoman who is talking with a group of her friends (other snowwomen.) He says “Ahem" and blinks his eyes, trying to get her attention. • The problem is: How can we create this animation?

  6. Designing a solution • First decide on the objects that will be in the scene. • Then, create a storyboard. • A "storyboard" is a representation of what actions are going to take place in the animation • A storyboard can take two forms • sketches • textual "to do" lists

  7. Sketch • Objects: A snowman and a snowwoman (and possibly other snowpeople) • Opening Scene: a snowy scene • A quick sketch:

  8. A Storyboard Initial scene Snowman tries to catch snowwoman’s attention Snowwoman looks around

  9. Storyboard in Text Form • Animation Artists (for example, at Disney or Pixar Studios) sketch their storyboards • You might not have such expertise, so here is a textual form that can be used: This is like a "to-do" list. Snowman turns to face snowwoman. Snowman “makes eyes” and calls out to snowwoman. Snowwoman turns around.

  10. Step 3: Implementation • Implementing an animation requires • Setting Up the Initial Scene in Alice • Writing the Program (Script)

  11. Create Initial Scene

  12. Techniques and Tools • Mouse is used to • set up the initial scene • approximately position objects in the scene • Camera Navigation is used to • set the camera point of view • Drop-down menu methods are used to • resize objects • more precisely position objects in the scene • Scene Editor's Layout Manager is used to • obtain specific alignments • position one object relative to another object

  13. Writing A Program • "Writing" a program (script) • a list of instructions to have the objects perform certain actions in the animation

  14. Writing the Program • Our storyboard (to-do list) is: • The idea now is to translate the design steps to program instructions. Snowman turns to face snowwoman. Snowman “makes eyes” and calls out to snowwoman. Snowwoman turns around.

  15. Translating the Design • Some steps in the storyboard can be written as a singleinstruction • The snowman turns to face the snowwoman • Other steps are composite actions that require more than one instruction • The snowman tries to catch the snowwoman’s attention is two actions • Snowman says “ahem” • Snowman raises and lowers his eyes

  16. Actions Control Structures • Signals a change in the flow of the program • examples DO IN ORDER and DO TOGETHERSpecifies if the actions are to be performed in order, or simultaneously

  17. Actions • Sequential • Some actions occur one after the other • first step (snowman turns to face snowwoman) • second step (snowman tries to get snowwoman’s attention) • Simultaneous • Other actions occur at the same time • Snowman says "Ahem" and while simultaneously blinking his eyes

  18. Action Blocks in Alice Sequential Action Block Simultaneous Action Block

  19. Write the Animation Program • Understand the problem • Plan an algorithm • Implement your plan • Test you program

  20. Coding the first 3 steps • Things to note: • Nesting of DoTogether and DoInOrder blocks • Arguments for the move instruction • direction • distance

  21. Step 4: Testing • An important step in creating a program is to run it – to be sure it does what you expect it to do. • We recommend that you use an incremental development process: • write a few lines of code and then run it • write a few more lines and run it • write a few more lines and run it… • This process allows you to find any problems and fix them as you go along.

  22. Comments • While Alice instructions are easy to understand, it is often desirable to be able to explain (in English) what is going on in a program • We use comments to explain to the human reader what a particular section of code does

  23. Animation Programs Comments Notes: 1) Comments appear in green 2) Alice ignores comments. 3) Comments make the program easier to read.

  24. Assignment • Read Chapter 2 sections 1 and 2 • Scenarios and Storyboards • A First Program • Read Tips & Techniques 2 • Orientation and Movement Instructions

  25. Lab 02 • Exercises from 2-1 and 2-2

More Related