Problem Solving with Data Structures using Java: A Multimedia Approach Chapter 1: Objects for Modeling a World.

Slides:



Advertisements
Similar presentations
A Toolbox for Blackboard Tim Roberts
Advertisements

Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall
Chapter 2 Machine Language.
CS0004: Introduction to Programming Visual Studio 2010 and Controls.
Video Game Design Lesson 1. Game Designer Person involved in the development of a video game Person involved in the development of a video game Usually.
Data Structures Introduction. What is data? (Latin) Plural of datum = something given.
CS 206 Introduction to Computer Science II 04 / 29 / 2009 Instructor: Michael Eckmann.
Programming Introduction November 9 Unit 7. What is Programming? Besides being a huge industry? Programming is the process used to write computer programs.
Computer Science 103 Chapter 2 HyperText Markup Language (HTML)
M1G Introduction to Programming 2 4. Enhancing a class:Room.
Topics Introduction Hardware and Software How Computers Store Data
CSC1401: Introductory Programming Steve Cooper
How do medical illustration authors hook and hold readers? Medical illustrators hook and hold readers through the use of pictures Some of the pictures.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 8 This presentation © 2004, MacAvon Media Productions Animation.
Multimedia and The Web.
Digital Media Dr. Jim Rowan ITEC 2110 Wednesday, September 4.
CS 102 Computers In Context (Multimedia)‏ 01 / 23 / 2009 Instructor: Michael Eckmann.
Media Computing Instructor Byung Kim Olsen 231 Office hours – MWF 9:00-10:00 AM or by appointment.
Chapter 1 What is Programming? Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition) by S.N. Kamin, D. Mickunas, E.
© 2011 Delmar, Cengage Learning Chapter 3 Working with Symbols and Interactivity.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Introduction to Modeling CS1316: Representing Structure and Behavior.
Introduction to Java CS1316: Representing Structure and Behavior.
CS212: DATA STRUCTURES Lecture 1: Introduction. What is this course is about ?  Data structures : conceptual and concrete ways to organize data for efficient.
Flash Adobe Flash Introduction Kyungeun Park. Bitmap vs. Vector based  Bitmap –Bitmaps are made up of single pixels  Vector based –Vector graphics are.
Copyright © Curt Hill Turtles The beginning of media computation.
Organizational Text Patterns What is structure?. Monday, December 2, 2013 In the Genre/Green section of your journal Write: Information Text: Then copy.
Click on these! %2Fblank%2Fbrowse.asp%3FA%3D383%26BMDRN%3D2000%26BCOB%3D0% 26C%3D64893.
Multimedia ITGS. Multimedia Multimedia: Documents that contain information in more than one form: Text Sound Images Video Hypertext: A document or set.
1 CSC 222: Object-Oriented Programming Spring 2013 Course goals:  To know and use basic Java programming constructs for object- oriented problem solving.
CS 106 Introduction to Computer Science I 01 / 31 / 2007 Instructor: Michael Eckmann.
Introduction to Modeling CS1316: Representing Structure and Behavior.
Game Maker Terminology
Alice and Algorithms Chapter 1 Part Reasons to Program The joy of programming To create a tool To use your creativity abilities For non programmers.
1 ball, 2 ball, red ball, blue ball By Melissa Dalis Professor Susan Rodger Duke University June 2011.
Cs332a_chapt10.ppt CS332A Advanced HTML Programming DHTML Dynamic Hypertext Markup Language A term describing a series of technologies Not a stand-a-lone.
Digital Media Dr. Jim Rowan ITEC 2110 Chapter 3. Roll call.
UPOU John Vincent R. Rapiz INTERACTIVE MULTIMEDIA PRESENTATION FMA 4 EDS 151.
CS 325 Introduction to Computer Graphics 04 / 12 / 2010 Instructor: Michael Eckmann.
Review for test! Alice Chapter 1&2 Test is tomorrow! - March 26 th March 25th.
(c) , University of Washington19a-1 CSC 143 Stacks and Queues: Concepts and Implementations.
1 Lecture 5: Interactive Tools: Prototypers (HyperCard, Director, Visual Basic), Interface Builders Brad Myers Advanced User Interface Software.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Digital Media Dr. Jim Rowan ITEC 2110 Chapter 3. Roll call.
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To introduce the basic concepts of linked lists ❏ To introduce the basic concepts.
Barbara Ericson Promising Practices in CS1 Media Computation for CS1 Barbara Ericson Georgia Institute of Technology.
Parts of A Story Ms. Sawatski 6 th Grade Gifted Reading.
DUE DATE  COURSE EXAMINATION #1 - Results -  GROUP PRESENTATION - Draw for today’s presentation -  JOURNAL ARTICLE - See Session 4 -  ‘WEEKLY’ JOURNAL.
Intro CS – Loops, making animations & films Lesson Plan 3.
Introduction to Algorithm Complexity Bit Sum Problem.
TechKnowlogy Conference August 2, 2011 Using GoogleDocs for Collaboration.
Reference: What is it? A multimedia python library – Window Management – Graphics geometric shapes bitmaps (sprites) – Input Mouse Keyboard.
Introduction to Programming and App Inventor. Introduction What is a computer program? Introducing App Inventor Getting hands on with App Inventor.
Representing Structure and Behavior
CS1316: Representing Structure and Behavior
CSC 222: Object-Oriented Programming
CS1316: Representing Structure and Behavior
CS1316: Representing Structure and Behavior
CSC 222: Object-Oriented Programming
What is “Data Structures”?
structures and their relationships." - Linus Torvalds
Introduction to Modeling
Topics Introduction Hardware and Software How Computers Store Data
Review CSE116 2/21/2019 B.Ramamurthy.
Introduction to Data Structure
CS1316: Representing Structure and Behavior
structures and their relationships." - Linus Torvalds
Title Your Name.
Presentation transcript:

