re my proto-script posted earlier, copied below, rank 1 seems ok for outer
product of “vectors” of Cayley-Dickson construction representations, held as
2-column tables:
(Sorry - this looks awful in iPad draft, but might be ok on desk/ and lap/tops)
$(1j2 3j4, 5j6 7j8,: 9j10 11j12) qmult/5j6 7j8,9j10 11j12, 13j14 15j16,:
17j18 19j20
3 4 2
<"2(1j2 3j4,5j6 7j8,:9j10 11j12)qmult/5j6 7j8,9j10 11j12,13j14 15j16,:17j18
19j20
+--------------+----------------+----------------+
| _60j12 30j24| _124j60 70j80|_188j108 110j136|
| _92j20 54j40|_188j100 126j128|_284j180 198j216|
|_124j28 78j56|_252j140 182j176|_380j252 286j296|
|_156j36 102j72|_316j180 238j224|_476j324 374j376|
+--------------+----------------+----------------+
$(1j2 3j4,5j6 7j8,:9j10 11j12)qmult/5j6 7j8,9j10 11j12,13j14 15j16,:17j18
19j20
3 4 2
Mike
Sent from my iPad
> On 2 Nov 2018, at 10:11, 'Mike Day' via Chat <[email protected]> wrote:
>
> fwiw, I wrote a few Mickey-Mouse verbs yesterday while waiting for my
> virus-checker
> to go through its paces. Mainly to get my head round the Cayley-Dickson
> complex duple
> representations. Here's a proto-script below my sign-off; for starters, I've
> assumed
> 2-column arrays, but rank 1 might not be the way to go (?) - I haven't got
> into
> arrays of quaternions yet!
>
> Mike
>
> Apologies for any line-wrapping - it looks ok this end!
> =======================================================================================
> NB. Cayley-Dickson construction
>
> NB. based on entries in
> NB. https://en.wikipedia.org/wiki/Quaternion
> NB. and
> NB. https://en.wikipedia.org/wiki/Cayley-Dickson_construction
>
> NB. Quaternion quadruple (a b c d) with a,b,c,d e. ℝ is stored as a complex
> duple ajb cjd e. ℂ2
>
> NB. conjugate of complex duple q = (a,b) is q* = (a*, -b) where * is complex
> conjugate
>
> NB. Addition (a,b) + (c,d) = (a+b, c+d) ... so dyad + works without
> needing modification
>
> NB. Multiplication (a,b) * (c,d) = (ac-b.d*, ad+b.c*), where * is comp conj
> NB. = (a,b) +/ . * (c d*)
> NB. (d c*) <== 2x2 complex matrix
>
> NB. Magnitude
> NB. magnitude squared of (a,b), ||(a,b)||^2 = |a|^2 + |b|^2 e. ℝ where
> |a| is magnitude of complex a
>
> NB. Reciprocal (a,b)^_1 = (a*, -b)% ||(a,b)||^2
>
> NB. Norm
> NB. (magnitude, 0) e. ℝ2 e. ℂ2 - not sure why it needs to be a
> quaternion!?
>
> NB. complex verbs
> cconj =: +
> cnormsq =: *+
> cnorm =: %: @ cnormsq
>
> NB. Quaternion verbs
> qconj =: ((cconj@[,-@])/)"1 NB. conjugate of (a,b)
> qmult =: (+/ . * (,:_1 1 * |. @: cconj))"1 NB. multiply (a,b)*(c,d)
> qmagsq =: (+/ @: cnormsq)"1 NB. Magnitude squared
> qmag =: %: @ qmagsq NB. Magnitude
> qnorm =: (0,~ qmag)"1 NB. Norm
> qscalar=: (-: @ (+ qconj))"1 NB. "Scalar" part
> qvector=: (-: @ (- qconj))"1 NB. "Vector" part
> qrecip =: ((cconj@[, -@])/ % qmagsq)"1 NB. Reciprocal
> qdivl =: qmult qrecip NB. via left quotient -
> cribbed from Zhuravlov
> qdivr =: qmult~qrecip NB. via right quotient -
> cribbed from Zhuravlov
>
> NB. 1j2 3j4 qmult 5j6 7j8
> NB. _60j12 30j24
> NB.
> NB. _60j12 30j24 qdivl 5j6 7j8
> NB. 1j2 3j4
> NB.
> NB. _60j12 30j24 qdivr 1j2 3j4
> NB. 5j6 7j8
>
>> On 01/11/2018 19:38, Raul Miller wrote:
>> Rotations can be dizzying to think about, so this sort of issue is
>> maybe best visited casually over a period of time rather than jammed
>> into an intensive study session.
>>
>> That said, the wikipedia page on Gimbal Lock can help motivate an
>> understanding of why a person might want to use quaternions to
>> represent rotation in three dimensions.
>>
>> Thanks,
>>
>
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm