Errata

Make: Getting Started with Processing

Errata for Make: Getting Started with Processing

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Printed
Page *
*

Because smoothing is the default setting for Processing 2.0, the images for the following examples need to be replaced. The files were sent to the editor.

Example 2-1 (Ex_02_01.tif)

Example 3-3 (Ex_03_03.tif)
Example 3-4 (Ex_03_04.tif)
Example 3-6 (Ex_03_06.tif)
Example 3-7 (Ex_03_07.tif)
Example 3-9 (Ex_03_09.tif)
Example 3-10 (Ex_03_10.tif)
Example 3-11 (Ex_03_11.tif)
Example 3-18 (Ex_03_18.tif)
Example 3-19 (Ex_03_19.tif)

Example 4-1 (Ex_04_01.tif)
Example 4-2 (Ex_04_02.tif)

Casey Reas
Casey Reas
 
Aug 31, 2011 
Printed
Page *
*

Because smoothing is the default for Processing 2.0, each instance of smooth() in the code should be removed, except it needs to remain in Example 3-11. So, smooth() should be removed from the following programs:

2-2

3-12
3-13
3-14
3-15
3-16
3-17
3-20

4-1
4-2
4-3
4-5
4-6
4-7
4-8
4-9
4-10
4-11
4-12
4-13

5-3
5-4
5-5
5-6
5-7
5-8
5-9
5-10
5-11
5-12
5-13
5-14
5-15
5-16
5-18
5-20

6-6
6-9
6-10

7-3
7-4
7-5
7-6
7-8
7-9
7-11
7-13
7-14
7-15
7-19
7-20
7-21
7-22

8-3
8-4
8-5
8-6
8-7

9-1
9-2

10-1
10-2
10-3
10-7
10-9
10-10

11-4
11-8
11-9

Robot 1
Robot 2
Robot 3
Robot 4
Robot 5
Robot 6
Robot 7
Robot 8

Casey Reas
Casey Reas
 
Aug 31, 2011 
Printed
Page 7
Last paragraph

In the last paragraph, change "processing-1.0" to "processing-2.0"

Casey Reas
Casey Reas
 
Sep 09, 2011 
Printed
Page 8
1st P

Change URL in the first paragraph to:
http://wiki.processing.org/w/Troubleshooting

Casey Reas
Casey Reas
 
Aug 31, 2011 
Printed
Page 9
Top-Middle

Move image from above the code �ellipse(50, 50, 80, 80);� to embed within the text:


If you've typed everything correctly, you'll see this image:

[Move circle figure here]

If you didn't type it correctly...

Casey Reas
Casey Reas
 
Aug 31, 2011 
Printed
Page 17 21 26 29
Illustrations

I have ordered this book online and the illustrations on the mentioned pages are very blurry/pixelated and extremely difficult to read ? it is probably a printing problem.

Here is how they look like:

http://img11.imageshack.us/img11/8014/img0153zk.jpg
http://img822.imageshack.us/img822/941/img0154zuw.jpg
http://img98.imageshack.us/img98/1315/img0155ar.jpg
http://img839.imageshack.us/img839/7271/img0156gr.jpg

Note from the Author or Editor:
I don't have a copy of this printing of the book, so I don't know if the error is only with these figures, or it applies to more. It looks like a production issue with one printing of the book that wasn't a problem in previous printings.

Anonymous  Sep 12, 2011  Sep 16, 2011
Printed
Page 23
Example 3-11

The text for Example 3-11 should change to:


Example 3-11: Draw Rough and Smooth Circles

The graphics in Processing are antialiased by default. The noSmooth() function turns this off and smooth() enables it again.


The code should be updated to this:

size(480, 120);
noSmooth(); // Turns off smoothing
ellipse(140, 60, 90, 90);
smooth(); // Turns on smoothing
ellipse(240, 60, 90, 90);

Casey Reas
Casey Reas
 
Aug 31, 2011 
PDF
Page 56
code example

The variable diameter is defined but never used in the example.

Note from the Author or Editor:
Yes, good catch. The third line of Example 5-8 on page 56 should be removed.

mxb  Jul 16, 2010  Jan 01, 2011
Printed
Page 90
Line 11 and Line 12

The program listing on page 90 uses the files "robot3.svg" and "alpine.jpg" yet these files are not included in media.zip.

Note from the Author or Editor:
The "media.zip" file hosted on the Processing.org website has now been updated to include these additional files. This doesn't affect the printed book, but is a great fix for people who download the file.

Yong Joseph Bakos  Jul 14, 2010 
Printed
Page 96
Example 7-6 code line 17

On line 17 of the code listing for Example 7-6, the text reads:

x = startX + ((stopX - startX) * pct);

And it should read:

y = startY + ((stopY - startY) * pct);

Note from the Author or Editor:
Yes, good catch. It's line 19 if you count the spaces. The line that reads "y = startY + ((stopY-startX) * pct);" should be "y = startY + ((stopY-startY) * pct);"

Yong Joseph Bakos  Jul 15, 2010  Jan 01, 2011
Printed
Page 132
2nd paragraph

� As a rule of thumb, field values that you want to be different for each CLASS are passed �

Shouldn't that be:

� As a rule of thumb, field values that you want to be different for each OBJECT are passed �



not class, instead object ?


Thanks

Klaus von Valtier

Klaus3vv  Mar 09, 2013 
Printed
Page 138
Picture

The image shown does not match the images included in the media.zip file. The robot1.svg and robot2.svg files are the same image in the media.zip file.

Note from the Author or Editor:
This has been corrected.

Marcus Runde  Feb 17, 2011 
Printed
Page 149
Example 10-9 code listing, lines 2 and 3

The array declarations in this listing do not match the rest of the examples in the book. The lines that read:

int x[] = new int[num];
int y[] = new int[num];

Should read:

int[] x = new int[num];
int[] y = new int[num];

Although this is not a syntax error, the style of the existing array declarations in code listing 10-9 is discouraged in Java.

Note from the Author or Editor:
Yes, another good find. So, for example 10-09, the first three lines should read:

int num = 60;
int[] x = new int[num];
int[] y = new int[num];

Yong Joseph Bakos  Jul 16, 2010  Jan 01, 2011
152
First paragraph (frame-0001.png), and in code (currentFrame=1)

In Example 10-11, the code implies that the files in the media.zip download are numbered from 0001 to 0012, but in fact the download has them as 0000-0011. In the intro paragraph it starts with "frame-0001.png" instead of 0000, and the two assignments of currentFrame are to 1 instead of 0.

It still works with 1 (as it does if they're both 11), but it's confusing this way. Also, the

if (currentFrame >= images.length)

is also confusing. If it's incrementing, how would it be greater than 12? why not use

if (currentFram == images.length)

instead?

Great book -- very well done. Thanks!

Note from the Author or Editor:
Yes, this is improved by updating the text and the code. The text should read "The images are named sequentially (frame-0000.png,
frame-0001.png, and so forth),"... And the code should be:

int numFrames = 12; // The number of frames
PImage[] images = new PImage[numFrames]; // Make the array
int currentFrame = 0;

void setup() {
size(240, 120);
for (int i = 0; i < images.length; i++) {
String imageName = "frame-" + nf(i, 4) + ".png";
images[i] = loadImage(imageName); // Load each image
}
frameRate(24);
}

void draw() {
image(images[currentFrame], 0, 0);
currentFrame++; // Next frame
if (currentFrame == images.length) {
currentFrame = 0; // Return to first frame
}
}

Anonymous  Nov 07, 2010  Jan 01, 2011
Printed
Page 158
Top

Change �OpenGL� in line 3 to �P3D�

Change line 5 to �import processing.pdf.*;�

The paragraph under 3D should read:


To draw in 3D in Processing, add a third parameter to the size() function to change the way graphics are drawn. By default, Processing draws using a 2D renderer that is very precise, but slow. This is the P2D renderer. You can also change the renderer to Processing 3D, called P3D, to allow your programs to draw in one additional dimension, the z-axis (see Figure 11-1).


Remove this:


and OpenGL like this:

size(800, 600, OPENGL);

Casey Reas
Casey Reas
 
Aug 31, 2011 
Printed
Page 159
All

First paragraph change to:


The P3D renderer is built in. It uses OpenGL to interface with the fast graphics hardware that's available on most machines sold nowadays.


Remove the NOTE on page 159 entirely

Casey Reas
Casey Reas
 
Aug 31, 2011 
Printed
Page 161-163
Examples

// Example 11-1, 11-2, 11-3

For all three examples, remove the �import processing.opengl.*;� from the top and change the size function to �size(440, 220, P3D)�

Casey Reas
Casey Reas
 
Aug 31, 2011 
Printed
Page 169
Example 11-6

Because the Arduino serial API was changed, example 11-6 does not work with Arduino 1.0. I needed to modify the line

Serial.print(val, BYTE);

to

Serial.write((byte)val);

to make it work.

Tami

Tami (Masaaki) Takamiya  Dec 22, 2011 
Printed
Page 172
bottom (in the code)

From the Processing Issues Database (Issue 414)

original code:
void draw() {
if (port.available() > 0) {
val = port.read();
val = map(val, 0, 255, 0, height);
}

error:
change "height" to "height/2"

I have tested the code. It seems "height/2" works well. However, please let me know if I am wrong. Thanks.

Casey Reas
Casey Reas
 
Sep 18, 2011