Download Programming 101: Learn to Code Using the Processing Programming Language, 2nd Edition Jeanine Meyer ebook All Chapters PDF
Download Programming 101: Learn to Code Using the Processing Programming Language, 2nd Edition Jeanine Meyer ebook All Chapters PDF
com
https://ebookmeta.com/product/programming-101-learn-to-code-
using-the-processing-programming-language-2nd-edition-
jeanine-meyer/
OR CLICK HERE
DOWLOAD NOW
https://ebookmeta.com/product/the-essential-guide-to-html5-using-
games-to-learn-html5-and-javascript-3rd-edition-jeanine-meyer/
ebookmeta.com
https://ebookmeta.com/product/c-programming-learn-to-code-1st-edition-
sisir-kumar-jena/
ebookmeta.com
https://ebookmeta.com/product/programming-for-absolute-beginners-
using-the-javascript-programming-language-1st-edition-jonathan-
bartlett/
ebookmeta.com
https://ebookmeta.com/product/remember-me-ravenswood-book-2-1st-
edition-mary-balogh/
ebookmeta.com
Plant MicroRNAs and Stress Response 1st Edition Deepu
Pandita Anu Pandita
https://ebookmeta.com/product/plant-micrornas-and-stress-response-1st-
edition-deepu-pandita-anu-pandita/
ebookmeta.com
https://ebookmeta.com/product/pathfinder-rpg-advanced-player-s-
guide-p2-2nd-edition-paizo-inc/
ebookmeta.com
https://ebookmeta.com/product/sharpening-mathematical-analysis-skills-
problem-books-in-mathematics-sintamarian/
ebookmeta.com
https://ebookmeta.com/product/team-roles-at-work-3rd-edition-r-
meredith-belbin/
ebookmeta.com
https://ebookmeta.com/product/english-folk-poetry-structure-and-
meaning-roger-dev-renwick/
ebookmeta.com
Good Good Father Chris Tomlin
https://ebookmeta.com/product/good-good-father-chris-tomlin/
ebookmeta.com
Programming 101
Learn to Code with the Processing
Language Using a Visual Approach
Second Edition
Jeanine Meyer
Programming 101: Learn to Code with the Processing Language Using a Visual
Approach
Jeanine Meyer
Mt Kisco, NY, USA
Introduction������������������������������������������������������������������������������������������������������������xxi
Chapter 1: Basics����������������������������������������������������������������������������������������������������� 1
Abstract����������������������������������������������������������������������������������������������������������������������������������������� 1
Programming Concepts���������������������������������������������������������������������������������������������������������������� 3
Programming Languages and Natural Languages������������������������������������������������������������������ 3
Values and Variables��������������������������������������������������������������������������������������������������������������� 3
Functions��������������������������������������������������������������������������������������������������������������������������������� 5
Specifying Positions and Angles���������������������������������������������������������������������������������������������� 6
Colors�������������������������������������������������������������������������������������������������������������������������������������� 7
Development Environment������������������������������������������������������������������������������������������������������ 7
Role of Planning���������������������������������������������������������������������������������������������������������������������� 8
Under the Covers�������������������������������������������������������������������������������������������������������������������������� 8
Processing Programming Features����������������������������������������������������������������������������������������������� 9
Processing Development Environment������������������������������������������������������������������������������������ 9
Functions������������������������������������������������������������������������������������������������������������������������������� 11
Angles������������������������������������������������������������������������������������������������������������������������������������ 12
Implementing Hello, World���������������������������������������������������������������������������������������������������������� 14
Implementing the Daddy Logo���������������������������������������������������������������������������������������������������� 22
Planning��������������������������������������������������������������������������������������������������������������������������������� 22
Daddy Logo Program������������������������������������������������������������������������������������������������������������� 25
v
Table of Contents
Chapter 2: Interactions������������������������������������������������������������������������������������������� 33
Abstract��������������������������������������������������������������������������������������������������������������������������������������� 33
Note��������������������������������������������������������������������������������������������������������������������������������������� 33
Programming Concepts�������������������������������������������������������������������������������������������������������������� 35
Events������������������������������������������������������������������������������������������������������������������������������������ 35
Randomness�������������������������������������������������������������������������������������������������������������������������� 36
Displaying Images from Files������������������������������������������������������������������������������������������������ 36
Calculations, Including Built-in Functions����������������������������������������������������������������������������� 36
Looping���������������������������������������������������������������������������������������������������������������������������������� 37
Processing Programming Features��������������������������������������������������������������������������������������������� 37
Note��������������������������������������������������������������������������������������������������������������������������������������� 38
Under the Covers������������������������������������������������������������������������������������������������������������������������ 41
Polygon Sketch Operation Overview������������������������������������������������������������������������������������������� 42
Implementing the Polygon Sketch���������������������������������������������������������������������������������������������� 44
Planning��������������������������������������������������������������������������������������������������������������������������������� 44
Polygon Sketch Program������������������������������������������������������������������������������������������������������� 47
Coin-Toss Sketch Operation Overview���������������������������������������������������������������������������������������� 49
Implementing the Coin-Toss Sketch������������������������������������������������������������������������������������������� 52
Planning��������������������������������������������������������������������������������������������������������������������������������� 52
Things to Look Up����������������������������������������������������������������������������������������������������������������������� 56
How to Make This Your Own������������������������������������������������������������������������������������������������������� 56
What You Learned����������������������������������������������������������������������������������������������������������������������� 57
What’s Next��������������������������������������������������������������������������������������������������������������������������������� 58
vi
Table of Contents
vii
Table of Contents
Chapter 4: Classes�������������������������������������������������������������������������������������������������� 85
Abstract��������������������������������������������������������������������������������������������������������������������������������������� 85
Programming Concepts�������������������������������������������������������������������������������������������������������������� 86
Classes���������������������������������������������������������������������������������������������������������������������������������������� 86
Phases of Operations������������������������������������������������������������������������������������������������������������� 87
Tolerance or Margin��������������������������������������������������������������������������������������������������������������� 88
Processing Programming Features��������������������������������������������������������������������������������������������� 88
Classes���������������������������������������������������������������������������������������������������������������������������������� 88
Definition of Images, Rectangles, and Ellipses���������������������������������������������������������������������� 90
Dynamic Arrays��������������������������������������������������������������������������������������������������������������������� 90
Tolerance and OK-So-Far Coding������������������������������������������������������������������������������������������ 92
Bouncing Objects Overview�������������������������������������������������������������������������������������������������������� 92
Implementing the Bouncing Objects������������������������������������������������������������������������������������������� 94
Planning��������������������������������������������������������������������������������������������������������������������������������� 94
Program��������������������������������������������������������������������������������������������������������������������������������� 96
Make Path and Travel Path Overview���������������������������������������������������������������������������������������� 100
Implementing the Make Path and Travel Path�������������������������������������������������������������������������� 103
Planning������������������������������������������������������������������������������������������������������������������������������� 104
Program������������������������������������������������������������������������������������������������������������������������������� 105
Jigsaw Overview����������������������������������������������������������������������������������������������������������������������� 109
Implementing the Jigsaw��������������������������������������������������������������������������������������������������������� 111
Planning������������������������������������������������������������������������������������������������������������������������������� 111
Program������������������������������������������������������������������������������������������������������������������������������� 114
Under the Covers���������������������������������������������������������������������������������������������������������������������� 125
Things to Look Up��������������������������������������������������������������������������������������������������������������������� 126
How to Make This Your Own����������������������������������������������������������������������������������������������������� 126
What You Learned��������������������������������������������������������������������������������������������������������������������� 127
What’s Next������������������������������������������������������������������������������������������������������������������������������� 127
viii
Table of Contents
ix
Table of Contents
x
Table of Contents
xi
Table of Contents
xii
Table of Contents
Index��������������������������������������������������������������������������������������������������������������������� 343
xiii
About the Author
Jeanine Meyer is Professor Emerita at Purchase College/
SUNY. Before Purchase, she taught at Pace University and
prior to that was a manager and research staff member
at IBM Research in robotics and manufacturing. She also
worked as a research consultant at IBM for educational grant
programs.
She was moved to create this book because of a general
wish to make programming less mysterious and more
appealing while featuring the challenges. She enjoys
spending time with favorite pictures and video clips as well as producing programs. The
chance for a new edition provided a reason to explore p5.js, tools for using JavaScript
with features from Processing.
She is the author of five books and coauthor of five more on topics ranging from
educational uses of multimedia, programming, databases, number theory, and origami.
She earned a PhD in computer science at the Courant Institute at New York University,
an MA in mathematics at Columbia, and an SB (the college used the Latin form) in
mathematics from the University of Chicago. Recently, she has given lectures, in-person
and remotely, connecting origami, mathematics, and computer science as well as the
use and misuse of math in the news. She is a member of Phi Beta Kappa, Sigma Xi, the
Association for Women in Science, and the Association for Computing Machinery.
Jeanine is trying but remains a beginner at Spanish and piano.
xv
About the Technical Reviewer
Joseph McKay is an associate professor of new media. He primarily teaches new
directions in virtual space, programming for visual artists, intro to physical computing,
hacking the everyday, senior seminar, and web development.
Joe’s work is focused on interactive art games. He makes games that have their roots
in fine art but are also fun and easy to play. He is currently working on a VR art game
with innovative locomotion.
xvii
Another Random Document on
Scribd Without Any Related Topics
THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must, at
no additional cost, fee or expense to the user, provide a copy, a
means of exporting a copy, or a means of obtaining a copy upon
request, of the work in its original “Plain Vanilla ASCII” or other
form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.
• You pay a royalty fee of 20% of the gross profits you derive from
the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
Most people start at our website which has the main PG search
facility: www.gutenberg.org.