Creation of a 4D number system without coordinates
  Confugure: "Arial Unicode MS" 16
The "qabc" (quaternion abc)
 qabc=.81
3$'o̥ḀB̥C̥D̥E̥F̥G̥H̥I̥J̥K̥L̥M̥N̥O̥P̥Q̥R̥S̥T̥U̥V̥W̥X̥Y̥Z̥o̟A̟B̟C̟D̟E̟F̟G̟H̟I̟J̟K̟L̟M̟N̟O̟P̟Q̟R̟S̟T̟U̟V̟W̟X̟Y̟Z̟o̠A̠B̠C̠D̠E̠F̠G̠H̠I̠J̠K̠L̠M̠N̠O̠P̠Q̠R̠S̠T̠U̠V̠W̠X̠Y̠Z̠
'
  #qabc
81

  d=:3 :'q,"1 y,"1 q=.39{a.'    NB. display of quaternion

    AfC=: 3 : 0   NB. conversion to "alfa system" from "coordinate form"
A=.4 0$0
while.+./0~:y do.y=.3%~y-j-3*j=2[A=.A,.~|.j=.3|y end.
qabc{~3#.|:A
)
                       NB. conversion to "coordinate form" from "alfa
system"
   CfA=:3 :'3#.|.|:j-3*2=j=.3 3 3 3#:qabc i.y$~3,~3%~#y'

NB. Example no.1
    d A1=:,AfC 2 3 8 2
'I̥D̟T̠'
    CfA 'I̥D̟T̠'
2 3 8 2

NB. Example no.2
   d A2=:,AfC _28 12 _6 11
'B̥U̟L̟B̠'
     CfA 'B̥U̟L̟B̠'
_28 12 _6 11

NB. Example no.3
   d A3=:,AfC 163 _89 _89 237
'A̟Z̥o̥X̠o̟M̥'
   CfA 'A̟Z̥o̥X̠o̟M̥'
163 _89 _89 237

NB. Examles with single unicode
    CfA 0{qabc
0 0 0 0
    CfA 1{qabc
1 0 0 0
    CfA 2{qabc
_1 0 0 0
    CfA 78{qabc
0 _1 _1 _1
    CfA 79{qabc
1 _1 _1 _1
    CfA 80{qabc
_1 _1 _1 _1


   qlist=:3 : 0   NB. display of the complete qabc
qList=:0 4$0
for_i.i.81 do.qList=:qList,CfA i{y end.
y,.'=',.3j0":qList
)
   qlist qabc        NB. equal or assignment virtually?
o̥=  0  0  0  0      NB. This is an isomorphism between digits
Ḁ=  1  0  0  0      NB. of two 4D vectorial number systems.
B̥= _1  0  0  0     NB. The first (left side) - without coordinates,
C̥=  0  1  0  0      NB. the second (right side) - with ones.
D̥=  1  1  0  0      NB. Both of them have basis(radix) = 3
E̥= _1  1  0  0     NB.  and the _1 is displaised with  2  just as
F̥=  0 _1  0  0     NB.  at the wellknown balanced ternary system.
G̥=  1 _1  0  0     NB. The four coordinates: x  y  z  s,
H̥= _1 _1  0  0    NB.  where the first three are the vector part
I̥=  0  0  1  0       NB.  and the last is the scalar part of the
quaternion.
J̥=  1  0  1  0
K̥= _1  0  1  0
L̥=  0  1  1  0
M̥=  1  1  1  0
N̥= _1  1  1  0
O̥=  0 _1  1  0
P̥=  1 _1  1  0
Q̥= _1 _1  1  0
R̥=  0  0 _1  0
S̥=  1  0 _1  0
T̥= _1  0 _1  0
U̥=  0  1 _1  0
V̥=  1  1 _1  0
W̥= _1  1 _1  0
X̥=  0 _1 _1  0
Y̥=  1 _1 _1  0
Z̥= _1 _1 _1  0
o̟=  0  0  0  1
A̟=  1  0  0  1
B̟= _1  0  0  1
C̟=  0  1  0  1
D̟=  1  1  0  1
E̟= _1  1  0  1
F̟=  0 _1  0  1
G̟=  1 _1  0  1
H̟= _1 _1  0  1
I̟=  0  0  1  1
J̟=  1  0  1  1
K̟= _1  0  1  1
L̟=  0  1  1  1
M̟=  1  1  1  1
N̟= _1  1  1  1
O̟=  0 _1  1  1
P̟=  1 _1  1  1
Q̟= _1 _1  1  1
R̟=  0  0 _1  1
S̟=  1  0 _1  1
T̟= _1  0 _1  1
U̟=  0  1 _1  1
V̟=  1  1 _1  1
W̟= _1  1 _1  1
X̟=  0 _1 _1  1
Y̟=  1 _1 _1  1
Z̟= _1 _1 _1  1
o̠=  0  0  0 _1
A̠=  1  0  0 _1
B̠= _1  0  0 _1
C̠=  0  1  0 _1
D̠=  1  1  0 _1
E̠= _1  1  0 _1
F̠=  0 _1  0 _1
G̠=  1 _1  0 _1
H̠= _1 _1  0 _1
I̠=  0  0  1 _1
J̠=  1  0  1 _1
K̠= _1  0  1 _1
L̠=  0  1  1 _1
M̠=  1  1  1 _1
N̠= _1  1  1 _1
O̠=  0 _1  1 _1
P̠=  1 _1  1 _1
Q̠= _1 _1  1 _1
R̠=  0  0 _1 _1
S̠=  1  0 _1 _1
T̠= _1  0 _1 _1
U̠=  0  1 _1 _1
V̠=  1  1 _1 _1
W̠= _1  1 _1 _1
X̠=  0 _1 _1 _1
Y̠=  1 _1 _1 _1
Z̠= _1 _1 _1 _1

to be continued, feedback welcome

   Istvan Kadar
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to