Essential Math Weblog

11/5/2005

More errata

Filed under: Erratical — Jim @ 9:41 pm

A couple more errata have come in since the last update. From Tim Lowery comes:

“On page 117, the figures look mislabeled, or the axis is incorrect. For example, Figure 3.5a shows x-axis rotation, but the object is rotating around the y-axis. Likewise, for Figure 3.5b.”

In this case, the captions are correct (the intent is to go in x-y-z order), but the figures are reversed.

From k. avery comes:

“At the end of p. 623, cot theta should be csc theta / sec theta, not sec theta / csc theta.”

Indeed it should be. And I had thought I caught that one once before. Evasive devils, those cotangents.

7/29/2005

Errata and Patch Files

Filed under: Erratical — Jim @ 10:13 pm

I’ve finally gotten around to creating a formal errata file, and a code update. The code update is an encrypted ZIP file; the password is the second word on page 37. The paths should be set up correctly to match the original CD. To use, simply unzip it to the directory where you copied the CD contents.

If there are issues, you can post a comment here, or write me by using my first name at this domain.

6/7/2005

Reparameterizing a Curve, Part Three

Filed under: Erratical, Mathematical — Jim @ 9:08 pm

Now we come to the final part: merging Newton-Raphson and bisection together, and choosing the correct one depending on the situation.
(more…)

5/11/2005

Reparameterizing a Curve, Part Two

Filed under: Erratical, Mathematical — Jim @ 9:11 pm

Due to preparing for a week of vacation, and then going on a week of vacation, and then recovering from a week of vacation, this blog has fallen from the wayside a bit. But I’m back, and I’ll try to wrap up this topic in a couple of postings.

When last we left our intrepid heroes, we were discussing Newton-Raphson root finding, how it’s used for reparameterizing a curve, and when it fails (namely when the speed on the curve approaches zero). The solution hinted at was the bisection method.
(more…)

4/11/2005

Reparameterizing a Curve

Filed under: Erratical, Mathematical — Jim @ 8:52 pm

I’m still optimizing memory and speed so nothing exciting to report under the lighting topic. Maybe later this week or next week.

So let’s look at a bit of code from the book, shall we?
(more…)

12/29/2004

Errata: Tensor Product

Filed under: Erratical, Mathematical — Jim @ 10:31 pm

William Brennan points out that on page 84, the equation

is not correct. There are two ways to rewrite this. In one the intended order is correct, but is missing the transpose operator to indicate that it’s a row vector:

Alternatively, you can generate the same result with a column vector by doing:

In Chapter 3, we simplify the Rodrigues formula (page 123) and general planar reflections (page 128) by using the tensor product. Since the arguments of the tensor product are the same in these cases, the ordering doesn’t matter. However, the ordering of the arguments needs to be reversed in the shear matrices on page 132, so

and

Other tensor product arguments may need to be reversed elsewhere in the text, though I can’t find any at this time.

Errata: Figure 1.9

Filed under: Erratical — Jim @ 9:23 am

Reported by Richard Ruth: In Figure 1.9 on Page 26, the label on the hypotenuse should be .

6/29/2004

Getting Axis and Angle from Rotation Matrix

Filed under: Erratical, Mathematical — Jim @ 11:36 am

There is a bug in the code that gets the axis and angle information from a rotation matrix. Where the angle is 180 degrees (the last else statement) it computes the reciprocal value incorrectly. The original code is:

C++:
  1.  
  2. float recip = 0.5f/s;
  3.  

The fixed code should be:

C++:
  1.  
  2. float recip = 1.0f/s;
  3.  

This should be corrected in both IvMatrix33 and IvMatrix44.

5/15/2004

Correction: Quaternion Creation

Filed under: Erratical, Mathematical — Jim @ 8:37 pm

This is both a correction, and an improvement to the creation of a quaternion from two vectors. Or as it is commonly known, Shortest RotationArc.

The current code doesn't handle the case where the two vectors are opposing; there's an if statement to detect it, and a comment, but no recovery code. The problem is that there are an infinite number of orthogonal rotation axes -- we just need to pick one. The solution is to check to see which axis the start vector (it could be the finish vector, it doesn't matter) is generally pointing along. If it's pointing generally along the -axis, then we take the cross product with the -axis to get our rotation axis. Otherwise we take the cross product with the -axis.
(more...)

5/4/2004

Correction: Quaternions

Filed under: Erratical, Mathematical — Jim @ 9:35 pm

Ah, our first errata. How bittersweet.

Eric Mumau sent me this one. On page 499, equation 10.11 is wrong. It should read:

Correspondingly, the following equation should read:

The rest of the page follows as before.

This affects the code which starts at the bottom of page 499. At the top of 500, the first three lines should be rewritten as:

C++:
  1.  
  2. float vMult = 2.0f*(x*vector.x + y*vector.y + z*vector.z);
  3. float crossMult = 2.0f*w;
  4. float pMult = crossMult*w - 1.0f;
  5.  

Note that the code on the CD is not the same as that given in the text, and in fact will actually work. However, it is slightly less efficient than what is given here.

Powered by WordPress

Bad Behavior has blocked 51 access attempts in the last 7 days.