220 likes | 378 Views
Programming Alice. Alice is named in honor of Lewis Carroll’s Alice in Wonderland. What is Programming?. Writing complete instructions describing steps a computer should follow to carry out some task A program is written in a specific language such as C, Java, or Alice
E N D
Programming Alice Alice is named in honor of Lewis Carroll’s Alice in Wonderland
What is Programming? • Writing complete instructions describing steps a computer should follow to carry out some task • A program is written in a specific language such as C, Java, or Alice • A computer system is used to execute a program
Alice • Alice is an object-oriented programming language specifically designed to teach computer programming concepts • Developed by Carnegie-Mellon • Available as part of a freeware IDE
Getting Alice • If necessary, download the Alice system • www.alice.org/downloads • On a Windows system, you will have to extract the Alice folder and create a shortcut to the Alice.exe file
Alice Environment • Alice Virtual World • A 3-D environment containing objects that are controlled via Alice programming instructions • Virtual World Creation • A Template forms the backdrop for each world • Objects are added to the world • Code is written to control the world
A New World Object Tree World Window Events Area Details Area Editor Area
Object Gallery • A collection of pre-made classes for use in your virtual world • Objects are built from the class template
Up Height Right Depth Width Front Objects • Instantiated from 3-D Models (class) • Each has… • height, width, and depth • orientation (up, down, left, right, front, back) • center (rotation point) • position (relative to center of world) Center
World • Each world also has a center and orientation • Green = Up • Blue = Front • Red = Right • Object positions are relative to center of world distance
Point of View • Position • How far from world center to object along each axis (red/right, green/above, blue/forward) • Orientation • How much object is turned from the world's orientation
Properties • Objects have properties • The collection of property values represents the state of the object • Animation occurs when we change an object's properties over time Proprties of the object named shakira
Scene Building • Choose template • Alice provides 6 basic templates • Add objects from the gallery • Local or Web Gallery • Search or Browse • Position and size objects to create the initial scene
Positioning Objects • Select Object • Bounding box and orientation axes are visible • Object name is highlighted in the Object Tree • Choose mouse interaction
Move Freely • Drag to change red and green positions (object move in fixed horizontal plane) • Shift+Drag to move object vertically • Ctrl+Drag to turn left or right • Shift+Ctrl+Drag to tumble about object's center
Move Specifically • Specialized moves are also possible using the alternate buttons Copy Move Freely Resize Move Up/Down Tumble Turn Left/Right Turn Forward/Back
Resize and Copy • When Resize is selected, the mouse will make the object larger or smaller • As the object moves further from the camera, it will automatically appear smaller Unselect after copying!
Delete and Undo • Right-click on the object in the Object Tree and choose Delete • You can also right-click the object directly • The Undo and Redo buttons are convenient when you mistakenly reposition an object • You can reposition the World • This is usually accidental
Quad View • Used to see the world from four perspectives • Normal 3-D view • Top, Side, and Front views • In addition to the usual controls, a re-position and zoom tool are included for the top, side, and front view windows
Done Adding Objects • Click the Done button to return to the Programming view of the world • You can still reposition objects in this view • The mouse acts as if in the Move Freely setting
Camera • You can position the camera using the camera's driving tools below the World Window Turn forward (tip lens down) Slide camera left or right Turn backward (tip lens up) Raise or lower camera Drive Forward or Backward Turn camera to the left or right
Saving Worlds • The Save World action is located in the File menu • Pick a location (Z drive?) • Place your projects in a dedicated folder • Choose a name for your world • Make it descriptive