1 / 39

Introduction to Alice

Introduction to Alice. 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. Why Alice?. A modern programming tool 3-D graphics 3-D models of objects Animation

Download Presentation

Introduction to Alice

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. Introduction to Alice Alice is named in honor of Lewis Carroll’s Alice in Wonderland

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

  3. 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)

  4. 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

  5. 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

  6. 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

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

  8. 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)

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

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

  11. 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"

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

  13. 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

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

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

  16. Object Parts • Objects may be composed of Parts

  17. Animation Programs: Scenarios and Storyboards Alice

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

  19. 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

  20. 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?

  21. 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

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

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

  24. 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: This is like a "to-do" list. Snowman turns to face snowwoman. Snowman “makes eyes” and calls out to snowwoman. Snowwoman turns around.

  25. Creating An AnimationProgram Alice

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

  27. Create Initial Scene

  28. 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

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

  30. Writing the Program • Our planned 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.

  31. 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

  32. 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

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

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

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

  36. 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.

  37. 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

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

  39. 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.

More Related