SlideShare a Scribd company logo
CS320n – Elements of Visual
Programming
Introduction to Alice
Mike Scott
(Slides 1-1)
Visual Programming Introduction to Alice 2
What We Will Do Today
• look at the Alice programming
environment
• create some simple programs in Alice
Visual Programming Introduction to Alice 3
What is Alice?
• Named in honor of Lewis Carroll’s (pen
name) Alice in Wonderland
– Charles Lutwidge Dodgson was also a
mathematician and logician
• A modern programming tool
– purpose of tool, learn how to program, write
algorithms
– 3-D graphics
– 3-D models of objects
• Animation
– Objects can be made to move around virtual
world (a simulation or a video game. Simple
Pixar.)
Visual Programming Introduction to Alice 4
Computer Programs
• General purpose programming languages
can be used for almost any task
• Alice is not a general purpose
programming language.
– It is an application specific language
– designed for a specific task, creating 3D
animations
– lots of application specific languages.
Example: language for working with DNA data
Visual Programming Introduction to Alice 5
Fundamental Tools
• All languages contain these elements
1. list of instructions – “Pack lunch, pack snack, put
homework in backpack.”
2. decision making – “If I didn’t shave yesterday,
shave today.”
3. repetition of behavior – “Do a load of laundry until
there is no more dirty laundry.”
4. modularization. Big rocks into little rocks. “To do a
load of laundry: gather clothes, get clothes right-
side out, put clothes of similar color into washing
machine…”
5. Generalization: Solve many different problems with
one set of instructions
6. Compute a result – “How much is it going to cost to
fill up my car with gas?”
Visual Programming Introduction to Alice 6
What does Alice run on?
• Alice is free.
• Alice is written in Java
– only working versions are for PCs and Macs
with OSX 10.3 or higher (relatively new, may
still have bugs)
– Sorry, no Linux, yet
– the book comes with a copy of Alice for
Windows machines
– www.alice.org
– also on the computers in the CS Elements lab
Visual Programming Introduction to Alice 7
Fast Start Up
• Can quickly learn to create
– a simple animation in a matter of minutes
– a non-trivial animation in a few class periods
• Can learn to use the Alice interface in a
few class periods if you do a couple of
exercises at home
Visual Programming Introduction to Alice 8
Installing Alice
• If you want to install Alice on you computer at home
– use the CD that comes with the textbook
• CD installation is straightforward
– download Alice from the web
• http://www.alice.org/downloads/authoringtool/
• file format is .zip
• must “unzip” file using a program such as winzip
• problems? post to newsgroup
Visual Programming Introduction to Alice 9
Memory Management
• Alice automatically manages memory
• But, writing and testing an animation is an
intense load on the computing system
– a crash can occur.
• Best solution:
• Alice (the program) reminds you every so often
so save your work
• save your programs often!
• if working in lab when you logout the computer is
wiped -> save to your account or to a backup
system such as a memory stick
Visual Programming Introduction to Alice 10
The Power of Alice
• Automatically keeps track of 3-D objects
– what objects are in the virtual world
– types of objects
– positions of objects in the world
Visual Programming Introduction to Alice 11
Demo
• Starting Alice
• Loading a World
• Running A World
• Saving a World
• How to Exit
Visual Programming Introduction to Alice 12
The World
• Alice Programs / Movies take place in a
virtual world
• When you start a new world in Alice you
select the background
•The world consists
of a sky and the ground
•Can’t be changed after
creating the world
•the world is not infinite
DEMO
(I don’t like roller
coasters any more)
Visual Programming Introduction to Alice 13
Objects in Alice
• Objects already exist. Hundreds of them
Visual Programming Introduction to Alice 14
Program an Object
Visual Programming Introduction to Alice 15
Where Do Objects Come From?
• They are pre built
– creating 3D objects is another area of computing and graphic
design
• Sources of 3D objects
– the local gallery that comes with the software
– Alice web gallery
• How are objects added to the world?
Visual Programming Introduction to Alice 16
Adding Objects
• Click on the green “Add Objects” button
• World expands and local gallery displayed
Visual Programming Introduction to Alice 17
Adding Objects
• Local gallery divided into a directory based
on subject
• add instances of objects to world by
– dragging and dropping or
– click on object and select add instance option
Visual Programming Introduction to Alice 18
Objects in the World
• Can have multiple instances of objects
from the same class in the World
– class: like a cookie cutter
– objects: like the cookies
star cookie cutter
star cookie class
star cookies
star cookie objects
Visual Programming Introduction to Alice 19
Objects in the World
penguin class penguin objects in a virtual world
Visual Programming Introduction to Alice 20
Objects in the World
• The Objects that are present in the current
world are listed in the Object Tree
• The top left panel in the Alice
programming environment
• Every world comes with a
light, a camera (point of
view for the movie when
played), and the ground
Visual Programming Introduction to Alice 21
Object Dimensions
• Objects in Alice worlds are 3 dimensional
height width depth
Visual Programming Introduction to Alice 22
Object Position
• Objects
– are positioned in 3-D space
– Have six degrees of freedom (directions of movement)
Visual Programming Introduction to Alice 23
Objects “Know” Relative Directions
• Yellow box around
penguin is its
bounding box
• light blue line is
up/down
• pink line is
left/right
• dark blue line is
forward backward
• DEMO
Visual Programming Introduction to Alice 24
Exercises
• if you want to work at home, install Alice on
your computer
• Complete Appendix A, Part 1, using Alice
– a walkthrough of using Alice
• Complete the tutorials that come with Alice
Visual Programming Introduction to Alice 25
Starting Tutorials

