Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 6 of 6

Thread: Matrix for reflecting points on the line y=x

  1. #1
    Intern Contributor
    Join Date
    May 2008
    Posts
    67

    Matrix for reflecting points on the line y=x

    Is there are a matrix for this? I've been trying to come up with something, seems impossible to me.

  2. #2
    Senior Member OpenGL Pro dletozeun's Avatar
    Join Date
    Jan 2006
    Location
    FRANCE
    Posts
    1,367

    Re: Matrix for reflecting points on the line y=x

    Could you be more specific??

    If you are thinking in a 3D space, it is not line but a plane.

    And in what is it related to OpenGL? you should at least ask your question on the math section.

  3. #3
    Intern Newbie
    Join Date
    Feb 2007
    Location
    Tourlaville, France
    Posts
    48

    Re: Matrix for reflecting points on the line y=x

    If you search the matrix for the linear function that maps (x,y) to (y,x) then the 2D matrix is
    (0 1)
    (1 0)

  4. #4
    Intern Contributor
    Join Date
    May 2008
    Posts
    67

    Re: Matrix for reflecting points on the line y=x

    I was going to put it in the math section, but I figured I want to understand the matrix and it is probably going to be a shear function of some sort.

    So that matrix you've given is in fact a shear function

    010
    100
    001

    I can't really understand how this would move and object as there very very little on shearing on the net lol, but I'll try it out, thanks.

  5. #5
    Intern Newbie
    Join Date
    Feb 2007
    Location
    Tourlaville, France
    Posts
    48

    Re: Matrix for reflecting points on the line y=x

    Actually it is a simple permutation matrix that swaps x and y.

  6. #6
    Advanced Member Frequent Contributor _NK47's Avatar
    Join Date
    Mar 2008
    Posts
    574

    Re: Matrix for reflecting points on the line y=x

    true, any axis swap (*= -1.0) is mirroring/reflecting to the opposite side.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •