Errata, Chapter 3


p. 321, Figure

Printed: c.potentialAt(x, y)
Fixed: c1.potentialAt(x, y)
Reported by Shotaro Makisumi, 03-Oct-08.

p. 350, Program 3.1.11

Printed: // Split file by column into M+1 files.
Fixed: // Split file by column into N files.
Reported by Shotaro Makisumi, 03-Oct-08.

p. 362, Program 3.1.1

Printed: Value of charges not specified.
Fixed: Assume value of charges is 1.0 for each Charge.
Reported by Donna Gabai, 03-Oct-07.

p. 368, Exercise 3.1.38

Printed: wrong rotation formula
Fixed: ti = (si - ci) cos(theta) - (sj - cj) sin(theta) + ci
tj = (si - ci) sin(theta) + (sj - cj) cos(theta) + cj
Reported by Joshua Gabai, 23-Mar-08.

p. 379

Printed: Program 3.2.2
Fixed: Add trailing } to main()
Reported by Kevin Wayne, 18-Jun-07.

p. 380

Printed: Its private draw() method scales
Fixed: Its draw() method scales
Reported by Shotaro Makisumi, 04-Oct-08.

p. 381

Printed: Program 3.2.3
Fixed: Better style: remove call to draw() in addDataPoint().
Reported by Kevin Wayne, 18-Jun-07.

p. 381, Program 3.2.3

Printed: private void draw()
Fixed: public void draw()
Reported by Shotaro Makisumi, 04-Oct-08.

p. 383

Printed: adds the step size times the sine ... step size times the cosine
Fixed: adds the step size times the cosine ... step size times the sine
Reported by Shiv Mohan Dutt, 29-Oct-08.

p. 385

Printed: turn right 60 degrees (left -120 degrees)
Fixed: turn right 120 degrees (left -120 degrees)
Reported by Shiv Mohan Dutt, 29-Oct-08.

p. 421

Printed: theta = atan(re / im)
Fixed: theta = Math.atan2(im, re)
Reported by Charles Karney, 18-Oct-07.

p. 421

Printed: b.im
Fixed: b.im()
Reported by Charles Karney, 14-Nov-07.

p. 434

Printed: if a is less than b, then b must be less than a
Fixed: if a is less than b, then b must be greater than a
Reported by Kareem Elnahal, 17-Nov-07.

p. 436

Printed: public Counter implements
Fixed: public class Counter implements
Reported by Mario Lopez, 26-Aug-08.

p. 437

Printed: "integrate(Gaussian.phi(), a, b)
Fixed: "integrate(Gaussian.phi(), a, b, N)
Reported by Charles Karney, 14-Nov-07.

p. 443

Printed: (x0-y0)^2 + (x0-y0)^2 + ...
Fixed: (x0-y0)^2 + (x1-y1)^2 + ...
Reported by Swami Iyer, 23-Nov-07.

p. 451, Exercise 3.3.12

Printed: two-dimensional vectors
Fixed: two-dimensional unit vectors
Reported by Charles Karney, 18-Oct-07.

p. 457

Printed: Vector (Program 3.3.4)
Fixed: Vector (Program 3.3.3)
Reported by Maia Ginsburg, 03-Jan-08.

p. 458

Printed: Body (Program 3.4.5)
Fixed: Vector (Program 3.4.1)
Reported by Maia Ginsburg, 03-Jan-08.