Problem Solving with Data Structures using Java: A Multimedia Approach Chapter 1: Objects for Modeling a World

Today’s story What’s the point of this book? What’s a model? What are data structures? Why Java? Details on the course Getting set up for the course

The Point of this Book Real computer-based media developers rarely work in terms of pixels and samples Computer musicians deal in terms of notes, instruments, patches, and other structures. Computer animators deal in terms of characters, movement, scenes, and other structures Bottom-line: They structure their media.

Driving Questions of the Book How did the wildebeest’s charge over the ridge in The Lion King? How did the villages wave in The Hunchback of Notre Dame?

The Wildebeests in The Lion King

The Villagers in The Hunchback of Notre Dame

The answer: Modeling and Simulation These are two of the (rare) times that Disney stepped away from their traditional drawn cel animation. Instead they: Modeled the structure of wildebeests and villagers, Modeled the behavior of wildebeests (how they stampede) and villagers (how they wave), Then started a computer simulation that executed the models…and basically filmed the screen.

What’s “modeling”? Describing things in the world in terms of their structure and behavior. F=ma (Force=mass * acceleration) is part of a model of the world that describes what happens when one thing hits another. Maps model physical spaces and their physical relationships On a computer, we can execute these models: Make them work, plug values into equations, move things in space, see what happens. That’s simulation: Executing a model

What’s a data structure? A way of organizing information. Different physical structures organize space differently. Skyscrapers vs. ranch homes. Trees vs. snail shells Data structures organize the information we use in our programs in different ways.

Data structures you know AgeEye Color Matt13Brown Jenny7Blue

Data structures that you’ll come to know Note in Kitchen Note in Living Room Note in Study Note in Bedroom

Data structures have different properties Arrays and tables keep things organized right next to one another. Makes it easy to find something in the array or table But if you want to insert something new, you have to move everything over. Linked lists and trees keep track of relationships with links (or edges) Easier to insert new things

Thought experiment: Adding a second of silence into a sound Assuming that there’s room for another second in the sound… We copy samples from the insertion point to the end of sound down one second: setSampleValueAt(sound,soundIndex+oneSec, getSampleValueAt(sound,soundIndex)) Then we can insert oneSec’s worth of 0’s into the insertion point

How that looks visually Here is some sound One second Here is some sound One second

Inserting into a table AgeEye Color Matt13Brown Jenny7Blue AgeEye Color Matt13Brown Jenny7Blue AgeEye Color Matt13Brown Jenny7Blue AgeEye Color Katie9Brown Matt13Brown Jenny7Blue

Inserting into a linked list Note in Kitchen Note in Living Room Note in Study Note in Bedroom Note in Den

Modeling and Simulations are about data structures The visual structure of villagers and wildebeests (e.g., how legs and arms attach to bodies) is a tree or graph. Tracking which villager does something next is a queue. All of the wildebeests to stampede are stored in a list. The images to be used in making the villagers wave or wildebeests run are usually stored in a list.

Learning objectives in the book Computer Science Learning Objectives Students will be able to program Java classes and methods based on modification. Students will learn how to use and manipulate several core data structures: Arrays, linked lists, trees, stacks, and queues. Media Learning Objectives Students will be able to explain the role of data structures in structuring and manipulating data, especially multimedia. Students will be able to explain key issues of modern animations, such as sound synchronization and moving objects in layers. Students will be able to discuss the properties, strengths, and weaknesses of the different structuring approaches for media. Students will be able to design, define, and implement some simulations. Students will be able to explain the value of computation for modeling and simulation.

Why are we using Java? (Why aren’t we using Python?) Java is faster than Python We can do more operations in less time, so we can do more complicated media in less time. Java is more well-known than Python. So there’s more “resume value” than Python. If you take more CS, it’ll probably be in Java. More CS classes are being taught now in Java than in other programming languages.

General flow of book Introduction to Java Manipulation of pictures and sounds Manipulating music and turtles Using arrays, linked lists, and trees With music, pictures, and sounds Creating animations using arrays, lists, and trees Generalized linked lists and trees Creating simulations Predator/prey, disease propagation models, movement of people Different kinds of random Sorting our events Simulations with resources Resource queues Creating animations with simulations

Things to do to get started Download and install JDK (Java Development Kit) Download and install DrJava Download Jmusic You need jmusic.jar and the inst instrument files Download the Java source files for class Then, tell Java where to find the JMusic and Java source files.

Open DrJava Preferences

Telling DrJava where to find Jmusic files

Adding in java-source

Everything that has to be there Java-source Jmusic: inst folder, music.jar All jars in java-source

Parts of DrJava Text of your class file (.java) Where you interact with Java List of class files that you have open