| | Copyright | |
| | Trademark Page | vi |
| | Preface | xxi |
| | About the Authors | xxix |
| | About the CDROM | xxxi |
| | Part 1: Introduction | 1 |
| | | Chapter 1. Introduction to Computer Science and Media Computation | 2 |
| | | Section 1.1. What is Computer Science About? | 2 |
| | | Section 1.2. What Computers Understand | 7 |
| | | Section 1.3. Media Computation: Why Digitize Media? | 9 |
| | | Section 1.4. Computer Science for Everyone | 10 |
| | | Problems | 11 |
| | | To Dig Deeper | 13 |
| | | Chapter 2. Introduction to Java | 14 |
| | | Section 2.1. Java | 14 |
| | | Section 2.2. Introduction to DrJava | 16 |
| | | Section 2.3. Java Basics | 19 |
| | | Section 2.4. Variables | 25 |
| | | Section 2.5. Concepts Summary | 33 |
| | | Problems | 35 |
| | | To Dig Deeper | 37 |
| | | Chapter 3. Introduction to Programming | 38 |
| | | Section 3.1. Programming is About Naming | 38 |
| | | Section 3.2. Files and Their Names | 40 |
| | | Section 3.3. Class and Object Methods | 41 |
| | | Section 3.4. Working with Turtles | 43 |
| | | Section 3.5. Creating Methods | 50 |
| | | Section 3.6. Working with Media | 59 |
| | | Section 3.7. Concepts Summary | 69 |
| | | Objects and Methods Summary | 70 |
| | | Problems | 72 |
| | | To Dig Deeper | 73 |
| | Part 2: Pictures | 75 |
| | | Chapter 4. Modifying Pictures Using Loops | 76 |
| | | Section 4.1. How Pictures are Encoded | 76 |
| | | Section 4.2. Manipulating Pictures | 85 |
| | | Section 4.3. Changing Color Values | 91 |
| | | Section 4.4. Concepts Summary | 124 |
| | | Objects and Methods Summary | 126 |
| | | Problems | 127 |
| | | To Dig Deeper | 130 |
| | | Chapter 5. Modifying Pixels in a Matrix | 131 |
| | | Section 5.1. Copying Pixels | 131 |
| | | Section 5.2. Copying and Transforming Pictures | 142 |
| | | Section 5.3. Concepts Summary | 167 |
| | | Objects and Methods Summary | 170 |
| | | Problems | 170 |
| | | To Dig Deeper | 172 |
| | | Chapter 6. Conditionally Modifying Pixels | 173 |
| | | Section 6.1. Conditional Pixel Changes | 173 |
| | | Section 6.2. Simple Edge Detection: Conditionals with Two Options | 182 |
| | | Section 6.3. Sepia-Toned and Posterized Pictures: Using Multiple Conditionals to Choose the Color | 186 |
| | | Section 6.4. Highlighting Extremes | 193 |
| | | Section 6.5. Combining Pixels: Blurring | 194 |
| | | Section 6.6. Background Subtraction | 197 |
| | | Section 6.7. Chromakey | 202 |
| | | Section 6.8. Concepts Summary | 205 |
| | | Problems | 207 |
| | | Chapter 7. Drawing | 212 |
| | | Section 7.1. Drawing Using the Graphics Class | 212 |
| | | Section 7.2. Programs as Specifying Drawing Process | 226 |
| | | Section 7.3. Using Graphics2D for Advanced Drawing | 230 |
| | | Section 7.4. Concepts Summary | 245 |
| | | Objects and Methods Summary | 246 |
| | | Problems | 249 |
| | Part 3: Sounds | 251 |
| | | Chapter 8. Modifying All Samples in a Sound | 252 |
| | | Section 8.1. How Sound is Encoded | 252 |
| | | Section 8.2. Manipulating Sounds | 262 |
| | | Section 8.3. Changing the Volume of Sounds | 271 |
| | | Section 8.4. Normalizing Sounds | 280 |
| | | Section 8.5. Concepts Summary | 284 |
| | | Objects and Methods Summary | 287 |
| | | Problems | 289 |
| | | To Dig Deeper | 292 |
| | | Chapter 9. Modifying Samples Using Ranges | 293 |
| | | Section 9.1. Manipulating Different Sections of a Sound Differently | 293 |
| | | Section 9.2. Create a Sound Clip | 295 |
| | | Section 9.3. Splicing Sounds | 297 |
| | | Section 9.4. Reversing a Sound | 304 |
| | | Section 9.5. Mirroring a Sound | 306 |
| | | Section 9.6. Concepts Summary | 307 |
| | | Problems | 308 |
| | | To Dig Deeper | 311 |
| | | Chapter 10. Making Sounds by Combining Pieces | 312 |
| | | Section 10.1. Composing Sounds Through Addition | 312 |
| | | Section 10.2. Blending Sounds | 313 |
| | | Section 10.3. Creating an Echo | 315 |
| | | Section 10.4. How Sampling Keyboards Work | 318 |
| | | Section 10.5. Additive Synthesis | 325 |
| | | Section 10.6. Modern Music Synthesis | 333 |
| | | Section 10.7. Concepts Summary | 339 |
| | | Problems | 340 |
| | | To Dig Deeper | 342 |
| | | Chapter 11. Creating Classes | 343 |
| | | Section 11.1. Identifying the Objects and Fields | 344 |
| | | Section 11.2. Defining a Class | 344 |
| | | Section 11.3. Overloading Constructors | 356 |
| | | Section 11.4. Creating and Initializing an Array | 356 |
| | | Section 11.5. Creating Accessors (Getters) and Modifiers (Setters) | 363 |
| | | Section 11.6. Creating a Main Method | 366 |
| | | Section 11.7. Javadoc Comments | 367 |
| | | Section 11.8. Creating Another Class | 369 |
| | | Section 11.9. Reusing a Class Via Inheritance | 373 |
| | | Section 11.10. Concepts Summary | 379 |
| | | Problems | 382 |
| | Part 4: Text, Files, Networks, Databases, and Unimedia | 385 |
| | | Chapter 12. Creating and Modifying Text | 386 |
| | | Section 12.1. Text as Unimedia | 387 |
| | | Section 12.2. Strings: Character Sequences | 387 |
| | | Section 12.3. Files: Places to Put Your Strings and Other Stuff | 394 |
| | | Section 12.4. Other Useful Classes | 417 |
| | | Section 12.5. Networks: Getting Our Text from the Web | 421 |
| | | Section 12.6. Using Text to Shift Between Media | 427 |
| | | Section 12.7. Concepts Summary | 433 |
| | | Problems | 438 |
| | | Chapter 13. Making Text for the Web | 442 |
| | | Section 13.1. HTML: The Notation of the Web | 442 |
| | | Section 13.2. Writing Programs to Generate HTML | 447 |
| | | Section 13.3. Databases: A Place to Store Our Text | 459 |
| | | Section 13.4. Relational Databases | 466 |
| | | Section 13.5. Concepts Summary | 477 |
| | | Problems | 479 |
| | | To Dig Deeper | 481 |
| | Part 5: Movies | 483 |
| | | Chapter 14. Encoding, Manipulating, and Creating Movies | 484 |
| | | Section 14.1. Generating Frame-Based Animations | 485 |
| | | Section 14.2. Working with Video Frames | 494 |
| | | Section 14.3. Concepts Summary | 501 |
| | | Problems | 501 |
| | Part 6: Topics in Computer Science | 503 |
| | | Chapter 15. Speed | 504 |
| | | Section 15.1. Focusing on Computer Science | 504 |
| | | Section 15.2. What Makes Programs Fast? | 504 |
| | | Section 15.3. What Makes a Computer Fast? | 522 |
| | | Section 15.4. Concepts Summary | 525 |
| | | Problems | 525 |
| | | To Dig Deeper | 528 |
| | | Chapter 16. JavaScript: A Web Page Programming Language | 529 |
| | | Section 16.1. JavaScript Syntax | 529 |
| | | Section 16.2. JavaScript Inside of Web Pages | 531 |
| | | Section 16.3. User Interfaces in JavaScript | 534 |
| | | Section 16.4. Multimedia in JavaScript | 540 |
| | | Section 16.5. Concepts Summary | 541 |
| | | Problems | 541 |
| | | To Dig Deeper | 542 |
| | Appendix A. Quick Reference to Java | 543 |
| | | Section A.1. Variables | 543 |
| | | Section A.2. Method Declarations | 544 |
| | | Section A.3. Loops | 546 |
| | | Section A.4. Conditionals | 547 |
| | | Section A.5. Operators | 547 |
| | | Section A.6. String Escapes | 548 |
| | | Section A.7. Classes | 548 |
| | | Section A.8. Fields | 549 |
| | | Section A.9. Constructors | 549 |
| | | Section A.10. Packages | 549 |
| | Bibliography | 551 |
| | Using the Student CD | InsideBackCover |
| | | Included on the CD | InsideBackCover |
| | | System Requirements | InsideBackCover |
| | | Installation | InsideBackCover |
| | Index | |