Introducing Alice to a Squeak Wonderland - PowerPoint PPT Presentation

1 / 57
About This Presentation
Title:

Introducing Alice to a Squeak Wonderland

Description:

Games. Small Virtual Worlds. Rapid Prototyping. Teaching ... Make 'what if' cost-free. Animates. Users are insensitive to duration ... – PowerPoint PPT presentation

Number of Views:171
Avg rating:3.0/5.0
Slides: 58
Provided by: jeffp8
Category:

less

Transcript and Presenter's Notes

Title: Introducing Alice to a Squeak Wonderland


1
Introducing Alice to aSqueak Wonderland
Jeff Pierce Georgia Institute of
Technology jpierce_at_cc.gatech.edu
2
Outline
  • About Alice Squeak Alice
  • Building An Alice World
  • Some Lessons Learned
  • Advanced Functionality

3
What Alice Is...
  • Allows novices to write scripts that control
    interactive 3D graphics
  • Novices
  • 19 year old (non-engineering) college
    undergraduates
  • Like 3D LOGO
  • with threads

4
Alice is Not...
  • Modeler / CAD Package
  • Keyframing
  • Multimedia Authoring
  • VRML Authoring

5
What Is Alice For?
  • Animated Illustrations
  • Games
  • Small Virtual Worlds
  • Rapid Prototyping
  • Teaching
  • Question really is What is 3D graphics for?

6
Alice Squeak Alice
  • Alice
  • Developed by Stage 3 Research group, Randy Pausch
    director, at UVA and CMU
  • Squeak Alice
  • Port of Alice to Squeak
  • Draws on the lessons learned, some differences in
    functionality

7
Wonderland
Wonderland Camera Morph
Some generic work space
Wonderland Editor
8
Squeak Alice Architecture
User Scripts
Morphic Interface
Wonderland Classes(Actors, Animations, Cameras,
Scheduler, etc.)
Database/Matrix Services
Balloon 3D (Immediate Mode)
9
Key Squeak Alice Classes
  • Wonderland
  • Encapsulates a 3D world
  • WonderlandActor
  • Encapsulates behaviors for actors
  • WonderlandCamera
  • Responsible for drawing the world
  • Scheduler
  • Responsible for making time pass

10
Some UML
manages
WonderlandEditor
WonderlandUndoStack
UndoActions
0..1
0..
parent
child
Wonderland
Hierarchical
WonderlandActor
0..
name
Scheduler
WonderlandScene
B3DPrimitiveEngine
WonderlandCamera
1..
11
Scheduler Main Loop
DO Forever Process Any Input Events FOR Each
Scheduled Animation DO Update Affected
Objects FOR Each Camera DO Render the Updated
World
12
Design Philosophy
  • Focus on Behavior Specification
  • Observe the 90/10 Rule
  • All Tradeoffs in Favor of the Novice
  • Let the Tutorial Drive the Design

13
Outline
  • About Alice Squeak Alice
  • Building An Alice World
  • Some Lessons Learned
  • Advanced Functionality

14
The Process
  • (1) Create Models
  • Objects created in external CAD Packages
  • (2) Paint Textures on Models
  • Unfolding and (U,V) coordinate mapping
  • Good tools somewhat rare on PC
  • (3) Scripting

15
Making and Running Scripts
  • Define behaviors
  • Launch behaviors
  • As program runs evaluate new code
  • Script window
  • GUI tools
  • Direct manipulation
  • Undo when necessary

16
User Observation
  • N gt 120
  • Two Person Talk Aloud Protocol
  • eavesdropping
  • Critical Incident Reporting
  • exit interviews after extended use

17
Demo
18
Starting With Wonderland
  • Wonderland new
  • (In Squeak, from FileList, open a model .mdl
    file)
  • Opens a WonderlandCameraMorph and Wonderland
    Editor
  • Within editor
  • w is the current Wonderland
  • camera is the current camera
  • cameraWindow is the cameras window

19
Filling a Wonderland
  • Wonderlands understand 3D Design Studio and VRML
  • w makeActorFromVRML blah.vrml
  • w makeActorFrom3DS blah.3ds
  • But quality tends to be low. Best
  • w makeActorFrom blah.mdl

20
Working with the Camera
  • camera move back distance 3
  • camera turn left
  • cameraWindow showCameraControls
  • w makeCamera

21
Outline
  • About Alice Squeak Alice
  • Building An Alice World
  • Some Lessons Learned
  • Advanced Functionality

22
  • First, a disclaimer...

23
You (and I) are not our users...
99 My Users
1 You Are Here
99 Our Users
24
You (and I) are not our users...
99 My Users
1 You Are Here
99 Our Users
... kids are
25
XYZ Considered Harmful
Avoid Small CognitiveHit on Every Operation
26
Vocabulary Matters
  • X, Y, Z ? Left, Up, Forward
  • Translate ? Move
  • Rotate ? Turn
  • Scale ? Resize
  • Depth ? FrontToBack
  • RGB Triples ? Color names
  • (0, 0, 255) ? blue

27
Controlled ExposureTo Power Animation
  • Extend, Dont Abandon Knowledge
  • Optional Keywords
  • Allow combinations when possible
  • Distance Speed x Time
  • Duration
  • Speed
  • Style (interpolation function)

