HI!
But using the following matrix (determinant = 1, a pure rotation about x-axis )

| 1.0     0        0      0 |
|    0  -1.0       0      0 |
|    0      0   -1.0      0 |
|    0      0       0      1 |

If taking log of ths matrix , I got the same problem. Why?

Thanks!

2006/1/6, Andreas Zieringer <[EMAIL PROTECTED]>:
Hi,

the matrix log function only works for matrices with a determinant > 0.
The determinant of your matrix is -1.

Andreas

> Hi! I had a problem about using Matrix4d::log function.
> Here is my code segment
>
> {
> osg::Vec3d v1(0.063346, -0.175785, 0.982388);
> osg::Vec3d v2(-0.867723, 0.476562, 0.141227);
> osg::Vec3d v3(0.492994, 0.861387, 0.122345);
>
> osg::Matrix4d matrix(v1, v2, v3);
> matrix[3][3] = 1.0;
>
> osg::Matrix4d log_matrix;
> matrix.log(log_matrix);
> }
>
> I had verified that the matrix is an orthogonal matrix(pure rotation matrix)
> Somehow, after log operation I got a precision exception probem.
> log_matrix becomes
>
> 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN
> 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN
> 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN
> 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN
>
>
> Is there any solutions to this problem?
>
> Thanks !



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to