Programming 101: Learn to Code with the Processing Language Using a Visual Approach, 2nd Edition
- Length: 371 pages
- Edition: 2
- Language: English
- Publisher: Apress
- Publication Date: 2022-10-08
- ISBN-10: 1484281934
- ISBN-13: 9781484281932
- Sales Rank: #2422348 (See Top 100 Books)
Programming permeates almost all aspects of our lives. This includes being active on social media, shopping online, and participating in virtual courses. It also includes driving a car and using many devices. This book will teach you the basics of programming using the Processing programming language and provide practice with logical, algorithmic thinking. It can provide insight into what is involved in producing the technical infrastructure of our world. While reading this book, you can build programs based on your own ideas, using images you create or acquire and making connections to activities you enjoy.
The chapters in the book will demonstrate the process of programming, starting with formulating an idea, planning, building on past projects, and refining the work, similar to writing an essay or composing a song. This approach will guide you to make use of logic and mathematics to produce beautiful effects. The text contains an Appendix with an introduction to p5.js, a way to produce JavaScript programs with Processing functionality for drawing, images, and interactions to publish on the Web.
The term for program in Processing is sketch. The Processing language has been constructed by visual artists using the Java programming language as a base. However, the sketches featured in this book and typical in Processing are far more than static drawings; they incorporate interaction, animation, video, audio, and accessing files on the local computer and on the Web. Technical features are introduced and explained in the context of complete examples: games (Snake, Hangman, jigsaw, slingshot), making a collage of family images and video clips, preparing directions for folding an origami model, rotating objects in 3D, and others.
Programming is a fun, creative, expressive pursuit. It does require attention to details and can be frustrating. Still, there is very little that compares to the satisfaction of building a program out of nothing and making it work (or taking an existing program and fixing a problem, or adding a feature and making it better). Programming 101 is your gateway to making this happen.
What You’ll Learn
- Gain basic programming skills
- Build fun and creative programs
- Use files for making a holiday card or a sequence of instructions
- Combine videos, images, and graphics in a Processing sketch
- Connections to other programming languages, most especially Java and JavaScript
Who This Book Is For
Anyone who has been thinking about trying programming, or has tried, but needs assistance. Anyone who wants to use their own creativity and artistic talents. Anyone who wants to know what is involved in the technology that is present in our lives. Anyone who wants to know what is involved in the technology that is present in our lives.
Table of Contents About the Author About the Technical Reviewer Acknowledgments Introduction Chapter 1: Basics Abstract Programming Concepts Programming Languages and Natural Languages Values and Variables Note Functions Specifying Positions and Angles Note Colors Development Environment Role of Planning Under the Covers Processing Programming Features Processing Development Environment Functions Angles Implementing Hello, World Implementing the Daddy Logo Planning Note Daddy Logo Program Note Things to Look Up How to Make This Your Own What You Learned What’s Next Chapter 2: Interactions Abstract Note Programming Concepts Events Randomness Displaying Images from Files Calculations, Including Built-in Functions Looping Processing Programming Features Note Under the Covers Polygon Sketch Operation Overview Implementing the Polygon Sketch Planning Polygon Sketch Program Coin-Toss Sketch Operation Overview Implementing the Coin-Toss Sketch Planning Things to Look Up How to Make This Your Own What You Learned What’s Next Chapter 3: Animation Using Arrays and Parallel Structures Abstract More on the Sketches Programming Concepts Animation Logical Operations Arrays Parallel Structures Compound Statements Pseudorandom Processing Processing Programming Features Caution Implementing a Bouncing Ball Planning Note Program Implementing a Set of Three Bouncing Balls Planning Program Implementing Pentagon Bouncing Planning Implementing Bouncing Polygons Planning Program Under the Covers Things to Look Up How to Make This Your Own What You Learned What’s Next Untitled Chapter 4: Classes Abstract Programming Concepts Classes Phases of Operations Tolerance or Margin Processing Programming Features Classes Definition of Images, Rectangles, and Ellipses Dynamic Arrays Tolerance and OK-So-Far Coding Bouncing Objects Overview Implementing the Bouncing Objects Planning Note Program Make Path and Travel Path Overview Implementing the Make Path and Travel Path Planning Program Jigsaw Overview Implementing the Jigsaw Planning Program Under the Covers Things to Look Up How to Make This Your Own What You Learned What’s Next Chapter 5: More Interactions Abstract More on the Sketches Programming Concepts Ballistic Motion Character (char) Data Type vs. String Data Type Use of Files Case Statement Elapsed Time Regular Expressions Processing Programming Features The char Data Type The keyPressed Function, key, and keyCode Table Files The Switch Statement The millis and Other Time Functions The match Function for Regular Expressions ArrayList Under the Covers Slingshot Operation Overview Implementing the Slingshot Sketch Planning Programming the Slingshot Sketch Snake Operation Overview Implementing the Snake Sketch Planning Programming the Snake Sketch Image Test Operation Overview Implementing the Image Test Planning Program Things to Look Up How to Make This Your Own What You Learned What’s Next Chapter 6: Images and Graphics Abstract More on the Sketches Programming Concepts Images As Arrays of Pixels Case Statement Pixel Processing The beginShape and endShape Vertex Functions Changing the Coordinate System Hue-Saturation-Brightness Color Mode Changing Image Sketch Overview Implementing the Image Transformations Planning Programming the Image Sketch Origami Flower Graphic Overview Planning Implementing the Origami Flower Sketch Programming the Origami Flower Programming the Hexagon with HSB Color Mode Under the Covers Things to Look Up How to Make This Your Own What You Learned What’s Next Chapter 7: Using Files for Making a Holiday Card Abstract Programming Concepts Files Libraries Fonts Callbacks Feedback to Users Processing Programming Features Use of the Sound Library Making and Saving an Image of the Current Window Use of Java Input/Output Library Subclasses Show Fonts Sketch Operation Overview Implementing the Show Fonts Sketch Programming the Show Fonts Sketch Make Card Sketch Operation Overview Implementing the Make Card Sketch Planning Programming the Make Card Sketch Under the Covers Things to Look Up How to Make This Your Own What You Learned What’s Next Chapter 8: Combining Videos, Images, and Graphics Abstract Programming Concepts Video Copying a Video Processing Programming Features Video Classes and Subclasses Under the Covers Family Collage Operation Overview Implementing the Family Collage Sketch Planning Programming the Family Collage Sketch Things to Look Up How to Make This Your Own What You Learned What’s Next Chapter 9: Word Guessing Game Abstract More on the Sketches Programming Concepts Implementing an Existing Application Testing and Scaling Up Displaying the State of the Game Displaying Text Processing Programming Features Note Operation Overview Implementing the Word Game Sketches Planning Programming the Word Game Sketches Things to Look Up How to Make This Your Own What You Learned What’s Next Chapter 10: 3D Abstract Programming Concepts Processing Programming Features Under the Covers Rolling Ball at Alhambra Operation Overview Implementing the Rolling Ball at Alhambra Planning Programming the Rolling Ball at Alhambra Rotating Cube Operation Overview Implementing the Rotating Cube Planning Programming the Rotating Cube Things to Look Up How to Make This Your Own What You Learned What’s Next
Donate to keep this site alive
How to download source code?
1. Go to: https://github.com/Apress
2. In the Find a repository… box, search the book title: Programming 101: Learn to Code with the Processing Language Using a Visual Approach, 2nd Edition
, sometime you may not get the results, please search the main title.
3. Click the book title in the search results.
3. Click Code to download.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.