Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6011261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:14:05+00:00 2026-05-23T02:14:05+00:00

I have a box defined by 8 points. From those points, I calculate axes

  • 0

I have a box defined by 8 points. From those points, I calculate axes and create rotation matrix as follows:

axis[0], axis[1], axis[2]
mat = 
{
  axis[0].x axis[1].x axis[2].x 0
  axis[0].y axis[1].y axis[2].y 0
  axis[0].z axis[1].z axis[2].z 0
  0         0         0         1
}

I have particular rotation matrix:

{
  -1  0  0  0
   0  0  1  0 
   0 -1  0  0
   0  0  0  1
}

As best of my knowledge, this is a valid rotation matrix. Its inversion is equal to its transposition.

Now I would like to store this matrix as a quaternion. But later, I need rotation matrix to be recreated from this quaternion. I believe that convertsion from matrix to quaternion and back to matrix should be an identity transform and I should get the same matrix that I had in the beginning (maybe with very small numerical errors).

But this seems not to be the case. Both SlimDX (C#) and my propertiary math library (C++) return invalid matrix.

First, quaternion that I receive:

C#:  0, 0, 0.70710676908493, 0
C++: 0, -0.707107, 0, 0

And matrix created from this quaternion:

C#:

0 0 0 0
0 0 0 0
0 0 1 0
0 0 0 1

C++:

0 0 0 0 
0 1 0 0
0 0 0 0
0 0 0 1

Why is this wrong?

I’ve also tried this: http://cache-www.intel.com/cd/00/00/29/37/293748_293748.pdf but it gave me bad results as well.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T02:14:06+00:00Added an answer on May 23, 2026 at 2:14 am

    The matrix you gave isn’t a rotation matrix, it’s a reflection matrix because its determinant is -1. See the definition on Wikipedia. You can tell something isn’t right because you should get a unit quaternion, and yet the one you’re getting back only has length 1/sqrt(2).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to generate random points on a 3D box defined by its
I have a modal box with a defined height. Inside of this box there
I have a combo box defined as such <ComboBox Name=RoomDropDown Visibility={Binding Path=RoomDropDownVisible,Mode=OneWay,Converter={StaticResource BoolVisibilityConvertor}} ItemsSource={Binding
I have a combo box defined as such <ComboBox Name=RoomDropDown Visibility={Binding Path=RoomDropDownVisible,Mode=OneWay,Converter={StaticResource BoolVisibilityConvertor}} ItemsSource={Binding
I have a select box defined as shown below. I want to print out
Assume I have a camera defined by its position and direction, and a box
I have text box to enter a phone number. I'm using AJAX MaskedEditExtender and
I have a box built via html borders. I want to connect the bottom
INSERT MODE i have check box in one tr. and another dropdown control in
Let's say we have a box with some short paragraphs: <div style=overflow:hidden> <p>Some text</p>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.