The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

luke.bace (66) [Avatar] Offline
Please post all errata here.
brainey (1) [Avatar] Offline
page 152 listing 3.2
This isn't exactly an error, but could be kind of confusing.

The code sample in listing 3.2 does produce a sine curve, but is missing a size function call to make the stage big enough to see the curve.

Based on the gray line, and stroke color/weight, I'd assume we're using the same setup code as the Perlin noise example, but a newbie might not get this.
davidgb (2) [Avatar] Offline
Re: Errors and Corrections
On page 141 of my pdf version. The second page of Section 3.1 Randomness and not-so-randomness.

It is stated that any random range can be expressed as:

float randnum = (random(1) * (max+min)) – min;

But I believe the correct expression is:

float randnum = (random(1) * (max - min)) + min;

The minus and the plus are switched around.

Thanks. I have been enjoying the meap! The first two chapters are excellent.
davidgb (2) [Avatar] Offline
Re: Errors and Corrections
In Chapter 4.

Code Listing 4.4 100 Spirals, with noise.

The variable "int endangle = 1440 + int(random(1440));" is not used.

It should be in the for loop.


for (float ang = startangle; ang <= 1440 + random(1440); ang += anglestep)


for (float ang = startangle; ang <= endangle; ang += anglestep)

Also, the section heading for section "4.1.4 Creating our own noise, revisited" is currently labeled 4.1.3, but should be 4.1.4.

Thanks! Chapter 4 is fun!
haha1111 (5) [Avatar] Offline
Re: Errors and Corrections
You say neighbour, I say neighbor.
Page 131 Listing 7.1:
function calls to: _cellArray[x][y].addNeighbour();
Page 132:
function declared as: void addNeighbor(){};

[Insert american vs. old english spelling joke here]
haha1111 (5) [Avatar] Offline
One more neighbour
Assuming neighbor is the proper spelling smilie
One more in Listing 7.5 page 144:
for (int i=0; i < neighbours.length; i++) {

Multiple neighbors in Listing 7.5 will appreciate this correction.
wHolt (1) [Avatar] Offline
Re: Errors and Corrections
on page 39, replace until with while