Rem Project: Print array
Rem Created: Friday, January 10, 2014
Rem ***** Main Source File *****
dim convtoX(16,16)
dim convtoY(16,16)
dim convtoZ(16,16)
dim convtoU(17,17,17)
dim convtoV(17,17,17)
dim halffourfirst(16)
dim halffoursecond(16)
dim sixsplitfour(64)
dim sixmodulustwo(64)
rem (A/H*A/H)/O/H
for u=1 to 16
for t=1 to 16
convtoX(t,u)=((16.0*cos(90.0/16*u)/tan(90.0/16*t)))%%16+1
if convtoX(t,u)<0 then convtoX(t,u)=0
convtoY(t,u)=((16.0*cos(90.0/16*u)/tan(90.0/16*t)))%%16+1
rem convtoY(t,u)=((16.0/90*atan(cos(90.0/16*u)*(tan(90-(90.0/16*t))))))%%16+1
if convtoY(t,u)<0 then convtoY(t,u)=0
convtoZ(t,u)=u
if convtoY(t,u)<0 then convtoY(t,u)=convtoY(t,u)+16
if convtoZ(t,u)<0 then convtoZ(t,u)=convtoZ(t,u)+16
next t
rem error here
halffourfirst(u)=(floor(((u)/4)))+1
rem
halffoursecond(u)=(u+1)%%4
next u
for s=1 to 64
sixsplitfour(s)=s%%16
sixmodulustwo(s)=floor(s/16)
rem sixmodulustwo(s)=0
ERROR HERE: delete this when i set this to zero i get a previous value
if sixmodulustwo(s)<1 then sixmodulustwo(s)=sixmodulustwo(s)+4
next s
for u=1 to 16
for t=1 to 16
for s=1 to 16
rem if convtoX(i,j)=s and convtoY(i,j)=t and convtoZ(i,j)=u
ang=1
ansa=800
ansb=800
ansc=800
checkang=800
repeat
ansa=abs(convtoX(ang,16-s)-u)
ansb=abs(convtoY(ang,16-s)-t)
ansc=abs(convtoZ(ang,16-s)-s+16)
ang=ang+1
if ang>16
ang=finalang
goto finish
endif
if checxang<(ansa+ansb+anc)
finalang=ang
endif
checkang=ansa+ansb+anc
until ansa+ansb+anc=0
finish:
convtoV(s,t,u)=ang
rem float#=16.0/90*(acos(cos(90.0/16*s)/cos(90.0/16*u)))
rem convtoU(s,t,u)=abs(16.0/90*(asin((16.0*cos(90.0/16*s)/cos(90.0/16*convtoV(s,t,u))%%16/16))))%%16
convtoU(s,t,u)=16-u
rem z=16-u u=16-z s=x z=u
next s
next t
next u
rem 6,6-> (1-4byte table split) (union gpu 2tev)->4,4,4->ram(16kb table)->4,4
rem 6,6<-split middle(2 4byte table ram),(union gpu 2tev each)<-ram(2 1kb table)<-4,4
rem space 2 kb
remstart
1357
is even
is<8
<2 <4 <6
>12 >14 >15
remend
remstart
for a= 1 to 63
for b= 1 to 63
for i=1 to 15
for j=1 to 15
d=sixmodulustwo(a)
e=sixmodulustwo(b)
aa=sixsplitfour(a)
bb=sixsplitfour(b)
c=unionfour(d,e)
ccc=convtoV(aa,bb,c)
ddd=convtoU(aa,bb,c)
aa=i
bb=j
c=convtoZ(ccc,ddd)
d=halffourfirst(c)
e=halffoursecond(c)
q=unionsixa(aa,d)
r=unionsixb(bb,e)
if q=a and r=b
convtoX(ccc,ddd)=i
convtoY(ccc,ddd)=j
endif
next a
next b
next i
next j
remend
a=2
b=1
print a
print b
d=sixmodulustwo(a)
e=sixmodulustwo(b)
print d
print e
aa=sixsplitfour(a)
bb=sixsplitfour(b)
c=unionfour(d,e)
print c
ccc=convtoV(aa,bb,c)
ddd=convtoU(aa,bb,c)
print ddd
aa=convtoX(ccc,ddd)
bb=convtoY(ccc,ddd)
print aa
print bb
c=convtoZ(ccc,ddd)
print c
d=halffourfirst(c)
e=halffoursecond(c)
print d
print e
q=unionsixa(d,aa)
r=unionsixb(e,bb)
print q
print r
wait key
end
function unionsixa(a,b)
rem (4*a)
rem 4*tev1+1/4*b
rem 2 tev
ans=((4*a)+b)
endfunction ans
function unionsixb(a,b)
rem (4*a)
rem 4*tev1+1/4*b
rem 2 tev
ans=((4*a)+b)
endfunction ans
function unionfour(a,b)
rem 4*a+1/4*b
rem 1 tev
ans=(4*a+b)%%16
endfunction ans
XXX