trueSpace Gimble Lock

Post Reply
User avatar
trueBlue
Captain
Posts: 5214
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

trueSpace Gimble Lock

Post by trueBlue »

tS76 Keyframe Recorder
This Recorder script works except for a Gimble Lock with the Pitch -Y & +Y
It stops rotating at Frame 90 - Info Panel reads [X 180] [Y 89] [Z -180]
How can I fix this?

Using the ExpandInMatrix dose not have the Gimble Lock problem
Using the ExpandInMatrix.png
Using the ExpandInMatrix.png (15.63 KiB) Viewed 1187 times
I searched for Gimbal Lock and found this site

How to Fix Gimbal Lock in N-Dimensions
https://omar-shehata.medium.com/how-to- ... f7baec2b5e

2 links from above site

1.) Rotors from Geometric Algebra
https://github.com/weshoke/versor.js/#creating-objects
Note:
// Create a rotor that rotates objects
// 90 degrees (π/2 radians) in the e12 (xy-) plane.
var rot = E3.Rot(Math.cos(Math.PI/4), 0, 0, Math.sin(Math.PI/4));

2.) You can see the full JavaScript code for all 4 rotating cubes here:
https://glitch.com/edit/#!/gimbal-lock- ... %3A51%3A37
.
.
Attachments
tS76 Keyframe Recorder.RsObj
(91.15 KiB) Downloaded 117 times
stan
Master Chief Petty Officer
Posts: 580
Joined: 21 May 2009, 17:20

Re: trueSpace Gimble Lock

Post by stan »

David, the issue could be in the script version of IRdMatrixf. It seems IRdMatrixfDisp functions don't all work right. The issue is also in the components if you use Decompose ([out, retval] IDispatch **ppComponents) and Compose ([in] IDispatch *pComponents). Other rotate functions are only in object space but they will rotate passed 90 Y properly but at world 0,0,0.. I think those are unfinished functions.

They might work properly in c++ code, I didn't check. I thought the devs had figured out that issue, but maybe not.
User avatar
trueBlue
Captain
Posts: 5214
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: trueSpace Gimble Lock

Post by trueBlue »

Thank you for checking it out Stan!
Is a shame that the only thing missing in this little project, is the Pitch
This looks promising, but have not figured out how to incorporate it into the script
No Pitch glitch...

Code: Select all

var Pitch = params.ConValue('Pitch');
if(!Node.Selection())return
Widgets.RotateWorld(Node.Selection(), 0, Pitch, 0, 0, 0, 0)
Post Reply