390 likes | 486 Views
Using Alice to Introduce Programming Concepts. Mr. Craig Ham Technology Coordinator Westminster Schools of Augusta Augusta, GA. Computer Science. It’s crucial we begin to push CS at the secondary level
E N D
Using Alice to Introduce Programming Concepts Mr. Craig Ham Technology Coordinator Westminster Schools of Augusta Augusta, GA
Computer Science • It’s crucial we begin to push CS at the secondary level • US Dept Labor predicts CS jobs will be the fastest growing and highest paying over the next decade • CS Provides 21st Century skills necessary for innovation. Job demand is growing and by 2016 estimates are 1.5 million jobs in CS
What Can Your School Do to Successfully Incorporate CS Education? • Implement CS classes. Rigorous and engaging. • Allow CS to count toward graduation (as math or science) • Make courses accessible for all. Recruit those underrepresented. • Improve teacher preparation and professional development.
How Does Alice Fit In? • Alice is designed to engage students with the designs of programming but without the tedium of syntax and error checking. • Additionally it creates all this in a 3 dimensional space instead of text on the screen.
What is and what can I do with Alice? • Alice is a modern programming environment designed to be a student's first exposure to object-oriented programming. It allows students to learn basic computer science while creating animated movies, simple video games, where students control the behavior of 3D objects and characters in a virtual world.
Updates, Releases, Fixes • New releases each Spring and Fall • Look for ver 2.2 and the most current date with is 8/5/2011 • Versions for both Mac and PC • After you download (351 MB) • Copy the Alice 2.2 Folder-no install • Run Alice from the folder
What I Hope to Cover • Alice screen layout overview • Positioning, Resizing, Moving Objects • Motion and Orientation • Other things that “pop” into my head • Your questions! Most of the follow slides were created by Wanda Dann, Steve Cooper, and Don Slater at Carnegie Mellon University
Alice Code Editor World View Object tree Events Editor Go to Scene Editor Object details Control Structures
Demo & Practice • Go to Scene Editor of this project • (click on Add Objects button) • aliceLiddell(People gallery) • hare (Animal gallery) • axes (Shapes gallery) • Identify the center of each object. • Identify the forward direction of each. • Identify the up direction of each.
Motion • Motion of an object is relative to • the orientation of the object • the location of the object • Location is defined by an objects center point (or pivot point) • The art of Alice animation is manipulating the location and orientation of an object and / or its subparts to create the illusion of motion.
Orientation • Orientation is an object’s sense of direction • A 3D object has • 3 dimensions • height, width, depth • 6 directions of motion
Center of an object • An object is positioned in the world, with reference to the center of the object. • The center of an object can be: • At the center of mass, or • Where it stands on the ground, or • Where it is held or connected (for example, a hinge joint)
Alice Scene Editor World View Object tree Mouse Control Return to Code View Camera Controls Object details Gallery
Translational Motion • Changes position of an object in the world • The direction of translational motion is stated relative to the self-centric orientation of the object. • Six directions • move • left • right • up • down • forward • backward
Bounding Box Viewing the intersection of axes in an object’s bounding box is one way to determine where the center of an object is located.
Set-up methods • To illustrate object motion, we will use the object’s popup menu of menu methods. • Process for using a set-up method: • Right-click on the axes from the object tree or in the world • Select methods from the list • Select a method from the list
Selecting a menu method: orient to Right-click on axes
Demo & Practice • Use a menu move instruction with • aliceLiddell • hare • axes • Note: • You can click the Undo button to return an object to its initial position before trying another move.
Question • Other than move, what other methods in the menu can be used for “translational motion”?
Using Alice to Introduce Programming Concepts Mr. Craig Ham Technology Coordinator Westminster Schools of Augusta Augusta, GA
Rotational Motion • Rotational motion changes the orientationof an object in the world • An object’s center acts as its pivot point for rotation of the whole object. • Two forms of rotational motion: • turn • forward, backward • left, right • roll • left, right
Hands-On Practice • Compare turn and roll menu methods with aliceLiddell and the hare Note: Be sure to click the Undo button to return to initial position before trying another rotational motion. • How would you describe the center point of each object? Are they the same?
Question • Other than turn and roll, what other methods in the menu create “rotational motion”?
Rotational Motion: Subpart • Rotational motion of a subpart of an object may have a surprising result • Turn and roll actions for a subpart are pivoted around the center of the subpart, generally located where the subpart connects to the rest of the object (see example, next slide)
Example • The hare’s right arm is centered at the shoulder(the pivot point) of the upper arm to the body Note: A few Alice 2 models were designed to work differently and, therefore, do not conform to this example.
Center for a subpart • One way to view the center of a subpart is to move an axes object to the subpart and then orient the axes to the subpart. • Example: hare’s rightArm’s center
Movement of a subpart • One way to view the movement of a subpart is to set the vehicle of the axes to the subpart and then orient the axes to the subpart. • Example: • Select axes in the object tree • Select properties tab in axes detail’swindow • Change vehicle property using the drop down menu
Review 1TranslationalMotion.a2w 1RotationalMotion.a2w • Open File Menu: World • Click on Examples tab • Click on workshopWorlds folder • Click on Day1 folder
Text • Additional information on motion instructions may be found in • Tips & Techniques 2 Orientation & Movement Instructions
Practice Problem Open file 1HelloWorldStart.a2w The hare is waiting in the garden when Alice enters from the left. (She is off screen at the beginning of the world.) Have the hare turn to greet Alice after she enters. Both say hello to each other. (use the say method of the objects.) Then they both turn to greet the viewer, with a wave. For an extra challenge, try to have Alice wave her hand. They should return their arms to the original starting position. • Open File Menu: World • Click on Examples tab • Click on workshopWorlds folder • Click on Day1 folder
Additional Material • The following slides contain additional information, examples and topics that will not be covered explicitly in this workshop. • See workshop leader during breaks for more details
Pivot Point Orientation • Different pivot point connections and orientations may be found in 3D objects because Alice 2 models were designed • Over several years by dozens of different graphic artists • For many different virtual world projects, where a variety of connections for subparts were needed
roll and turn • If subparts are connected with pivot points differently, the same roll and turn instructions may result in different actions on different objects. • This is particularly noticeable in biped objects where arms and legs are animated.
Walking • The variations in design and construction of 3D models make it difficult to write a walking method that can be used for all bipedal objects. • Alice 2.2 has a Walking People gallery containing 3D models for creating “people” objects that already know how to walk • look inside the People gallery for Walking People folder