Introduction to csci 1 l.jpg
This presentation is the property of its rightful owner.
Sponsored Links
1 / 56

Introduction to CSCI 1 PowerPoint PPT Presentation

Introduction to CSCI 1 How this class will work http://users.drew.edu/sbradsha/CSCI1-Spring2007/ Alice A modern programming tool 3-D graphics 3-D models of objects Animation Objects can be made to move around the virtual world (a video game or simulation implemented in 3-D)

Download Presentation

Introduction to CSCI 1

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Introduction to csci 1 l.jpg

Introduction to CSCI 1


How this class will work l.jpg

How this class will work

  • http://users.drew.edu/sbradsha/CSCI1-Spring2007/


Alice l.jpg

Alice

  • A modern programming tool

    • 3-D graphics

    • 3-D models of objects

  • Animation

    • Objects can be made to move around the virtual world (a video game or simulation implemented in 3-D)


The basics of programming l.jpg

The basics of programming

  • A computer program is a set of instructions that tell the computer what to do

  • It is important to write your programs in an “elegant” fashion.

  • Huh?

  • Two primary functions:

    • To tell the computer what to do

    • To tell other humans what you want the computer to do


Elegant programs l.jpg

Elegant programs

  • A program is elegant if other humans can easily understand and appreciate the intentions of the original programmer.

  • Your goal should be to make your program easy to read, even by someone not a programmer

  • Should not require any head scratching


Programs composed from simple ideas l.jpg

Programs composed from simple ideas

  • A list of instructions like a recipe

  • Ifs (e.g., if it is raining, take an umbrella)

  • Repeating behavior (e.g., while there are cookies on your plate, keeping eating cookies) usually called looping or iteration

  • Breaking things up into smaller pieces

  • Compute a result


Simple ideas cont d l.jpg

Simple ideas, cont’d

  • Programming is just using these ideas in various combinations

  • Most computers understand only about 100 distinct instructions

  • The millions of programs that run on a computer use these instructions in different orders and combinations

  • Like chess in this way


Alice concepts l.jpg

Alice concepts


Concept virtual world l.jpg

Concept: Virtual world

  • Video game or simulation implemented in 3D

2D vs. 3D


Virtual world cont d l.jpg

Virtual world, cont’d

  • Virtual worlds provide an environment that allow us to simulate the type of interactions with which we are familiar in the real world.


Concept object l.jpg

Concept: Object

  • An "object" is

    • any thing that can be identified as unique from other things

  • How is an object unique?

    • has a name

    • has properties:

      • width, height, color, location

    • can perform actions (methods):

      • associated actions it can perform

      • tasks it can carry out


Object parts l.jpg

Object Parts

  • Objects may be composed of parts


3d models l.jpg

3D models

  • In Alice, nearly all objects are represented by 3D models

  • These are the animals, people, cars, anvils, etc. that you add to a world

  • 3D models are found in the Alice galleries

  • Alice is not a 3D graphics drawing program

  • With the exception of he-builder and she-builder we use pre-defined models


Concept 3 dimensions 6 directions l.jpg

Concept: 3 Dimensions, 6 Directions

  • A 3D object has

    • 3 dimensions

      • height, width, depth

    • 6 degrees of freedom (directions of movement)


Concept center of an object l.jpg

Concept: Center of an object

  • At the center of mass

  • Where it stands on the ground

  • Where it is held

  • Distance between objects is measured from their centers

  • An object’s position in the world is given by its center


Class l.jpg

peter

Person

paul

mary

spike

Dogs

scottie

fluffy

Class

  • Objects are categorized into classes

  • Each object is

    an instance of the class.

  • All objects in a class have similar propertiesand generally can perform the same tasks.


Appendix a exploring alice l.jpg

Appendix A: Exploring Alice

  • World 1:Open World…Week1AppendixA_FirstWorld.a2w

  • Play


Appendix a exploring alice18 l.jpg

Appendix A: exploring Alice

  • Notice the Object Tree contains all of the objects in the world.

  • The camera and the

    light are in every

    Alice word.


Object parts a closer look l.jpg

Object Parts: A closer look


Introduction to the code l.jpg

Introduction to the "code"

  • Look at Hare in the Object tree

    • Expand to find the hare's ears

  • Notice that the hare's left ear moves forward and back in this animation.

  • Let's modify this animation


Modifying code l.jpg

Modifying code

  • Let's change the movement to go left and right instead of forward and backward.

  • PLAY


Modifying code22 l.jpg

Modifying code

  • Let’s make the RIGHT ear move.


Modifying code23 l.jpg

Modifying code

  • Finally

    • Let's change this one last time so that the RIGHT ear moves forward and back.

    • PLAY


Interactive world l.jpg

Interactive World

  • Open New World

    • Open AppendixA_DancingBee.a2w

  • Play

    • Press Up-Arrow key

    • Press space bar


Two types of worlds l.jpg

Two types of worlds

  • Movie World

    • movie runs from beginning to end

  • Interactive World

    • you choose how animation runs (events)


Creating your own world l.jpg

Creating your own world

  • File menuNew World

    • grass template

  • Save World As MyFirstTry

    • Navigate to the appropriate folder


Creating your own world27 l.jpg

Creating your own world

  • Add Objects

  • Search Gallery allows you to choose objects

Click Folder


Objects l.jpg

Objects

  • An "object" is

    • any thing that can be identified as unique from other things

  • How is an object unique?

    • has a name

    • has properties:

      • width, height, color, location

    • can perform actions (methods):

      • associated actions it can perform

      • tasks it can carry out


Galleries l.jpg

Galleries

  • Classes (3D models) are found in the galleries

    • Local gallery (installed with the software)

      • Minimum or complete options

    • Web gallery


Choose local gallery l.jpg

Choose Local Gallery

  • PeopleAdd

    • snowMan (2 ways to add to world)

      • Drag snowman to world

      • Click and Add Instance to world

    • snowWoman


Controls l.jpg

Click on snowman and experiment with controls.

Click on snowWoman and check "affectparts"

delete her hat.

Controls


Controls32 l.jpg

Controls


Controls33 l.jpg

Camera

Top

Side

Front

Controls


More controls l.jpg

Moving the camera

changes the view of the world

Go slowly.

More controls


New worlds l.jpg

New worlds

  • Add all objects when you create the world.

  • Use mouse and camera controls to arrange objects at the scene.


Assignment l.jpg

Assignment

  • Read (before the next class session)

    Chapter 1

    • Section 1, Introduction to Alice

    • Section 2, Alice Concepts

    • Tips & Techniques 1, Special Effects


Object oriented programming and alice l.jpg

Object-oriented programming and Alice

  • In designing modern software we work from an algorithm.

  • An algorithm is a plan for solving a problem by following a sequence of steps

  • To help manage the growing complexity of software, computer scientists introduced the concept of OOP some time ago


Slide38 l.jpg

OOP

  • An object can be something in the physical world or just an abstract idea

  • Airplane (auto-pilot program)

  • A bank transaction (ATM software)

  • The code that manipulate the properties of an object are called the object’s methods

  • We can think of an object as a collection of its properties and methods

  • The values stored in the properties of an object are called collectively know as the object’s state

  • OOP algorithms define interactions between objects

  • An OO program uses objects as tools to do its work


Exploring the alice interface l.jpg

Exploring the Alice Interface

  • Alice is an example of an Integrated Development Environment (IDE)

  • An IDE is a computer program used to write other computer programs

  • The Alice IDE is often called the Alice interface


Welcome to alice dialog l.jpg

Welcome to Alice! dialog


Tutorials tab l.jpg

Tutorials tab


Recent worlds tab l.jpg

Recent worlds tab


Examples tab l.jpg

Examples tab


Open a world tab l.jpg

Open a world tab

Navigation

Folders

Files

Controls


Slide45 l.jpg

World Window

Events Area

Object Tree

Details Area

Editor Area


Object tree l.jpg

Object Tree


Details area l.jpg

Details Area


Editor area l.jpg

Editor Area


Events area l.jpg

Events Area


Slide50 l.jpg

event trigger

event handler

event handler

event handler


World window l.jpg

World Window


Trashcan and clipboard l.jpg

Trashcan and Clipboard


Menus l.jpg

Menus


In class exercise 1 l.jpg

In-class exercise 1

  • On the course web site under week 1


  • Login