![An Artist's Guide to Programming: A Graphical Introduction](http://img.images-bn.com/static/redesign/srcs/images/grey-box.png?v11.9.4)
![An Artist's Guide to Programming: A Graphical Introduction](http://img.images-bn.com/static/redesign/srcs/images/grey-box.png?v11.9.4)
Paperback
-
PICK UP IN STORECheck Availability at Nearby Stores
Available within 2 business hours
Related collections and offers
Overview
A Graphical Introduction to Programming teaches computer programming with the aid of 100 example programs, each of which integrates graphical or sound output. The Processing-language-based examples range from drawing a circle and animating bouncing balls to 3D graphics, audio visualization, and interactive games.
Readers learn core programming concepts like conditions, loops, arrays, strings and functions, as well as how to use Processing to draw lines, shapes, and 3D objects. They’ll learn key computer graphics concepts like manipulating images, animating text, mapping textures onto objects, and working with video. Advanced examples include sound effects and audio visualization, network communication, 3D geometry and animation, simulations of snow and smoke, predator-prey populations, and interactive games.
Product Details
ISBN-13: | 9781718501645 |
---|---|
Publisher: | No Starch Press |
Publication date: | 06/07/2022 |
Pages: | 248 |
Sales rank: | 1,020,502 |
Product dimensions: | 8.06(w) x 10.00(h) x 0.74(d) |
About the Author
Table of Contents
Author's Note xi
Introduction xiii
The Basics of a Programming Language: Processing xiv
The Beginning xv
The Middle xv
The Rest xvi
Variables xvi
How to Write a Program xvii
Part 1 The Fundamentals of Drawing 1
Sketch 1 A Circle 2
Example A 2
Example B 2
Example C 2
Sketch 2 Colors 4
Example A 4
Example B 4
Sketch 3 If Statements-Changing Colors Conditionally 6
Example A 6
Example B 6
Example C 6
Sketch 4 Loops-Drawing 20 Circles 8
Example A 8
Example B 8
Sketch 5 Lines 10
Example A 10
Example B 10
Sketch 6 Arrays-Drawing Many Circles 12
Sketch 7 Lines with Rubber Banding 14
Sketch 8 Random Circles 16
Sketch 9 A Rectangle 18
Sketch 10 Triangles and Motion 20
Sketch 11 Displaying Text 22
Sketch 12 Manipulating Text Strings 24
Part 2 Working with Preexisting Images 27
Sketch 13 Loading and Displaying an Image 28
Example A 28
Example B 28
Sketch 14 Images-Theory and Practice 30
Example A 30
Example B 30
Sketch 15 Manipulating Images I-Aspect Ratio 32
Example A 32
Example B 32
Sketch 16 Manipulating Images II-Cropping 34
Sketch 17 Manipulating Images III-Magnifier 36
Sketch 18 Rotation 38
Example A 38
Example B 38
Sketch 19 Rotating About Any Point-Translation 40
Example A 40
Example B 40
Sketch 20 Rotating an Image 42
Sketch 21 Getting the Value of a Pixel 44
Sketch 22 Setting and Changing the Values of Pixels 46
Example A 46
Example B 46
Sketch 23 Changing the Values of Pixels-Thresholding 48
Sketch 24 User-Defined Functions 50
Sketch 25 Elements of Programming Style 52
Sketch 26 Duplicating Images-More Functions 54
Part 3 2D Graphics and Animation 57
Sketch 27 Saving an Image and Adjusting Transparency 58
Sketch 28 Bouncing an Object in a Window 60
Sketch 29 Basic Sprite Graphics 62
Sketch 30 Detecting Sprite-Sprite Collisions 64
Sketch 31 Animation-Generating TV Static 66
Sketch 32 Frame Animation 68
Example A 68
Example B 68
Sketch 33 Flood Fill-Filling in Complex Shapes 70
Part 4 Working with Text and Files 73
Sketch 34 Fonts, Sizes, Character Properties 74
Sketch 35 Scrolling Text 76
Sketch 36 Text Animation 78
Sketch 37 Inputting a Filename 80
Sketch 38 Inputting an Integer 82
Sketch 39 Reading Parameters from a File 84
Sketch 40 Writing Text to a File 86
Sketch 41 Simulating Text on a Computer Screen 88
Part 5 Creating User Interfaces and Widgets 91
Sketch 42 A Button 92
Sketch 43 The Class Object-Multiple Buttons 94
Sketch 44 A Slider 96
Sketch 45 A Gauge Display 98
Sketch 46 A Likert Scale 100
Sketch 47 A Thermometer 102
Part 6 Network Communications 105
Sketch 48 Opening a Web Page 106
Example A 106
Example B 106
Sketch 49 Loading Images from a Web Page 108
Sketch 50 Client/Server Communication 110
Part 7 3d Graphics and Animation 113
Sketch 51 Basic 3D Objects 114
Example A 114
Example B 114
Sketch 52 3D Geometry-Viewpoints, Projections 116
Sketch 53 3D Illumination 118
Sketch 54 Bouncing a Ball in 3D 120
Sketch 55 Constructing 3D Objects Using Planes 122
Sketch 56 Texture Mapping 124
Sketch 57 Billboards-Simulating a Tree 126
Sketch 58 Moving the Viewpoint in 3D 128
Sketch 59 Spotlights 130
Sketch 60 A Driving Simulation 132
Part 8 Advanced Graphics and Animation 135
Sketch 61 Layering 136
Sketch 62 Seeing the World Through a Window 138
Sketch 63 The PShape Object-A Rotating Planet 140
Sketch 64 Splines-Drawing Curves 142
Sketch 65 A Driving Simulation with Waypoints 144
Sketch 66 Many Small Objects-A Snowstorm 146
Sketch 67 Particle Graphics-Smoke 148
Sketch 68 Saving a Slate-A Spinning Propeller 150
Sketch 69 L-Systems-Drawing Plants 152
Sketch 70 Warping an Image 154
Part 9 Working with Sound 157
Sketch 71 Playing a Sound File 158
Sketch 72 Displaying a Sound's Volume 160
Sketch 73 Bouncing a Ball with Sound Effects 162
Sketch 74 Mixing Two Sounds 164
Sketch 75 Displaying Audio Waveforms 166
Sketch 76 Controlling a Graphic with Sound 168
Sketch 77 Positional Sound 170
Sketch 78 Synthetic Sounds 172
Sketch 79 Recording and Saving Sound 174
Part 10 Working with Video 177
Sketch 80 Playing a Video 178
Sketch 81 Playing a Video with a Jog Wheel 180
Sketch 82 Saving Still Frames from a Video 182
Sketch 83 Processing Video in Real Time 184
Sketch 84 Capturing Video from a Webcam 186
Sketch 85 Mapping Live Video as a Texture 188
Part 11 Measuring and Simulating Time 191
Sketch 86 Displaying a Clock 192
Sketch 87 Time Differences-Measuring Reaction Time 194
Sketch 88 M/M/1 Queue-Time in Simulations 196
Part 12 Creating Simulations and Games 199
Sketch 89 Predator-Prey Simulation 200
Sketch 90 Flocking Behavior 202
Sketch 91 Simulating the Aurora 204
Sketch 92 A Dynamic Advertisement 206
Sketch 93 Nim 208
Sketch 94 Pathfinding 210
Sketch 95 Metaballs-A Lava Lamp 212
Sketch 96 A Robot Arm 214
Sketch 97 Lightning 216
Sketch 98 The Computer Game Breakout 218
Sketch 99 Midpoint Displacement-Simulating Terrain 220
Part 13 Making Your Work Public 223
Sketch 100 Processing on the Web 224