Magic of the Future
معرفی کتاب «Magic of the Future» نوشتهٔ Tristan Bunn و Karl Hans Welz، منتشرشده توسط نشر 2004 در سال 2004. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.
An accessible, visual, and creative approach to teaching core coding concepts using Python's Processing.py, an open-source graphical development environment. This beginners book introduces non-programmers to the fundamentals of computer coding within a visual, arts-focused context. Tristan Bunn’s remarkably effective teaching approach is designed to help you visualize core programming concepts while you make cool pictures, animations, and simulations using Python Mode for the open-source Processing development environment. Right from the first chapter, you'll produce and manipulate colorful drawings, shapes and patterns as Bunn walks you through a series of easy-to-follow graphical coding projects that grow increasingly complex. You’ll go from drawing with code to animating a bouncing DVD screensaver and practicing data-visualization techniques. Along the way, you’ll encounter creative-yet-practical skill-building challenges that relate to everything from video games, cars, and coffee, to fine art, amoebas, and Pink Floyd. As you grow more fluent in both Python and programming in general, topics shift toward the mastery of algorithmic thinking, as you explore periodic motion, Lissajous curves, and using classes to create objects. You’ll learn about: Basic coding theories and concepts, like variables, data types, pixel coordinates, control flow and algorithms Writing code that produces drawings, patterns, animations, data visualizations, user interfaces, and simulations Using conditional statements, iteration, randomness, lists and dictionaries Defining functions, reducing repetition, and making your code more modular How to write classes, and create objects to structure code more efficiently In addition to giving you a good grounding in general programming, the skills and knowledge you’ll gain in this book are your entry point to coding for an ever-expanding horizon of creative technologies. About the Author About the Tech Reviewer Acknowledgments Introduction Who Is This Book For? What Is Python Mode for Processing? What Are Algorithms? What Is Creative Coding? Where Can I Find Help? Online Resources Source Code and Solutions What’s in This Book? Let’s Go! Chapter 1: Hello, World! Processing Installation and Python Mode Setup Your First Sketch Comments Whitespace Errors Color Fills and Strokes Background Color Color Modes 2D Primitives triangle() ellipse() quad() line() Challenge #1: Rainbow Task Variables Arithmetic Operators Basic Operations Modulo Operator Arcs Challenge #2: Disk Usage Analyzer Summary Chapter 2: Drawing More Complicated Shapes Displaying a Grid Drawing Curves Using Catmull-Rom Splines Curving Lines with curve() Changing Curves with curveTightness() Drawing Bézier Curves Using the bezier() Function Positioning Anchor and Control Points Drawing Shapes Using Vertices Bézier Vertices Using Vector Graphics Software for Generating Shapes Summary Chapter 3: Introduction to Strings and Working with Text Strings Creating Strings in Python Using Concatenation and String Formatting Working with String Length String Manipulation Slice Notation String Methods Typography Fonts Text Functions Summary Chapter 4: Conditional Statements Control Flow Conditional Statements The Boolean Data Type Relational Operators if Statements elif Statements else Statements Logical Operators Challenge #3: Four-Square Task Summary Chapter 5: Iteration and Randomness Iteration Using Iteration to Draw Concentric Circles while Loops for Loops Challenge #4: Create Line Patterns break and continue Statements Randomness random() Function Random Seed Truchet Tiles Summary Chapter 6: Motion and Transformation Perceiving Motion Adding Motion to Processing Sketches The draw() and setup() Functions Global Variables Saving Frames Challenge #5: DVD Screensaver Transformations Processing Transformation Functions translate() rotate() scale() shearX() and shearY() pushMatrix() and popMatrix() Challenge #6: Analog Clock Summary Chapter 7: Working with Lists and Reading Data Introducing Lists Creating and Accessing Lists Modifying Lists Combining Loops and Lists Drawing Shapes by Using a List of Color Values Looping with enumerate() Creating Lists of Lists Challenge #7: Breakout Level Reading Data File Formats CSV Challenge #8: Games Sales Chart Summary Chapter 8: Dictionaries and JSON Introducing Dictionaries Accessing Dictionaries Modifying Dictionaries Nesting Dictionaries and Lists Combining Loops and Dictionaries Iterating Keys Iterating Values Iterating Items Working with JSON Understanding JSON Syntax Using Web APIs Reading in JSON Data Challenge #9: Coffee Chart Summary Chapter 9: Functions and Periodic Motion Defining Functions Creating a Simple Speech Bubble Function Drawing Compound Shapes Using a Function Adding Arguments and Parameters Using Keyword Arguments Setting Default Values Mixing Positional and Keyword Arguments Returning Values Defining Functions for Periodic Motion An Introduction to Trigonometric Functions Circular and Elliptical Motion Sine Waves Lissajous Curves Creating Screensaver-Like Patterns with Lissajous Curves Summary Chapter 10: Object-Oriented Programming and PVector Working with Classes Defining a New Class Creating an Instance from a Class Adding Attributes to a Class Adding Methods to a Class Programming Movement with Vectors The PVector Class Moving an Amoeba with PVector Adding Many Amoebas to the Simulation Splitting Your Python Code into Multiple Files Challenge #10: Collision Detection Summary Chapter 11: Mouse and Keyboard Interaction Mouse Interaction Mouse Variables Mouse Events Creating a Paint App Keyboard Interaction Adding Keyboard Shortcuts to the Paint App Challenge #11: Adding Paint App Features Summary Afterword More Python for Processing More Python Other Creative Coding Environments INDEX "The perfect book for first-time programmers, Learn Python Visually introduces the fundamentals of computer coding within a visual, graphics-based context. Tristan Bunn’s creative teaching approach will help you visualize core programming concepts as you make cool pictures, animations, and simulations using Python Mode for the open source Processing development environment.From the very first chapter, you’ll produce and manipulate colorful designs as Bunn walks you through a series of easy-to-follow graphical coding projects that grow increasingly complex. You’ll progress from drawing with code to animating a bouncing DVD screensaver to creating interactive programs. Along the way, you’ll encounter skill-building challenges on topics as diverse as video games, coffee, fine art, amoebas, and Pink Floyd.You’ll learn how to:Apply basic coding theories and concepts, like variables, data types, pixel coordinates, control flow, and algorithmsWrite code that produces drawings, patterns, animations, data visualizations, user interfaces, and simulationsUse code to explore randomness, handle CSV and JSON data, and generate animations that employ trigonometry for periodic motion and Lissajous curvesDefine functions, reduce repetition, and make your code more modularWrite classes and create objects to structure code more efficientlyIf you’ve ever dreamed of coding for data visualizations, computer-generated art, games, or other creative technologies, Learn Python Visually is the entry point you need." -- Page 4 de la couverture
دانلود کتاب Magic of the Future