+ Reply to Thread
Page 8 of 9 FirstFirst ... 6789 LastLast
Results 71 to 80 of 88
Like Tree7Likes

Thread: Short quaternions guide

  1. #71
    Lifetime Supporter rich_27's Avatar
    Join Date
    Aug 2007
    Location
    findByUser("rich_27"):pos()
    Posts
    224

    Default Re: Short quaternions guide

    I did complex numbers early last school year, and it doesn't relate that much to quaternions...

    Fizyk, when did you learn of them?

  2. #72
    Wire Sofaking Fizyk's Avatar
    Join Date
    Jun 2008
    Location
    Łomianki, Poland
    Posts
    740
    Blog Entries
    1

    Default Re: Short quaternions guide

    About quaternions? I have first heard of them a long time ago, they were briefly mentioned in a magazine about science for children. Also at the university they were mentioned once, but only as an interesting thing. So, almost all of my knowledge about quaternions I got from the internet They are not something that is taught in schools, because they are pretty much useless, the only field where they are really of use is 3D graphics.

    My programs: BIOS - Alcyone - Calculator - Notepad - Movie Player
    My tutorials: applyTorque - Quaternions - PID controllers
    Some other things I made: FT Chip - RK4 Solar System

  3. #73
    Wire Noob Remscar's Avatar
    Join Date
    Feb 2010
    Posts
    27

    Default Re: Short quaternions guide

    It helped my learn quaternions.

  4. #74
    Wire Amateur Crenabea's Avatar
    Join Date
    Sep 2009
    Posts
    75

    Default Re: Short quaternions guide

    Quote Originally Posted by Fizyk View Post
    What are quaternions?

    To explain it well, we need to start at what are complex numbers.
    The regular numbers, that everyone is used to, are the real numbers. But they have a drawback - there are equations that don't have solutions in real numbers, like x^2=-1. There is no real number that squared gives -1. That's why people invented complex numbers. A number that when squared gives -1 is i, called an imaginary unit.

    A complex number is a number like a+bi, where a and b are real. They have many great properties, but this is not the matter of this tutorial. To give you a quick feel how calculations on complex numbers work, here are a few examples:

    Assume we have two complex numbers, z = a+bi and w = c+di (a, b, c, d are real). Then:
    • z+w = a+bi + c+di = (a+c) + (b+d)i
    • z*w = (a+bi)(c+di) = ac + adi + bic + bidi = ac + adi + bci - bd = (ac-bd)+(ad+bc)i
    • z/w = (a+bi)/(c+di) = [(a+bi)(c-di)]/[(c+di)(c-di)] = [(ac+bd)+(bc-ad)i]/[(cc+dd)+(cd-cd)i] = [(ac+bd)+(bc-ad)i]/(c^2+d^2)
    So the i is the imaginary and the product of a + b is being multiplied by the imaginary number. Is the imaginary number some number that will always solve things like x^2 = -1?
    Last edited by Lyinginbedmon; 03-13-2010 at 04:36 PM.

  5. #75
    Wire Sofaking Fizyk's Avatar
    Join Date
    Jun 2008
    Location
    Łomianki, Poland
    Posts
    740
    Blog Entries
    1

    Default Re: Short quaternions guide

    Quote Originally Posted by Crenabea
    So the i is the imaginary and the product of a + b is being multiplied by the imaginary number
    Only b is multiplied by i. It's a+bi, not (a+b)i (though (a+b)i is a complex number too, but it has real part equal to 0).

    Quote Originally Posted by Crenabea
    Is the imaginary number some number that will always solve things like x^2 = -1?
    This is the definition of i: i is such a number, that i^2=-1. So yes, it will always solve things like x^2=-1.

    My programs: BIOS - Alcyone - Calculator - Notepad - Movie Player
    My tutorials: applyTorque - Quaternions - PID controllers
    Some other things I made: FT Chip - RK4 Solar System

  6. #76
    Wire Sofaking feha's Avatar
    Join Date
    Sep 2009
    Location
    Here
    Posts
    1,156

    Default Re: Short quaternions guide

    Is there any way to calculate exactly what constants is needed? I have trouble making it accurate enoguh to hit a popcan (not moving) with 100% accuracy over the whole map.

  7. #77
    Wire Sofaking Fizyk's Avatar
    Join Date
    Jun 2008
    Location
    Łomianki, Poland
    Posts
    740
    Blog Entries
    1

    Default Re: Short quaternions guide

    There are some ways to do that, but they are pretty complicated. Also, in most cases it will spazz out before the constants are enough to hit the popcan across the map. What you need is probably adding the I term to the code - if your turret is mounted to something, the mass center of the contraption is slightly off and it makes the turret aim a bit down; the I term can correct that (see my PID tutorial for details, I hope it will help).

    My programs: BIOS - Alcyone - Calculator - Notepad - Movie Player
    My tutorials: applyTorque - Quaternions - PID controllers
    Some other things I made: FT Chip - RK4 Solar System

  8. #78
    Wire Sofaking feha's Avatar
    Join Date
    Sep 2009
    Location
    Here
    Posts
    1,156

    Default Re: Short quaternions guide

    The thing is parented, and it is not that it aims slightly below my target, but it shakes a little (the sattelite is orbiting a planet probably the reason), which from shakuras to ninurta (planets in opposite corners) results in the hit pos being around 10 units in all directions from the actualy target position.

  9. #79
    Wire Sofaking Fizyk's Avatar
    Join Date
    Jun 2008
    Location
    Łomianki, Poland
    Posts
    740
    Blog Entries
    1

    Default Re: Short quaternions guide

    Sounds like you have too high proportional coefficient, and/or too low derivative coefficient. Try increasing the first and decreasing the second.

    My programs: BIOS - Alcyone - Calculator - Notepad - Movie Player
    My tutorials: applyTorque - Quaternions - PID controllers
    Some other things I made: FT Chip - RK4 Solar System

  10. #80
    Wire Noob Mendax's Avatar
    Join Date
    Aug 2010
    Posts
    3

    Default Re: Short quaternions guide

    wow, this guide helped alot. thanks.

+ Reply to Thread
Page 8 of 9 FirstFirst ... 6789 LastLast

LinkBacks (?)

  1. 07-13-2010, 08:38 AM

Similar Threads

  1. [REQ] E2 Quaternions Tutorial
    By rich_27 in forum Expression 2 Discussion & Help
    Replies: 3
    Last Post: 08-25-2009, 10:15 AM
  2. 2.5 Years in Short
    By KillerBlonde in forum Off-Topic
    Replies: 9
    Last Post: 07-12-2008, 03:19 AM
  3. Quaternions?
    By Syranide in forum Wiremod General Chat
    Replies: 4
    Last Post: 02-09-2008, 06:09 AM
  4. PLZ Help its an e-z and short Question
    By eligray in forum Installation and Malfunctions Support
    Replies: 1
    Last Post: 08-21-2007, 11:00 AM
  5. Short Range Radio
    By Razara in forum Ideas & Suggestions
    Replies: 6
    Last Post: 04-07-2007, 01:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots