Title: Introducing Alice to a Squeak Wonderland
1Introducing Alice to aSqueak Wonderland
Jeff Pierce Georgia Institute of
Technology jpierce_at_cc.gatech.edu
2Outline
- About Alice Squeak Alice
- Building An Alice World
- Some Lessons Learned
- Advanced Functionality
3What 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
4Alice is Not...
- Modeler / CAD Package
- Keyframing
- Multimedia Authoring
- VRML Authoring
5What Is Alice For?
- Animated Illustrations
- Games
- Small Virtual Worlds
- Rapid Prototyping
- Teaching
- Question really is What is 3D graphics for?
6Alice 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
7Wonderland
Wonderland Camera Morph
Some generic work space
Wonderland Editor
8Squeak Alice Architecture
User Scripts
Morphic Interface
Wonderland Classes(Actors, Animations, Cameras,
Scheduler, etc.)
Database/Matrix Services
Balloon 3D (Immediate Mode)
9Key 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
10Some UML
manages
WonderlandEditor
WonderlandUndoStack
UndoActions
0..1
0..
parent
child
Wonderland
Hierarchical
WonderlandActor
0..
name
Scheduler
WonderlandScene
B3DPrimitiveEngine
WonderlandCamera
1..
11Scheduler Main Loop
DO Forever Process Any Input Events FOR Each
Scheduled Animation DO Update Affected
Objects FOR Each Camera DO Render the Updated
World
12Design Philosophy
- Focus on Behavior Specification
- Observe the 90/10 Rule
- All Tradeoffs in Favor of the Novice
- Let the Tutorial Drive the Design
13Outline
- About Alice Squeak Alice
- Building An Alice World
- Some Lessons Learned
- Advanced Functionality
14The 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
15Making and Running Scripts
- Define behaviors
- Launch behaviors
- As program runs evaluate new code
- Script window
- GUI tools
- Direct manipulation
- Undo when necessary
16User Observation
- N gt 120
- Two Person Talk Aloud Protocol
- eavesdropping
- Critical Incident Reporting
- exit interviews after extended use
17Demo
18Starting 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
19Filling 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
20Working with the Camera
- camera move back distance 3
- camera turn left
- cameraWindow showCameraControls
- w makeCamera
21Outline
- About Alice Squeak Alice
- Building An Alice World
- Some Lessons Learned
- Advanced Functionality
22 23You (and I) are not our users...
99 My Users
1 You Are Here
99 Our Users
24You (and I) are not our users...
99 My Users
1 You Are Here
99 Our Users
... kids are
25XYZ Considered Harmful
Avoid Small CognitiveHit on Every Operation
26Vocabulary Matters
- X, Y, Z ? Left, Up, Forward
- Translate ? Move
- Rotate ? Turn
- Scale ? Resize
- Depth ? FrontToBack
- RGB Triples ? Color names
- (0, 0, 255) ? blue
27Controlled ExposureTo Power Animation
- Extend, Dont Abandon Knowledge
- Optional Keywords
- Allow combinations when possible
- Distance Speed x Time
- Duration
- Speed
- Style (interpolation function)
28Animation 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
29All Actors Are Reference Frames
- Controlled Exposure To Power
- Optional asSeenBy keywordbunny move forward
distance 1bunny move forward distance 1
asSeenBy camera
30Turning at Speed
- bunny turn left speed 2
- Units?
31N50
32N50
33Turn
- 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
34Roll Is
- Invisible to 70 of Subjects
- bunny roll left turns 1
- bunny roll right turns 1
35Scale (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.
36Parts
- First-Class and Part properties
- Distinct from Parent-Child relationship
- Boundaries in the scene graph
37More About Parts
- Picking
- Property setting (color)
- Delete
Table
Ball
Legs (parts)
38More About Parts
- Picking
- Property setting (color)
- Delete
Table
Ball
Legs (parts)
39Pulling Objects Apart
40Numbers 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
41Undo
- 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
42Problems 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
43Novices Want End-to-End
3D Paint Tool by Dennis Cosgrove
Teddy by Takeo Igarashi
44Constructing New Objects
- Can use Pooh (demo)
- Can construct from pieces
- makeActor
- makeActorNamed
- makePlaneNamed
45Outline
- About Alice Squeak Alice
- Building An Alice World
- Some Lessons Learned
- Advanced Functionality
46Some Higher Level Commands
- bunny pointAt toySoldier
- bunny alignWith toySoldier
- bunny place onTopOf
- object toySoldier
- bunny standUp
- bunny destroy 2
- bunny resizeLikeRubber dimension topToBottom
47Animations Are Objects
- spin bunny turn left turns 1
- spin pause
- spin resume
- spin stop
- spin start
- spin loop 2
- spin loop
- spin stopLooping
48Composing 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
49Adding 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
50Animating Morphs
- cameraWindow move right distance 100
- cameraWindow move right distance 500 duration
4 - w getEditor move left distance 200
- cameraWindow sendToFront
- cameraWindow sendToBack
51Blending 2D and 3D
- Initial scene
- camera turnBackgroundOff
- ground hide
- Compose with 2D
52Screen vs. Scene Points
- bunny head pointAt camera duration eachFrame.
- bunny head doEachFrame bunny head pointAt
(camera transformScreenPointToScenePoint (Sensor
mousePoint) using bunny) duration rightNow .
53Around and Around
54Using Alarms
- myAlarm Alarm do bunny turn left turns 1
in 5 inScheduler scheduler - scheduler getTime
55Getting 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.
56Availability
- 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
57Introducing Alice to aSqueak Wonderland
Jeff Pierce Georgia Institute of
Technology jpierce_at_cc.gatech.edu