36
 Introduction:  Alice and I-CSI110, Programming, Worlds and Problems  Alice is named in honor of        Lewis Carroll’s Alice in Wonderland 

Introduction: Alice and ICSI110, Programming,

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Introduction: Alice and ICSI110, Programming,

   

Introduction: Aliceand

I­CSI110, Programming, Worlds and Problems

 

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

Page 2: Introduction: Alice and ICSI110, Programming,

   

Alice software

“Application” to make animated moviesand interactive games

Making animated (or other) movies isa fun but difficult and creative taska kind of programming, basically

Movie stars follow cues from director and each other—they INTERACT 

AND they follow a SCRIPT.Your Alice creations will do those too!

Page 3: Introduction: Alice and ICSI110, Programming,

   

1st half or so: mostly with Alice, a little html.2nd half:  Java plus brief introductions to digital circuits, simulations for science, etc..Today, do 2 Alice “stencil based” tutorials...find out what Alice is about.This, like most CS courses, is a hands­on, “active learning” kind of course.You will become a 6­wk Alice expert and use it to solve problems the same ways professionals do (with more complex tools).

Technologies in CSI110 course

Page 4: Introduction: Alice and ICSI110, Programming,

   

Do This Now...Work in pairs today.Username: cetldw2Password: [get this from whiteboard]select UALBANY domaindouble­click Alice icon on desktop..waitTutorial/Tutorial1; OpenFollow the directions..Do also Tutorial2(in a few screens, click next twice.)

Page 5: Introduction: Alice and ICSI110, Programming,

   

Creating a movie, game, or play

What is the story??create a plan, scenario, etc.select your cast of characters

Create the scriptplan for audience interaction?

Learn, practice, get better at techniques and technologiesReplay,revise, repeat, rehearse,perfect!

Page 6: Introduction: Alice and ICSI110, Programming,

   

How Pixar does it..

http://www.pixar.com/howwedoit/index.htmlNon­trivial projects require

Goal setting, planning and design firstincreasing refinement and adding of details as the project progressesmany steps require test runs, rehearsals, retakes, review­and­improve cycles, etc.

Page 7: Introduction: Alice and ICSI110, Programming,

   

Interaction

Tutorial 3 introduces interaction.Programming interaction with Alice is almost like programming a start­to­finish script.Alice also does (simulated!) simultaneous acting by different actors.

Techie lingo: concurrent, multiple threaded programs

Page 8: Introduction: Alice and ICSI110, Programming,

   

Program and Events

Script == (Computer) ProgramAn event is something that happens because of

audience action (shout, mouse click, key, etc.)or program operation (actors bump, some

 data changes, etc.), that causes the specialpart of the script, written for that kind of event, to be followed.

Event handler==such a special part.

Page 9: Introduction: Alice and ICSI110, Programming,

   

What's nextpeculiarities of programming instructions involving our 3­dimensional world

terminology, tips/techniques of Alice

First Encounter from Chapter 2.Control structures and InteractionInteresting/Creative scenario makingKeeping/Publishing your digital workOrganizing different or similar objects and behaviors using classes

Page 10: Introduction: Alice and ICSI110, Programming,

   

