Programming Alice Alice is named in honor of Lewis Carroll’s Alice in Wonderland.

22
Programming Alice Alice is named in honor of Lewis Carroll’s Alice in Wonderland

Transcript of Programming Alice Alice is named in honor of Lewis Carroll’s Alice in Wonderland.

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 AliceA 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-MellonAvailable as part of a freeware IDE

Getting Alice

If necessary, download the Alice systemwww.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 WorldA 3-D environment containing objects that are

controlled via Alice programming instructions

Virtual World CreationA Template forms the backdrop for each worldObjects are added to the worldCode is written to control the world

A New WorldObject Tree

World Window

Details Area

Events Area

Editor Area

Object Gallery

A collection of pre-made classes for use in your virtual world

Objects are built from the class template

Objects

Instantiated from 3-D Models (class)Each has…

height, width, and depthorientation (up, down,

left, right, front, back)center (rotation point)position (relative to

center of world)

Heig

ht

Width DepthFront

Up

Right

Cente

r

World

Each world also has a center and orientation

Green = UpBlue = FrontRed = Right

Object positions are relative to center of world

distance

Point of View

PositionHow far from world

center to object along each axis (red/right, green/above, blue/forward)

OrientationHow much object is

turned from the world's orientation

Properties

Objects have propertiesThe collection of property values represents the state of the objectAnimation occurs when we change an object's properties over time

Proprties of the object named

shakira

Scene Building

Choose templateAlice provides 6 basic

templates

Add objects from the gallery

Local or Web GallerySearch or Browse

Position and size objects to create the initial scene

Positioning Objects

Select ObjectBounding box and

orientation axes are visibleObject 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 verticallyCtrl+Drag to turn left or rightShift+Ctrl+Drag to tumble about object's center

Move Specifically

Specialized moves are also possible using the alternate buttons

Move Freely

Move Up/Down

Turn Left/Right Turn Forward/Back

Tumble

Resize

Copy

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 WorldThis is usually accidental

Quad View

Used to see the world from four perspectives

Normal 3-D viewTop, 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

Quad View

Done Adding Objects

Click the Done button to return to the Programming view of the world

You can still reposition objects in this viewThe 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 camera to the left or right

Turn forward (tip lens down)

Drive Forward or Backward

Turn backward (tip lens up)

Raise or lower camera

Slide camera left or right

Saving Worlds

The Save World action is located in the File menuPick a location (Z drive?)

Place your projects in a dedicated folder

Choose a name for your world

Make it descriptive