Tuesday, February 27, 2007

Letter to the Professor...

I just wrote an email to the author of my prescribed textbook in computer graphics at UNISA.

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

...

.. It's in words that the magic is -- Abracadabra, Open Sesame, and the rest -- but the magic words in one story aren't magical in the next. The real magic is to understand which words work, and when, and for what; the trick is to learn the trick. ... And those words are made from the letters of our alphabet: a couple-dozen squiggles we can draw with the pen. This is the key! And the treasure, too, if we can only get our hands on it! It's as if - as if the key to the treasure is the treasure! ------- John Barth, Chimera