Getting started (Thurs.)You will have read Alice book Ch. up to 2.2.  Covers 3 storyboard options.  We'll learn and use 2.2 stuff: 

 Create or copy initial scene of robot and moon on the moon.Write COMMENTS to say what we want. Write instructions (to run METHODS of our scene's OBJECTS)Use “do in order” and “do together”

    instruction groupingsMake objects change their PROPERTIES

Page 11: Introduction: Alice and ICSI110, Programming,

   

Assignment(before the next class session)read Chapter 2 intro and

Section 1 Scenarios and StoryboardsSection 2 First Program:Prepare to do this in class on Thursday.

Play with Alice in LC­3 or in your own computer

 begin finishing Chapter 2 and go on to Chapter 1..Do (try?) exercise 1­3..save jpg file on

        LC­3 computer's W: drive. Finish Chap 1 & 2 for Tuesday Tuesday, we begin Chap. 3 material.

Page 12: Introduction: Alice and ICSI110, Programming,

   

How to read Boring Manuals..

For step­by­step instructions, try them out on the computer with the book in hand...don't try to memorize! (maybe make notes)

Identify the concepts, particularly when named by vocabulary words...and study THOSE carefully; but stop, ask questions, go back to studying later if you're confused.Details:  read what they are for, plan to REFER to book WHEN (later!) needed.

Page 13: Introduction: Alice and ICSI110, Programming,

   

Alice Concepts Chap 1

Help you create Alice worlds on your own.Virtual 3­d WorldsAlice Objects==3­d ModelsDimensions, directions, centers, distances, positionsThe scene editor

Page 14: Introduction: Alice and ICSI110, Programming,

   

Creating a new virtual world

Create a new world File  New Choose template

Page 15: Introduction: Alice and ICSI110, Programming,

   

Picking from gallery and Adding objects using the Scene Editor

Page 16: Introduction: Alice and ICSI110, Programming,

   

Galleries

Classes (3D models) are found in the galleries  Local gallery (installed with the software)

Minimum or complete options

 CD Gallery (only if CD is in the machine) Web gallery

Page 17: Introduction: Alice and ICSI110, Programming,

   

Middle­top World View WindowMouse is used to

approximately position objects in the sceneCamera Navigation is used to

look at world better and set the camera point of view

when scene editor is active:scene editor window lets you select

quad­view which helps you position eachobject relative to others

Quad­views are used in full­fledged graphicsCheck out Blender in LC­3!

 

Page 18: Introduction: Alice and ICSI110, Programming,

   

Scene Editor FeaturesUpper­left World Outline window

shows all objects by nameMouse left­click selects object so:

it is outlined in the viewerits methods appear in the window below

Mouse right­press reveals Drop­down menus of methods useful to:resize or rotate objectsmore precisely position them in the scenerun methods “by hand,” to see what they do.

use the undo button after each trial!

Page 19: Introduction: Alice and ICSI110, Programming,

   

Demo?

Do you want me to demo this?http:worlds/AliceAxesDemo.a2w

Page 20: Introduction: Alice and ICSI110, Programming,

   

The Camera Positioning Controls

“Move” camera—in the horizontal plane, not changing the direction it points.“Drive” camera­­­Left/Right “steers,” changesthe direction in horiz. plane, Fwd/Back is speed control.“Tilt” camera­­­changes up/down direction

Page 21: Introduction: Alice and ICSI110, Programming,

   

3 Dimensions, 6 DirectionsA 3D object has 

 3 dimensions: height, width, depth

 6 degrees of freedom (independent motions)3 straight line directions3 kinds of rotation

Page 22: Introduction: Alice and ICSI110, Programming,

   

Object Rotation Axis NAMES

Used by airplane pilotsAlice turn and roll methods do these

Yaw=turn left/right

Pitch=turn fwd/back

Roll left/right

Page 23: Introduction: Alice and ICSI110, Programming,

   

Demonstration

The rotations that Alice objects can do around the 3 different axes.Each Alice object has 3 axes attached.aliceLiddell will demonstrate the 3 kinds of rotation....http:worlds/AliceAxesDemo.a2w

Page 24: Introduction: Alice and ICSI110, Programming,

   

Moving one object around another

The “as seen by” option for various movements makes those movements be done around DIFFERENT AXES.That is handy to animate somebody going around something.Demo...http:worlds/AliceTurningDemo.a2w

Page 25: Introduction: Alice and ICSI110, Programming,

   

Each Alice object has a Center chosen by its designer

At the center of mass 

Where it stands on the ground

Where it is held (Depending the model's intended use.)(what's fun...invent a non­intended use.)

Page 26: Introduction: Alice and ICSI110, Programming,

   

Alice Object PartsObjects may be composed of parts(also objects)

Page 27: Introduction: Alice and ICSI110, Programming,

   

ObjectsAn "object" is

 any thing that can be identified as unique from other thingsAlice objects are 3­d models

How is an object unique? has a name has properties:  

width, height, color, location can perform actions (methods):

associated actions it can performtasks it can carry out

Page 28: Introduction: Alice and ICSI110, Programming,

   

What we'll do Thursday.Form teams of two.Follow instructions in Alice book 2­2Ask for HELP (after the storyboard is decided...)

    Do “Incremental Development”make SURE each instruction does what

    you want.write a line or 2, run it, another 1­2, run, etcFIND and FIX problems when they occur

Page 29: Introduction: Alice and ICSI110, Programming,

   

Supplemental/Unused

supplemental or unused slides follow...

Page 30: Introduction: Alice and ICSI110, Programming,

   

Are Pitch, Yaw and Rollreally independent??

????

Page 31: Introduction: Alice and ICSI110, Programming,

   

Classes and ObjectsA class is a template (like a mould, rubber­stamp, master copy, etc.) for creating an 

object.The action of using the class to create an 

object is called instantiating the class.The new object is called an instance of the 

class.An object is a unique entity within a virtual 

world that is the result of instantiating a class.

Page 32: Introduction: Alice and ICSI110, Programming,

   

Class and Objects(instances)

Paid in Full Date_____signed___________

Paid in Full Date_____signed___________

Paid in Full Date_____signed___________

Paid in Full Date_____signed___________

Page 33: Introduction: Alice and ICSI110, Programming,

   

ClassObjects are categorized into classes

Each object is    an instance of the class.

An Alice class is a “master object” stored on the disk; you command Alice to make copies and put them in your world.

Person

Dogs

peter

mary

paul

spike

scottie

fluffy

Page 34: Introduction: Alice and ICSI110, Programming,

   

Instantiating in AliceIn Alice, you instantiate a class by picking something from a gallery.

The new instance automatically goes in the center of the world..you then 

move it to where you want.(and change size, color, parts, etc. from their 

defaults.)

(Just in case you are wondering, Alice 2.0 does not let you program object instantiation in Alice 

code.)

Page 35: Introduction: Alice and ICSI110, Programming,

   

Techniques and Tools

Mouse is used toapproximately position objects in the scene

Camera Navigation is used toset the camera point of view

Drop­down menu methods are used torun methods “by hand”, to LEARN or USE themresize objectsmore precisely position objects in the scene

Quadview is used toposition one object relative to another object

Page 36: Introduction: Alice and ICSI110, Programming,

   

Demo: Saving a worldWriting and testing an animation is an intense load on the computing system – a crash can occur.

Best solution:  save your world every 15 minutes 

(Or at least every half hour)

 also save to a backup system     (flash drive, CDR.  itsnuix.albany.edu file system to be 

explained in future lectures.)

 I  ALWAYS backup  what I don't want to retype!