Introduction to Alice is named in honor of

  • Slides: 39
Download presentation
Introduction to Alice is named in honor of Lewis Carroll’s Alice in Wonderland

Introduction to Alice is named in honor of Lewis Carroll’s Alice in Wonderland

How To Get Your Free Copy Can download from the web www. alice. org

How To Get Your Free Copy Can download from the web www. alice. org

Why Alice? A modern programming tool 3 -D graphics 3 -D models of objects

Why Alice? A modern programming tool 3 -D graphics 3 -D models of objects Animation objects can be made to move around the virtual world (a video game or simulation implemented in 3 -D)

What does Alice run on? Alice is written in Java -- this helps the

What does Alice run on? Alice is written in Java -- this helps the software run on many popular systems Right now, the software team is working to support only the PC version

Fast Start Up Can quickly learn to create a simple animation in a matter

Fast Start Up Can quickly learn to create a simple animation in a matter of minutes An animated story in a few lab sessions Can learn to use the Alice interface in a couple of lab sessions

The Power of Alice Automatically keeps track of 3 -D objects what objects are

The Power of Alice Automatically keeps track of 3 -D objects what objects are in the virtual world types of objects positions of objects in the world

Demo Starting Alice Running A World How to Exit What to do if Alice

Demo Starting Alice Running A World How to Exit What to do if Alice crashes

Memory Management Alice automatically manages memory But, writing and testing an animation is an

Memory Management Alice automatically manages memory But, writing and testing an animation is an intense load on the computing system – a crash can occur. Best solution: save your world every 15 minutes (Or at least every half hour) also save to a backup system (for example, a usb key)

Object Position Objects are positioned in 3 -D space Have six degrees of freedom

Object Position Objects are positioned in 3 -D space Have six degrees of freedom (directions of movement)

Galleries of 3 D Objects Sources of 3 D objects the local gallery shipped

Galleries of 3 D Objects Sources of 3 D objects the local gallery shipped with the software Alice web gallery

Kinds of Animations Movie user just watches the animation on screen "machine-centric" Interactive user

Kinds of Animations Movie user just watches the animation on screen "machine-centric" Interactive user clicks on mouse, types a key on keyboard … "user-centric"

Events Animations that are interactive depend on the user's actions mouse click key press

Events Animations that are interactive depend on the user's actions mouse click key press Actions are events Interactive programs are event-driven

Objects What is an object ? anything that can be identified as unique from

Objects What is an object ? anything that can be identified as unique from other things How is an object identified as unique? has a name has properties: width, height, color, location, age, ss#, id# has a purpose: associated actions it can perform tasks it can carry out

Class Objects are categorized into classes Peter Paul Mary Person Spike Dogs Scottie Each

Class Objects are categorized into classes Peter Paul Mary Person Spike Dogs Scottie Each object is Fluffy an instance of the class. All objects in a class have similar properties and generally can perform the same tasks.

Objects in a Virtual World In Alice, each 3 D model is a class

Objects in a Virtual World In Alice, each 3 D model is a class of objects each object of the class has a unique name mummy, mummy 1, mummy 2 has color(s) pink, white, grey, black, blue, ….

Object Parts Objects may be composed of Parts

Object Parts Objects may be composed of Parts

Animation Programs: Scenarios and Storyboards Alice

Animation Programs: Scenarios and Storyboards Alice

Overview 2 -step process for creating animations Step 1: Design Step 2: Implementation

Overview 2 -step process for creating animations Step 1: Design Step 2: Implementation

Step 1: Design Decide on the problem to be solved Often the problem to

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

An example problem (scenario) The scenario is: Several snow-people are outdoors, on a snowcovered

An example problem (scenario) The scenario is: Several snow-people are outdoors, on a snowcovered 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?

Designing a solution First decide on the objects that will be in the scene.

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

Objects in the Scene Objects: A snowman and a snowwoman (and possibly other snowpeople)

Objects in the Scene Objects: A snowman and a snowwoman (and possibly other snowpeople) Opening Scene: a snowy scene A quick sketch:

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

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

Storyboard in Text Form Animation Artists (for example, at Disney or Pixar Studios) sketch

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

Creating An Animation Program Alice

Creating An Animation Program Alice

Step 2: Implementation Implementing an animation requires Setting Up the Initial Scene in Alice

Step 2: Implementation Implementing an animation requires Setting Up the Initial Scene in Alice Writing the Program (Script)

Create Initial Scene

Create Initial Scene

Techniques and Tools Mouse used to set up the initial scene approximately position objects

Techniques and Tools Mouse 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

Writing A Program "Writing" a program (script) a list of instructions to have the

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

Writing the Program Our planned storyboard (to-do list) is: Snowman turns to face snowwoman.

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

Translating the Design Some steps in the storyboard can be written as a single

Translating the Design Some steps in the storyboard can be written as a single instruction 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

Actions Sequential Some actions occur one after the other first step (snowman turns to

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

Action Blocks in Alice Sequential Action Block Simultaneous Action Block

Action Blocks in Alice Sequential Action Block Simultaneous Action Block

Write the Animation Program Will develop in class. Note: Snow people can be found

Write the Animation Program Will develop in class. Note: Snow people can be found “locally” and are in the people folder.

Coding the first 2 steps Things to note: Nesting of Do. Together and Do.

Coding the first 2 steps Things to note: Nesting of Do. Together and Do. In. Order blocks Arguments for the move instruction direction distance

Testing An important step in creating a program is to run it – to

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… This process allows you to find any problems and fix them as you go along.

Comments While Alice instructions are easy to understand, it is often desirable to be

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

Notes: 1) Comments appear in green 2) Alice ignores comments. 3) Comments make the

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

In the previous example, the comment described a large block of program code. Comments

In the previous example, the comment described a large block of program code. Comments also can be used for a small subsection of the program code.