2d62bd013f9f9781e1bcd9c726e54d6e.ppt
- Количество слайдов: 33
Debriefing on Audacity Zoom in a LOT before you see sample Understand the complexity of sound waves that are involved Think about the role of sampling rate and number of bits per sample. Think about other issues in compression 1 -1
Groups have been assigned check the webpage for your group those without laptops have been assigned a different location some with laptops have also been assigned a different location You can opt out of coming to class on Monday (and being held responsible for the material) – but you need to make your decision known IMMEDIATELY by sending me email. 1 -2
Review Questions Class starts at 12: 30. Questions will begin immediately. I will pick students from the class list (not just from those in attendance) If you are zoned out, there is a greater chance you will be called on. If you come to class late or leave early, there is a greater chance you will be called on. 1 -3
Frustration I have been frustrated with people who come to class late, zone out during class, do the ILMs by skipping from green question to green question AND THEN WONDER why they don’t understand the questions nor know when something is due. Things have changed for good - and for the good. 1 -4
Chapter 9: Introduction to Alice and Objects Starting Out with Alice: A Visual Introduction to Programming First Edition by Tony Gaddis Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Chapter Objectives To understand: – the differences in dimensions between 2 D and 3 D objects. – what directions 2 D and 3 D objects move in a 3 D world. – what the seven mouse mode buttons are (and which one does not appear in quad view). – how an object’s center point affects rotation. – what the three axes are that appear when an object is selected and what role they play in movement. – what the view of quad view is. – what the coordinates (0, 0, 0) mean in a 3 D system. 1 -6
1. 1 What is a Computer Program? Program – Set of instructions; carefully written so Ste called that they follow a logical sequence an ALGORITHM eps ar When the computer performs those instructions, the computer is running or executing a program. Alice stores the world setup and instructions as a file with a. a 2 w extension. That is the file you will submit. You will need to save that file on a storage device so you can work on it at various times. If you do not know what to buy, see your group leader. 1 -7
Algorithms and Programming Languages 1. 2 Programming language converted to machine language by compiler or interpreter Starting … 0101001101000110000101110010011101000110 100101101110011100100000 out … 0110111010101110100 With … 01110110100101110100000100000 Alice … 0100000101101100011010010110001101100101 1 -8
Algorithms and Programming Languages 1. 2 Operators + - * / Syntax – Set of rules that must be followed. The students studies. (syntax violation) The student, studies. While walking down the street. The creators of Alice are so concerned about syntax errors, they restrict you to “drag and drop” of instructions. This is NOT typical of programming, but it helpful in avoiding syntax errors. Writing the Program…writing the code – Program consists of keywords, operators, punctuation and more arranged in proper sequence – Save, compile, and voila! An executable program! 1 -9
Learning to Program with Alice 1. 3 Alice uses objects – Tent – Soldier – Princess Objects perform actions – Move – Fly – Wave Some actions are primitive (all objects have), some are created by designers, some you will create. 1 -10
Running Alice The CS labs have Alice installed. Alice is free and can be downloaded from http: //www. alice. org/index. php? page=downloads/download_alice 1 -11
Login Screen - Tutorial is a good way to begin 1 -12
1. 3 The Alice System 1 -13
1. 3 PLAY 1 -14
Object Tree Notice, this is like trees we have used. the + means there are “children” that are hidden The screen is fairly complicated. They are trying to give you multiple views of the data so you will be more productive. 1 -15
The Alice Environment – Names of areas are helpful (and 1. 3 makes you sound more knowledgeable) Toolbar Object Tree Details Panel 1 -16
Changing Properties Notice you can click on “World” and then Properties to see a list of things you might want to change about your world. Try a few 1 -17
1 -18
Objects also have properties Add a chair to the screen. using “Add Objects” You will need to go into the “Local Gallery”, furniture, chair. Drag the chair to the World Click the “done” button on the right to exit this view. Check out the chair properties 1 -19
1 -20
1 -21
Object Properties 1. 4 Object Selected Change Properties 1 -22
Methods Chairs don’t have a lot of interesting things they can do Change the color of the chair Have it do at least five different things by dragging them to the Method Edit area Rotations: left/right, back/forward, and tumble are all about the object’s center point. Bounding box – axis (green/blue/magenta). Blue is forward. Up/down are the green/y axis. Change to wireframe (fillingstyle property) to see center clearly. 1 -23
1. 4 Methods: what the “types” do Set of programming statements executed by object. Methods commonly result in object performing action. 1 -24
1. 4 Methods Objects made of other objects Snowman made of: – head • • • top. Hat left. Eye NOTE: how objects are named! right. Eye carrot. Nose This is called “camel case” as there are “humps” in the middle mouth – left. Arm – right. Arm – bottom 1 -25
Methods 1. 4 Each object can also be manipulated with methods. Objects and “sub” objects can – Move – Turn – Roll – Say… What you have highlighted in the Object Tree controls the properties/methods/function below in the Details Panel. 1 -26
Add another object to your screen If you add an oven, for example, you can instruct the door to roll, think (appears in cloud), or point at some other object. Try a few things. Want to appreciate elegance – there are many ways to solve a problem, but some are inherently better than others 1 -27
1. 4 The World is also an object? Contains all other objects Also has its own properties – Atmosphere color – Lighting – Fog 1 -28
1. 5 Alice has Class(es)! Objects are created from classes. Class set of specifications that describe a particular “type” of object. Each item found in the Gallery is a class. Each time the class is used, it is an instance of that class. Gallery is a collection of different object types (animals, beach, people, etc. ). Two galleries are used: Local gallery (stored on computer) Web gallery (maintained by creators of Alice) 1 -29
Blueprint that Describes a House 1. 5 Three instances of the house created from the blueprint (class). 1 -30
1. 5 Class Instance in Alice Class: Chicken Instance: – Chicken 1 – Chicken 2 Each instance has its own properties, methods, functions 1 -31
1. 6 3 D Objects and the Camera Alice world and objects are threedimensional – Height – Width – Depth } These dimensions are part of 2 D objects 1 -32
3 D Movement – six directions A bit awkward at first, so practice! 1. 6 Forward is perceived as the object getting Motion is based on OBJECT’s larger as it gets closer to us. perspective…our left is the Coach’s right Backward is perceived as the object getting smaller as it gets farther away from us. 1 -33
2d62bd013f9f9781e1bcd9c726e54d6e.ppt