Dark Bit Factory & Gravity
PROGRAMMING => Coding tutorials => Topic started by: combatking0 on May 21, 2012
-
After many years of being a member here, I have finally produced my first tutorial.
Many languages come with Quaternion functions built in. This tutorial has been made for the benefit of those who are coding in languages without Quaternion capabilities.
The Yabasic version is a bit sloppy, but runs smoother than the Actionscript version. Even if you don't have Flash, you can still view the ActionScript code using Notepad++ or Notepad by looking in the .as files.
You'll need Jim's Yabasic Emulator to edit or run the Yabasic version, or Flash 8 or higher to edit & recompile the AS version Flash Player 8 or higher to veiw the AS version.
-
Excellent work CK, I'll defenatly look into this soon! K+ :)
-
Aww, I thought a tutorial in the sense of a step by step explanation of what you're doing and why. Source code alone isn't as explanatory as a tutorial might be, but it should still be a very usefull read once I decide to go into this!
-
I wasn't sure how to present it. There's an explanation of how Euler and Quaternions differ - was I close?
-
The text file that accompanies the source gives a nice overview of what gimbal lock is and the differences and explains the concept of rotating the axis with the object. I would have found this useful to understand some of the strange axis swapping problems I was getting when I was first starting to explore software 3D engines.
K+
-
Oh, I must've overlooked the text file. :whack:
It would be cool to make an interactive tool showing two gimbals with 3 axis of rotation, one using euler angles and the other quaternions. I know you did some really excellent learning tools.
I only remember gimbal lock from 3d software, I never actually encountered it yet in programming. I'm still happily residing in flatland, but things like cube challenges (as opposed to square challenges) encourage me to code upward, not northward. ;D
-
Ah, the text file looks much more enlightening then the code did! ;)
Nice ascii drawings as well! :clap:
-
Good idea - I'll put together a gimbal demo.
K+ for the quick feedback.
-
Nice on CK, I'll take a look later and probably learn a thing or two :) K++