28
Animation Examples
  • bunny move up
  • bunny move up distance 1
  • bunny move up distance 1 duration 5
  • bunny move up distance 1 speed 2
  • bunny move up speed 2
  • bunny move up speed 2 for 5
  • bunny move up distance 1 style abruptly

29
All Actors Are Reference Frames
  • Controlled Exposure To Power
  • Optional asSeenBy keywordbunny move forward
    distance 1bunny move forward distance 1
    asSeenBy camera

30
Turning at Speed
  • bunny turn left speed 2
  • Units?

31
N50
32
N50
33
Turn
  • There are only two kinds of turning
  • bunny turn left turns 1
  • bunny turn right turns 1
  • bunny turn forward turns 1
  • bunny turn back turns 1

34
Roll Is
  • Invisible to 70 of Subjects
  • bunny roll left turns 1
  • bunny roll right turns 1

35
Scale (Resize)
  • bunny resize 0.5
  • Scale is a terrible term
  • Many traditional APIs
  • Matrix Scale Scaled Space
  • Alice
  • Keeps separate position/orientation and scale
    matrices. A meter is always a meter.

36
Parts
  • First-Class and Part properties
  • Distinct from Parent-Child relationship
  • Boundaries in the scene graph

37
More About Parts
  • Picking
  • Property setting (color)
  • Delete

Table
Ball
Legs (parts)
38
More About Parts
  • Picking
  • Property setting (color)
  • Delete

Table
Ball
Legs (parts)
39
Pulling Objects Apart
  • Is it still a part?

40
Numbers Matter
  • Importance of 0 and 1
  • Users often try 1 when they need a number
  • Alice uses 0..1 for all bounded ranges
  • Novices do not understand magic ranges (0..255,
    0..32767)
  • 1/4 0.25, not 0
  • We changed integer division in Python
  • Not a problem in Squeak

41
Undo
  • Make what if cost-free
  • Animates
  • Users are insensitive to duration
  • Users are sometimes sensitive to path
  • Some operations tricky
  • start an animation, then UNDO

42
Problems With Scripting
  • Case sensitivity (85)
  • Bunny and bunny the same for novices
  • We made Python case insensitive
  • This is problematic for Squeak
  • Typing (63)
  • Syntax (45)
  • parentheses, dots, commas

43
Novices Want End-to-End
3D Paint Tool by Dennis Cosgrove
Teddy by Takeo Igarashi
44
Constructing New Objects
  • Can use Pooh (demo)
  • Can construct from pieces
  • makeActor
  • makeActorNamed
  • makePlaneNamed

45
Outline
  • About Alice Squeak Alice
  • Building An Alice World
  • Some Lessons Learned
  • Advanced Functionality

46
Some Higher Level Commands
  • bunny pointAt toySoldier
  • bunny alignWith toySoldier
  • bunny place onTopOf
  • object toySoldier
  • bunny standUp
  • bunny destroy 2
  • bunny resizeLikeRubber dimension topToBottom

47
Animations Are Objects
  • spin bunny turn left turns 1
  • spin pause
  • spin resume
  • spin stop
  • spin start
  • spin loop 2
  • spin loop
  • spin stopLooping

48
Composing Animations
  • jump bunny move up distance 1.
  • fall bunny move down distance 1.
  • hop w doInOrder jump. fall.
  • hop start
  • spinJump w doTogether hop. bunny turn
    left turns 1.
  • spinJump loop

49
Adding Responses
  • newReaction
  • bunny respondWith event bunny turn
    left turns 1 to leftMouseClick
  • bunny addResponse event bunny move up
    distance 2 to leftMouseClick
  • bunny removeResponse newReaction to
    leftMouseClick

50
Animating Morphs
  • cameraWindow move right distance 100
  • cameraWindow move right distance 500 duration
    4
  • w getEditor move left distance 200
  • cameraWindow sendToFront
  • cameraWindow sendToBack

51
Blending 2D and 3D
  • Initial scene
  • camera turnBackgroundOff
  • ground hide
  • Compose with 2D

52
Screen vs. Scene Points
  • bunny head pointAt camera duration eachFrame.
  • bunny head doEachFrame bunny head pointAt
    (camera transformScreenPointToScenePoint (Sensor
    mousePoint) using bunny) duration rightNow .

53
Around and Around
54
Using Alarms
  • myAlarm Alarm do bunny turn left turns 1
    in 5 inScheduler scheduler
  • scheduler getTime

55
Getting rid of the editor
  • In workspace
  • w Wonderland new.
  • w getEditor hide.
  • w makeActorFrom 'vehicles\ArmyCopter.mdl'.
  • (w getNamespace at 'armyCopter') rotor turn
    left turns 5.

56
Availability
  • Squeak Alice
  • Runs on anything Squeak does
  • Free
  • http//www.squeak.org
  • Alice
  • Runs on Windows 95 / 98 / 2000 / NT / XP
  • Free
  • http//www.alice.org

57
Introducing Alice to aSqueak Wonderland
Jeff Pierce Georgia Institute of
Technology jpierce_at_cc.gatech.edu
Write a Comment
User Comments (0)
About PowerShow.com