Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: GimbalRock - demo of rotations via gimbals

  1. #1
    Member dcromley's Avatar
    Join Date
    Apr 2009
    Location
    Wyoming, USA
    Age
    86
    Posts
    80
    Rep Power
    23

    GimbalRock - demo of rotations via gimbals

    I've always been intrigued by rotation mathematics. Finding thinBasic/TBGL was a great life opportunity. Matrix math has always been understandable and reliable. Quaternion math is as good or better, but not understandable (to me). Euler Angles can be used in a simple manner, but the results are poor -- the rotations lose their naturalness after the object leaves the home position. The math to use Euler Angles making the rotations more natural is not easy. I have wondered if it was even possible. Then I stumbled on a paper by Jed Margolin which didn't give the solution, but showed how to get the solution, which I was able to get. And the result is this program.

    It shows a head supported by gimbals (my avatar) that can be controlled by the keyboard. You can use either the simple controls or the natural controls. Hit F1 for info.

    It's zipped because I have "Include" files, so it may be best to put it in a separate directory. In the zipped directory, there's also a "GLFigures" program that uses that same "Include" files. It isn't done -- it's for testing.

    I've posted the "bundled" executable at http://dbarc.net/dcgimbalrock.exe (may have to turn antivirus off). The mathematics paper is at http://dbarc.net/dceulerrot.pdf.

    Thanks for existing, Regards, Dave
    Attached Files Attached Files

  2. #2
    Member REDEBOLT's Avatar
    Join Date
    Dec 2006
    Location
    Pickerington, Ohio, USA
    Age
    87
    Posts
    62
    Rep Power
    24
    That's really neat.



    Thanks,
    Bob

  3. #3
    i can't express enough how much this is beautiful
    thank you

  4. #4
    Member dcromley's Avatar
    Join Date
    Apr 2009
    Location
    Wyoming, USA
    Age
    86
    Posts
    80
    Rep Power
    23
    Thank you.
    I just noticed that in GLFigures.tbasic, there are 2 instances of "Lerp2" This may not work except in the latest download. Change those to "zLerp".

  5. #5
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Fantastic Dave
    I have no words. I could not even imagine how great minds can get out from thinBasic.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  6. #6
    Nice job Dave!

    If you hold all 4 arrow keys down at once, you get a predictable but all view presentation. (at least I do under Linux/Wine)

    P.S.

    Ran from a .exe thinBASIC package.
    Attached Images Attached Images
    Last edited by John Spikowski; 23-11-2011 at 09:30.
    ScriptBasic Project Manager
    Project Site
    support@scriptbasic.org

  7. #7
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Great example! Thanks a lot Dave!
    It run perfectly here...

    ...I liked very much the help screen too.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  8. #8
    Member dcromley's Avatar
    Join Date
    Apr 2009
    Location
    Wyoming, USA
    Age
    86
    Posts
    80
    Rep Power
    23
    Thanks for the nice comments.
    V1.1 - I just had to make the eyes blink.
    Also at http://dbarc.net/dcgimbalrock.exe
    Attached Files Attached Files

  9. #9
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Hehe,

    I didn't read your description carefully, so I didn't expect the head to blink. When it did, I almost fell from my chair


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  10. #10
    Member dcromley's Avatar
    Join Date
    Apr 2009
    Location
    Wyoming, USA
    Age
    86
    Posts
    80
    Rep Power
    23
    I had the giggles all day yesterday, thinking about your
    "almost fell from my chair".
    How FUNNY! Thanks.

Page 1 of 2 12 LastLast

Similar Threads

  1. playing with editfield :) demo
    By Lionheart008 in forum User files and/or user projects
    Replies: 0
    Last Post: 17-08-2010, 21:33
  2. smurf game demo :)
    By Lionheart008 in forum TBGL General
    Replies: 21
    Last Post: 02-11-2009, 23:28
  3. Art Thankies Demo 1.1a
    By Lionheart008 in forum TBGL Scripts and Projects
    Replies: 7
    Last Post: 23-04-2009, 18:54
  4. about TBGL getting rotations
    By Dev2Fun in forum thinStudio
    Replies: 3
    Last Post: 06-04-2009, 08:23
  5. Demo
    By peter in forum Sources, Templates, Code Snippets, Tips and Tricks, Do you know ...
    Replies: 10
    Last Post: 12-03-2009, 15:39

Members who have read this thread: 0

There are no members to list at the moment.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •