Rotation Matrix :45 degrees about point (5,5,0)

Discussion in 'AutoCAD' started by Richard Khaw, Feb 23, 2004.

  1. Richard Khaw

    Richard Khaw Guest

    On-line book about AutoCAD VBA, the elements on the matrix states that:
    0.707107 -0.707107 0.0 5.0
    0.707107 0.707107 0.0 -2.071068
    0.0 0.0 1.0 0.0
    0.0 0.0 0.0 1.0

    I've followed some literature about matrix translation and transformation
    and got the following elements:
    0.707107 -0.707107 0.0 0.0
    0.707107 0.707107 0.0 -7.07107
    0.0 0.0 1.0 0.0
    0.0 0.0 0.0 1.0

    Please suggest me how comes the elements are different and correct my
    mistake.

    Thanks.
    Richard Khaw
    Torrance, California.
     
    Richard Khaw, Feb 23, 2004
    #1
  2. Richard Khaw

    wivory Guest

    Do you *need* to know the numbers in the matrix? AutoCAD provides the methods GetUCSMatrix and TransformBy for matrix manipulation and the actual values normally wouldn't be of interest. The TranslateCoordinates method is another way to manipulate objects between coordinate systems.

    Perhaps if you explain a bit about what you're trying to do we can help more.

    Regards

    Wayne Ivory
    IT Analyst Programmer
    Wespine Industries Pty Ltd
     
    wivory, Feb 24, 2004
    #2
  3. Not sure what you mean by 'the actual values normally wouldn't be
    of interest'. The TransformBy method takes a matrix, and was not
    specifically intended to be the matrix returned by GetUCSMatrix,
    it can be any matrix that may be composed manually, or obtained via
    other means.

    Also, TranslateCoordinates doesn't do much for transforming
    objects.



    AcadX for AutoCAD 2004 Beta 1
    http://mysite.verizon.net/~vze2vjds/acadx/AcadX16.zip


    manipulation and the actual values normally wouldn't be of interest. The TranslateCoordinates method is another way to
    manipulate objects between coordinate systems.
     
    Tony Tanzillo, Feb 24, 2004
    #3
  4. Richard Khaw

    wivory Guest

    True, I realised after I posted that only in some cases would there be an existing object which you could apply a GetUCS method to (I guess I had the blinkers on because that's the way I've used those methods).

    The reference to TranslateCoordinates was indicating another possible approach to the bigger picture which may or may not be relevant, hence the request for more information. For example I've created a bunch of objects "relative" to a target object by creating a UCS for it and then "transforming" all the new objects using TranslateCoordinates. Maybe that's unusual - I don't know - I was starting from the ground up at that stage and it produced the desired result.

    Regards

    Wayne
     
    wivory, Feb 25, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.