Subject:
|
Re: Unmatrix
|
Newsgroups:
|
lugnet.cad
|
Date:
|
Tue, 9 Apr 2002 23:12:30 GMT
|
Viewed:
|
523 times
|
| |
| |
> I think we covered this a while ago in the thread about the
> ldraw oblique matrix. This one has a link to some Graphics Gems
> source code.
>
> http://news.lugnet.com/cad/dev/?n=5384
>
> It seems to me though that you can't really produce 3 definitive
> X, Y, and Z axis rotations. There should be several different ways
> to achieve the same rotation matrix. I haven't looked at the
> Graphics Gems code, but I thought it just generated Scale, Translate,
> Shear, and one overall Rotation matrix. If you want to seperate
> that into component rotations, you have to decide which axis to
> rotate about first, and probably some other stuff. A google search
> for Euler Rotation Angles might turn up some more info on this.
My Lani project has a rotation matrix that takes the parameters x, y, z.
The first thing it does is determine what rotation parameters are 0. There
are 7 cases:
x only
y only
z only
x and y
x and z
y and z
x, y, and z
This is for speed.
It then performs the math. The cos/sin values are stored in an array,
instead of calling the functions. This is for speed.
I tried to eliminate all of the loops for speed. The .5 version still has
some loops for x, y, and z. The .53 version doesn't have any loops, but I
haven't tested the math to make sure that it works. I know .5 works.
I think I added a rotation point to the .53 version that I haven't tested,
so just stay away from the .53 version
Again, the code is at http://www.cc.utah.edu/~jer29950/lani/
The rotation function is in the LaniTargets.java file.
--
Thanks:
James Reynolds
http://www.cc.utah.edu/~jer29950
james@scl.utah.edu
james@mail.mlmc.utah.edu
james.e.reynolds@m.cc.utah.edu
|
|
Message is in Reply To:
| | Re: Unmatrix
|
| (...) I think we covered this a while ago in the thread about the ldraw oblique matrix. This one has a link to some Graphics Gems source code. (URL) seems to me though that you can't really produce 3 definitive X, Y, and Z axis rotations. There (...) (23 years ago, 9-Apr-02, to lugnet.cad)
|
7 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|