Here is the text of the email..
Hi,
I have just finished reading p78, your section on creating a Sierpinski triangle using recursion.
I am using the International Edition.
I think I have found an error that is not listed on your errata page located at this link:
(I am a student studying UNISA, the University of South Africa; and in the third year undergraduate course on computer graphics your text is the prescribed literature.)
You write :-
"Suppose that the vertices of our original triangle are given by the array
GLFloat v[3][2];
Then the midpoints of the sides are given by the array m[3][3], which can be computed using the code
for(j=0; j<2; j++) m[0][j] = (v[0][j] + v[1][j]) / 2.0;
for(j=0; j<2; j++) m[1][j] = (v[1][j] + v[2][j]) / 2.0;
for(j=0; j<2; j++) m[2][j] = (v[2][j] + v[3][j]) / 2.0;
Surely it should read
Then the midpoints of the sides are given by the array m[3][2], which can be computed using the code?
Or am I just an idiot; with an error in my brain?
Kind Regards,
Ilan Pillemer
No comments:
Post a Comment