Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fall 2009ACS-1805 Ron McFadyen1 ACS-1805 Introduction to Programming using Alice.

Similar presentations


Presentation on theme: "Fall 2009ACS-1805 Ron McFadyen1 ACS-1805 Introduction to Programming using Alice."— Presentation transcript:

1 Fall 2009ACS-1805 Ron McFadyen1 ACS-1805 Introduction to Programming using Alice

2 Fall 2009ACS-1805 Ron McFadyen2 Alice The basics of computer programming Pages 5/6/7/8 in 2 nd edition Computer program Just “a set of instructions” for computer to follow “At its heart, programming is really very simple.” “All computer programs are made from very simple ideas:” A list of instructions (algorithm) Ifs (decisions) Repeating behaviour (repetition) Breaking things into smaller pieces (decomposition) Computing a result (functions)

3 Fall 2009ACS-1805 Ron McFadyen3 Alice Flowcharting (2 nd edition, page 7) terminal Input/output Processing Call Decision Flow lines Connectors: on page, off page Also chapter 2, page 38, the use of parallelism… later

4 Fall 2009ACS-1805 Ron McFadyen4 Alice Virtual world Started by playing a virtual world Can play like a movie, or played like an interactive game Developing a world begins with a template (e.g. ground & sky) Object Objects are added to the world (e.g. a person, a robot, a ball) Objects are chosen from a gallery of 3D models Objects are commanded to do things 3D Model Created by Alice developers Is a blueprint for objects – size, color, actions, … Programming Build methods containing commands for objects Build methods to respond to events Event Pressing a key on the keyboard, etc.

5 Fall 2009ACS-1805 Ron McFadyen5 Alice Emphasizes programming fundamentals Programs are composed of methods Methods contain Alice instructions Objects are asked to do things they know how to do Events can trigger execution of program components Programs always run The Alice editor is user-friendly: its a smart editor with visual drag & drop features

6 Fall 2009ACS-1805 Ron McFadyen6 Kinds of Animations Two kinds : Movie Passive user watches the animation Interactive Active user clicks on mouse, types a key on keyboard …make into a game Actions of user are called events

7 Fall 2009ACS-1805 Ron McFadyen7 Appendix A Read both appendixes (especially A at this time) Appendix A Part 1: Running virtual worlds Explains some things about the Alice startup World 1 Open and play the first example in the “textbook” tab World 2 Open and play the second example in the “textbook” tab World 3 Creating a new world from the “snow” template… adding & arranging objects Part 2: using popup menus for the initial scene

8 Fall 2009ACS-1805 Ron McFadyen8 Appendix B Searching the gallery Creating your own “people” models Using the clipboard Deleting code using wastebasket and dissolve Exporting code to html Exporting a world (viewing a world on the web requires the user to have Java 3D or Java Media Frameworks installed)

9 Fall 2009ACS-1805 Ron McFadyen9 Techniques and Tools Setting up a world: Gallery is used to obtain objects Mouse is used to 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 position objects in the scene Quadview is used to position one object relative to another object precise positioning of objects in the scene

10 Fall 2009ACS-1805 Ron McFadyen10 Objects An "object" is any thing that can be identified as unique from other things How is an object unique? has a name has properties: width, height, color, location can perform actions (methods): associated actions it can perform tasks it can carry out

11 Fall 2009ACS-1805 Ron McFadyen11 Galleries Classes (3D models) are found in the galleries Local gallery (installed with the software) Minimum or complete options CD Gallery (when CD is in the machine) Web gallery

12 Fall 2009ACS-1805 Ron McFadyen12 Object Parts Objects may be composed of parts aliceLiddell has a rightArm The rightArm comprises a shoulder, and forearm, and the forearm has subparts too. A “+” means there are subparts that can be listed by clicking on the “+” A “-” means the subparts are listed. To suppress the listing of subparts click the “-” The picture on the right is showing the objects in a “tree” view

13 Fall 2009ACS-1805 Ron McFadyen13 Object Parts aliceLiddell rightArmleftArmnecklowerBody shoulderforearm hand thumb fingerTips fingers forearm hand thumb fingerTips fingers shoulder Consider the aliceLiddell object to the right. A computer scientist typically uses tree diagrams for complex hierarchical structures. Can you complete this for neck and lowerBody? ……

14 Fall 2009ACS-1805 Ron McFadyen14 3 Dimensions, 6 Directions A 3D object has 3 dimensions height, width, depth 6 degrees of freedom backward forward right left up down


Download ppt "Fall 2009ACS-1805 Ron McFadyen1 ACS-1805 Introduction to Programming using Alice."

Similar presentations


Ads by Google