Author Topic: Working with vectors in NWN.  (Read 1056 times)

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
Working with vectors in NWN.
« Reply #15 on: January 04, 2015, 11:36:17 am »


               
I still do not understand what you are presenting here. I will therefore go back to basics as I understand them. This is merely to try to avoid any miscommunication. What we are talking about here are number systems. For this explanation I will deal only with three of them, starting at the simplest to the most complex. I (sorry if this caveat is getting boring by now) am not a mathematician and am presenting what I understand to be true. I may be wrong (in whole or in part) but what follows is what I believe to be true.

 

We’ll start right at the beginning with Real numbers. A real number is simply a number with a fractional part that is normally expressed as a decimal number. One thing to note is that the fractional part can be zero as in 7.0. In order to avoid any confusion, I will use the letter ‘r’ to denote when I am using a Real number as part of an example.

 

Complex numbers are numbers that have two parts. Both parts are Real numbers. Now this is where confusion can arise. The two parts have names. They are called the Real part and the imaginary part. It is my understanding that this arose because when they were first discovered the mathematicians of the day didn’t think that Complex numbers had any use in the real world. So they called the first part (the part that they knew had real world usage) Real and the part that they could see no use for (apart from calculating the square root of minus one) Imaginary. It turns out that in fact Complex numbers have many uses in fields such as engineering. These are the numbers that are manipulated in both the Julia and Mandelbrot sets to produce the classic fractal images. In the following notation I will use the letter ‘R’ to denote the real part and the letter ‘I’ to denote the imaginary part.

 

Complex Number C = C(Rr, Ir). What this says is that the complex number C consists of both a real part and an imaginary part. Both parts are Real Numbers which means that each part can be positive, negative or zero. Examples C(-1.4, 5.6), C(9.9, 0.0), C(0.0, -3.2). In order to avoid any confusion, I will use the letter ‘c’ to denote when I am using a Complex number as part of an example.

 

Quaternions are numbers that have four parts. Each part is a Real number. Again these parts are named. They are the Real part, the first imaginary part, the second imaginary part, the third imaginary part. Using standard notation these are normally written as r, i, j, k. For my illustrative notation I will use the letters ‘R’ for the real part, ‘I’ for the first imaginary part, ‘J’ for the second imaginary part and ‘K’ for the third imaginary part.

 

Quaternion Q = Q(Rr, Ir, Jr, Kr). What this says is that Quaternion Q consists of a real part and three imaginary parts. All parts are Real Numbers which means that each part can be positive, negative or zero.

 

There is a related number system, the numbers of which are called Biquaternions. Biquaternions are identical to Quaternions except that instead of each part being a Real number, they are instead Complex numbers. Or in my notation Biquaternion BQ = BQ(Rc, Ic, Jc, Kc).

 

Having explained the above I believe that you have either confused the Imaginary parts of Quaternions for Complex numbers or you are describing Biquaternions.

 

TR

               
               

               
            

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
Working with vectors in NWN.
« Reply #16 on: January 04, 2015, 08:20:36 pm »


               

I am not describing biquaternions.  The difference between the quaternion expression a + bi + cj + dk and the biquaternion expression a + bi + cj + dk is that for quaternions the values a,b,c, and d are real numbers, while for the biquaternions these numbers are complex numbers (adding in another pair of roots for -1).  To understand a quaternion lets first look at a complex number.  A complex number takes the form a + bi.  I can multiply two complex numbers together (a + bi) * (c + di) = e + fi by use of the distributive property of multiplication.  i and -i both have a square of -1, thus (1 + i) * (2 + i) = 1* 2 + 1* i + i * 2 + i * i = 2 + i + 2i - 1 = 1 + 3i.  Now let us say I had another complex field a + bj.  I would mathematically perform all operations for a + bj in the same way I would for a + bi.  Similarly I can create a third complex field a + bk.  A quaternion combines all three complex fields, establishing a relationship for multiplication that is ij = k, jk = i, and ki = j (this can be more simply stated as ijk = -1).  Thus a quaternion would be a + bi + cj + dk where a,b,c,d are real numbers.