More Related Content

PPT
Introduction to visual basic programming
PPTX
Visual Programming
PDF
Visual Basic 6.0
PPTX
Presentation on visual basic 6 (vb6)
PPT
Visual basic ppt for tutorials computer
PPTX
Alice part 2 – background objects
PDF
PPT
Alice 2 (Pp Tminimizer)
Introduction to visual basic programming
Visual Programming
Visual Basic 6.0
Presentation on visual basic 6 (vb6)
Visual basic ppt for tutorials computer
Alice part 2 – background objects
Alice 2 (Pp Tminimizer)

Viewers also liked (20)

PDF
Specification of a Visual Programming Language by Example
PPTX
Visual basics Express Project
PDF
Visual basic 6
PPT
Html tag
PPTX
Visual basic 6.0
PPT
Visual basic 6.0
PPTX
visual basic 6.0
PPTX
Visual programming
DOC
Visual Basic
PPTX
PDF
Chapter 2
PPT
Visual Basic 6.0
PPT
visual basic for the beginner
PPT
Visual Basic Programming
PPTX
Osi model
PPTX
Chapter 1 — Introduction to Visual Basic 2010 Programming
PPTX
Cryptography
PPTX
Visual Basic Controls ppt
PPTX
Osi model vs TCP/IP
PDF
Visual Basic 6.0
Specification of a Visual Programming Language by Example
Visual basics Express Project
Visual basic 6
Html tag
Visual basic 6.0
Visual basic 6.0
visual basic 6.0
Visual programming
Visual Basic
Chapter 2
Visual Basic 6.0
visual basic for the beginner
Visual Basic Programming
Osi model
Chapter 1 — Introduction to Visual Basic 2010 Programming
Cryptography
Visual Basic Controls ppt
Osi model vs TCP/IP
Visual Basic 6.0
Ad

Similar to Visual programming (20)

PDF
Alice ppt ch01
PPT
Alice (Graphic Tool)
PPTX
CSC116-Topic4 .pptx
PPT
Sigcse Tea Party 2007
PDF
Learning to program with Alice 2nd ed Edition Dann
PPTX
CCSC RM Alice Tutorial
PDF
Alice01
PPTX
Programming-In-Alice.pptx
PDF
Alice 3
PPTX
4.14.tarek
PPTX
4.14.tarek
PPT
03a-IntroductionToEventDrivenProgramming.ppt
PPT
03a-IntroductionToEventDrivenProgramming.ppt
PPTX
4 reasons you don’t use java’s gui capabilities
ODP
PDQ Programming Languages plus an overview of Alice - Frank Ducrest
PPTX
ITC 101 Programming Module
PPTX
Programming with Alice - Class Overview
PDF
201003 Alice (part 1/15)
Alice ppt ch01
Alice (Graphic Tool)
CSC116-Topic4 .pptx
Sigcse Tea Party 2007
Learning to program with Alice 2nd ed Edition Dann
CCSC RM Alice Tutorial
Alice01
Programming-In-Alice.pptx
Alice 3
4.14.tarek
4.14.tarek
03a-IntroductionToEventDrivenProgramming.ppt
03a-IntroductionToEventDrivenProgramming.ppt
4 reasons you don’t use java’s gui capabilities
PDQ Programming Languages plus an overview of Alice - Frank Ducrest
ITC 101 Programming Module
Programming with Alice - Class Overview
201003 Alice (part 1/15)
Ad

More from Muhammad Bilal Tariq (6)

PPT
Relational database management system
PPTX
Ch1-Operating System Concepts
PPTX
Ch1-Operating System Concept
PPT
INTRODUCTION TO DATABASE
PDF
PPTX
Exponential probability distribution
Relational database management system
Ch1-Operating System Concepts
Ch1-Operating System Concept
INTRODUCTION TO DATABASE
Exponential probability distribution

Recently uploaded (20)

PDF
An interstellar mission to test astrophysical black holes
DOCX
Viruses (History, structure and composition, classification, Bacteriophage Re...
PDF
Formation of Supersonic Turbulence in the Primordial Star-forming Cloud
PPTX
GEN. BIO 1 - CELL TYPES & CELL MODIFICATIONS
PPTX
famous lake in india and its disturibution and importance
PDF
Biophysics 2.pdffffffffffffffffffffffffff
PPTX
The KM-GBF monitoring framework – status & key messages.pptx
PPTX
ognitive-behavioral therapy, mindfulness-based approaches, coping skills trai...
PPTX
TOTAL hIP ARTHROPLASTY Presentation.pptx
PPTX
INTRODUCTION TO EVS | Concept of sustainability
PPTX
Comparative Structure of Integument in Vertebrates.pptx
PDF
IFIT3 RNA-binding activity primores influenza A viruz infection and translati...
PPTX
cpcsea ppt.pptxssssssssssssssjjdjdndndddd
PPTX
EPIDURAL ANESTHESIA ANATOMY AND PHYSIOLOGY.pptx
PDF
Placing the Near-Earth Object Impact Probability in Context
PDF
HPLC-PPT.docx high performance liquid chromatography
PPTX
Derivatives of integument scales, beaks, horns,.pptx
PPTX
2Systematics of Living Organisms t-.pptx
PPTX
Introduction to Cardiovascular system_structure and functions-1
PPTX
7. General Toxicologyfor clinical phrmacy.pptx
An interstellar mission to test astrophysical black holes
Viruses (History, structure and composition, classification, Bacteriophage Re...
Formation of Supersonic Turbulence in the Primordial Star-forming Cloud
GEN. BIO 1 - CELL TYPES & CELL MODIFICATIONS
famous lake in india and its disturibution and importance
Biophysics 2.pdffffffffffffffffffffffffff
The KM-GBF monitoring framework – status & key messages.pptx
ognitive-behavioral therapy, mindfulness-based approaches, coping skills trai...
TOTAL hIP ARTHROPLASTY Presentation.pptx
INTRODUCTION TO EVS | Concept of sustainability
Comparative Structure of Integument in Vertebrates.pptx
IFIT3 RNA-binding activity primores influenza A viruz infection and translati...
cpcsea ppt.pptxssssssssssssssjjdjdndndddd
EPIDURAL ANESTHESIA ANATOMY AND PHYSIOLOGY.pptx
Placing the Near-Earth Object Impact Probability in Context
HPLC-PPT.docx high performance liquid chromatography
Derivatives of integument scales, beaks, horns,.pptx
2Systematics of Living Organisms t-.pptx
Introduction to Cardiovascular system_structure and functions-1
7. General Toxicologyfor clinical phrmacy.pptx

Visual programming

  • 1. CS320n – Elements of Visual Programming Introduction to Alice Mike Scott (Slides 1-1)
  • 2. Visual Programming Introduction to Alice 2 What We Will Do Today • look at the Alice programming environment • create some simple programs in Alice
  • 3. Visual Programming Introduction to Alice 3 What is Alice? • Named in honor of Lewis Carroll’s (pen name) Alice in Wonderland – Charles Lutwidge Dodgson was also a mathematician and logician • A modern programming tool – purpose of tool, learn how to program, write algorithms – 3-D graphics – 3-D models of objects • Animation – Objects can be made to move around virtual world (a simulation or a video game. Simple Pixar.)
  • 4. Visual Programming Introduction to Alice 4 Computer Programs • General purpose programming languages can be used for almost any task • Alice is not a general purpose programming language. – It is an application specific language – designed for a specific task, creating 3D animations – lots of application specific languages. Example: language for working with DNA data
  • 5. Visual Programming Introduction to Alice 5 Fundamental Tools • All languages contain these elements 1. list of instructions – “Pack lunch, pack snack, put homework in backpack.” 2. decision making – “If I didn’t shave yesterday, shave today.” 3. repetition of behavior – “Do a load of laundry until there is no more dirty laundry.” 4. modularization. Big rocks into little rocks. “To do a load of laundry: gather clothes, get clothes right- side out, put clothes of similar color into washing machine…” 5. Generalization: Solve many different problems with one set of instructions 6. Compute a result – “How much is it going to cost to fill up my car with gas?”
  • 6. Visual Programming Introduction to Alice 6 What does Alice run on? • Alice is free. • Alice is written in Java – only working versions are for PCs and Macs with OSX 10.3 or higher (relatively new, may still have bugs) – Sorry, no Linux, yet – the book comes with a copy of Alice for Windows machines – www.alice.org – also on the computers in the CS Elements lab
  • 7. Visual Programming Introduction to Alice 7 Fast Start Up • Can quickly learn to create – a simple animation in a matter of minutes – a non-trivial animation in a few class periods • Can learn to use the Alice interface in a few class periods if you do a couple of exercises at home
  • 8. Visual Programming Introduction to Alice 8 Installing Alice • If you want to install Alice on you computer at home – use the CD that comes with the textbook • CD installation is straightforward – download Alice from the web • http://www.alice.org/downloads/authoringtool/ • file format is .zip • must “unzip” file using a program such as winzip • problems? post to newsgroup
  • 9. Visual Programming Introduction to Alice 9 Memory Management • Alice automatically manages memory • But, writing and testing an animation is an intense load on the computing system – a crash can occur. • Best solution: • Alice (the program) reminds you every so often so save your work • save your programs often! • if working in lab when you logout the computer is wiped -> save to your account or to a backup system such as a memory stick
  • 10. Visual Programming Introduction to Alice 10 The Power of Alice • Automatically keeps track of 3-D objects – what objects are in the virtual world – types of objects – positions of objects in the world
  • 11. Visual Programming Introduction to Alice 11 Demo • Starting Alice • Loading a World • Running A World • Saving a World • How to Exit
  • 12. Visual Programming Introduction to Alice 12 The World • Alice Programs / Movies take place in a virtual world • When you start a new world in Alice you select the background •The world consists of a sky and the ground •Can’t be changed after creating the world •the world is not infinite DEMO (I don’t like roller coasters any more)
  • 13. Visual Programming Introduction to Alice 13 Objects in Alice • Objects already exist. Hundreds of them
  • 14. Visual Programming Introduction to Alice 14 Program an Object
  • 15. Visual Programming Introduction to Alice 15 Where Do Objects Come From? • They are pre built – creating 3D objects is another area of computing and graphic design • Sources of 3D objects – the local gallery that comes with the software – Alice web gallery • How are objects added to the world?
  • 16. Visual Programming Introduction to Alice 16 Adding Objects • Click on the green “Add Objects” button • World expands and local gallery displayed
  • 17. Visual Programming Introduction to Alice 17 Adding Objects • Local gallery divided into a directory based on subject • add instances of objects to world by – dragging and dropping or – click on object and select add instance option
  • 18. Visual Programming Introduction to Alice 18 Objects in the World • Can have multiple instances of objects from the same class in the World – class: like a cookie cutter – objects: like the cookies star cookie cutter star cookie class star cookies star cookie objects
  • 19. Visual Programming Introduction to Alice 19 Objects in the World penguin class penguin objects in a virtual world
  • 20. Visual Programming Introduction to Alice 20 Objects in the World • The Objects that are present in the current world are listed in the Object Tree • The top left panel in the Alice programming environment • Every world comes with a light, a camera (point of view for the movie when played), and the ground
  • 21. Visual Programming Introduction to Alice 21 Object Dimensions • Objects in Alice worlds are 3 dimensional height width depth
  • 22. Visual Programming Introduction to Alice 22 Object Position • Objects – are positioned in 3-D space – Have six degrees of freedom (directions of movement)
  • 23. Visual Programming Introduction to Alice 23 Objects “Know” Relative Directions • Yellow box around penguin is its bounding box • light blue line is up/down • pink line is left/right • dark blue line is forward backward • DEMO
  • 24. Visual Programming Introduction to Alice 24 Exercises • if you want to work at home, install Alice on your computer • Complete Appendix A, Part 1, using Alice – a walkthrough of using Alice • Complete the tutorials that come with Alice
  • 25. Visual Programming Introduction to Alice 25 Starting Tutorials