Re: [Plib-users] Problem with rotations
Brought to you by:
sjbaker
From: Ben W. <za...@ec...> - 2002-09-10 11:29:54
|
Ok, I see what you are talking about and it makes sence. But why would this only cause a problem with pitch. I know that is questionable to return back from a matrix, so I tried it just using the matrix and not returning it back and got the same results.. Ben ----- Original Message ----- From: "Steve Baker" <sjb...@ai...> To: <pli...@li...> Sent: Tuesday, September 10, 2002 1:47 AM Subject: Re: [Plib-users] Problem with rotations > > > Ben Woodhead wrote: > > > Ya, I don't have a problem with that.. It seems to be sgMakeRotMat(mat, > > h,p,r) where pitch is set to something other then 0. Then I converted it > > back to sgCoord and used transform... > > Could your confusion be this: > > * You take three angles (H,P,R) and convert them into a matrix M > (using sgMakeRotMat...or whatever). > > * Then you convert M *BACK* into an sgCoord and extract (H',P',R'). > > Do you expect (or rely upon) H' == H, P' == P and R' == R ??? > > If so, then that's not right. There are an infinite number of values > for H,P,R that all generate the exact same rotation matrix. Hence, when > you convert a matrix *BACK* into three Euler angles, you don't get the > same three angles back...although the three angles you get *DO* perform > the same effective rotation as the three you put in. > > Hence, it's possible to say things like: > > H = 0 > P = 180 > R = 0 > > ...then convert to a matrix...convert back again and get back: > > H' = 180 > P' = 0 > R' = 180 > > ...totally different numbers - but having the same exact same effect. > > If that is your problem, then it's not something that we can fix - it's > just the way math works. > > ----------------------------- Steve Baker ------------------------------- > Mail : <sjb...@ai...> WorkMail: <sj...@li...> > URLs : http://www.sjbaker.org > http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net > http://prettypoly.sf.net http://freeglut.sf.net > http://toobular.sf.net http://lodestone.sf.net > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same old > cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 > _______________________________________________ > plib-users mailing list > pli...@li... > https://lists.sourceforge.net/lists/listinfo/plib-users > |