# Maths - Forum discusion with Hauke

 Minor Corrections: AxisAngle to Matrix By: Hauke (haukeheibel) - 2007-04-26 00:41 Hi there,    First of all thanks for the nice web-site. Optically it could be nicer but the content rocks!    So here are my minor remarks regarding the conversion between axis angle representation and matrix representation.    a) When substituting the basis vectors of the plane perpendicular to the rotation vector for the first time, you change the order of the cross product between basis2 and the rotation axis without changing the sign. You are writing:    ------------- begin cite -------------    P2 = P1 + (cos(angle) - 1) * basis1 + sin(angle) * basis2    substituting the basis values above gives:    P2 = P1 + (cos(angle) - 1) * (axis × axis × P1) + sin(angle) * axis × P1    -------------- end cite --------------    whereas the last line should in my humblest opinion be:    P2 = P1 + (cos(angle) - 1) * ((axis × P1) × axis) + sin(angle) * axis × P1    As you can see I also added brackets around the substitution of basis2, since the cross product is not associative.    b) In the diagram where you are visualizing the plane being perpendicular to the rotation vector, the rotation vector and the point to be rotated, basis2 should actually point in the other direction when sticking to the right hand side rule.    As said before. These are minor remarks and I appreciate the work that has been done a lot.    Regards,  Hauke Heibel

 RE: Design (was "Minor Corrections: ...") By: Martin Baker (martinbaker) - 2007-04-26 10:26 Thanks again Hauke,    I agree with all you say and I have taken the background colours off the home page.    Its good to get feedback on this as I find I get certain ideas and perhaps loose the ability to see the site as users (especially new users) would see it.    I think I agree about content over presentation, having said that, if the presentation puts people off then there will be less feedback and the content will suffer.    I'm gradually trying to introduce the use of css (cascading style sheet) to define some of the presentation so there are now a few things I can change quite quickly across the site.    Cheers,    Martin

 RE: Minor Corrections: AxisAngle to Matrix By: Hauke (haukeheibel) - 2007-04-27 01:31 Hi Martin,    I just stumbled over another small error within the axis angle conversion.    At the top of the page where you are writing the matrices, right above the code sample, the scaling c in front of the identity matrix has to go away. And on the diagonal elements of the squared antisymmetric matrix you need to add -1, so x*x-1 and so on.    Finally I am a little bit confused about the "Issues" section. What's the issue? ;)    Cheers,  Hauke

 RE: Minor Corrections: AxisAngle to Matrix By: Martin Baker (martinbaker) - 2007-04-27 02:19 Hauke,    Can you explain a bit more? Most of the matrices on the page have a 'c' term in each of the leading diagonal elements, so I hope that's right or the page will need a big rewrite!    As an example, if we take the top left element of the matrix, this can be expressed as:  1 + (1-c) * (x*x - 1)  = 1 - (1-c) + (1-c)*x*x  = c + t*x*x (because t = 1-c)  Is this correct?    > Finally I am a little bit confused about the "Issues" section. What's the issue?  Yes, I take your point, I think I was just trying to define the notation and index numbering of the matrix. That's not really necessary on that page, I'll just link to the 'standards' page instead.    Thanks,  Martin

 RE: Minor Corrections: AxisAngle to Matrix By: Hauke (haukeheibel) - 2007-04-27 02:45 Hi again,    You are right. It can be written, as you did. The only point one could argue about is that the matrix being multiplied by t does not correspond to [~axis]^2. I was simply confused by the fact that the forumla does not correspond to:    [R] = [I] + sin(angle)[~axis] + (1-cos(angle))[~axis]^2    which is (as you have written at the bottom of the page)    [R] = I + s*[~axis] + t*[~axis]^2   = I + t*[~axis]^2 + s*[~axis];    and can be formulated as you did:    = c*I + t*([~axis]^2 + I) + s*[~axis]  = c*I + t*[~axis]^2 + t*I + s*[~axis]  = (c+t)*I + t*[~axis]^2 + s*[~axis]  = (c+1-c)*I + t*[~axis]^2 + s*[~axis]  = I + t*[~axis]^2 + s*[~axis]    Regards,  Hauke

 RE: Minor Corrections: AxisAngle to Matrix By: Martin Baker (martinbaker) - 2007-04-27 03:50 Hauke,    That's interesting,  I + t*[~axis]^2 + s*[~axis]  does look simpler than:  c*I + t*([~axis]^2 + I) + s*[~axis]  but when we write out the individual elements of the matrix, then the second form looks simpler.    I'll therefore write this equivalence more explicitly on the web page to try to reduce the confusion.    Thanks,    Martin