0.8.22pre1

This commit is contained in:
MrZ_26
2020-05-23 00:05:04 +08:00
parent 486a64cca3
commit 725eb4e26f
9 changed files with 38 additions and 35 deletions

View File

@@ -4,7 +4,7 @@ local ZERO={[01]=Zero,[10]=Zero,[03]=Zero,[30]=Zero,[12]=Zero,[21]=Zero,[32]=Zer
local map={}
for x=-3,3 do map[x]={}for y=-3,3 do map[x][y]={x,y}end end
local function collect(T)
local function collect(T)--make all vec point to the same vec
if type(T)=="table"then
for _,T in next,T do
for k,vec in next,T do
@@ -14,11 +14,11 @@ local function collect(T)
end
end
local function sym(L)
local function C_sym(L)--use this if the block is centrosymmetry, *PTR!!!
L[23]=L[01]L[32]=L[10]
L[21]=L[03]L[12]=L[30]
end
local function flipList(O)
local function flipList(O)--use this to copy a symmetry list
if not O then return end
local L={}
for i=1,#O do
@@ -41,9 +41,7 @@ local function reflect(a,b)
b[13]=flipList(a[31])
end
local function pushZero(T)
local L
for i=1,#T do
L=T[i]
for _,L in next,T do
if type(L)=="table"then
for _,v in next,L do
table.insert(v,1,zero)
@@ -163,8 +161,8 @@ local TRS={
[10]={{ 1, 0},{ 0,-1},{-1,-1},{ 0,-2},{ 0,-3},{ 0, 3},{ 1,-2}},
[03]={{ 1, 0},{ 0,-3},{ 0, 1},{ 0, 2},{ 0, 3},{ 1, 2}},
[30]={{-1, 0},{ 0, 1},{ 0,-2},{ 0,-3},{ 0, 3},{-1,-2}},
},--5Z
{},--5S
},--Z5
{},--S5
{
[01]={{-1, 0},{-1, 1},{ 0,-2},{-1,-2},{-1,-1},{ 0, 1}},
[10]={{ 1, 0},{ 1,-1},{ 0, 2},{ 1, 2},{ 0,-1},{ 1, 1}},
@@ -208,7 +206,7 @@ local TRS={
[20]={{ 0,-1},{ 0, 1},{ 0,-2}},
[13]={{ 1, 0},{-1, 1},{-2, 0}},
[31]={{-1, 0},{ 1, 1},{ 2, 0}},
},--5T
},--T5
{
[01]={{-1, 0},{-1, 1},{ 0,-2},{-1,-1},{-1,-2}},
[10]={{ 1, 0},{ 1,-1}},
@@ -267,8 +265,8 @@ local TRS={
[20]={{ 0, 1},{-1, 1},{ 1, 0},{-2, 1},{ 0,-1}},
[13]={{-1, 0},{-1,-1},{ 0, 1},{-1,-2}},
[31]={{ 1, 0},{ 1, 1},{ 0,-1},{ 1, 2}},
},--5J
{},--5L
},--J5
{},--L5
{
[01]={{-1, 0},{-1, 1},{ 1, 0},{-1, 2},{-1,-1},{ 0,-3},{ 0, 1}},
[10]={{-1, 0},{ 1,-1},{-1, 0},{ 1,-2},{ 1, 1},{ 0, 3},{ 0, 1}},
@@ -276,8 +274,8 @@ local TRS={
[30]={{ 0, 1},{-1, 1},{ 1, 0},{-1,-1},{ 0, 2},{-1, 2},{ 0, 3},{-1, 3},{ 1,-1}},
[12]={{ 1, 0},{ 1,-1},{ 0,-1},{ 1,-2},{ 0,-2},{ 1, 1},{-1, 0},{ 0, 2},{ 1, 2}},
[21]={{-1, 0},{-1, 1},{ 0, 1},{-1, 2},{ 0, 2},{-1,-1},{ 1, 0},{ 0,-2},{-1,-2}},
[32]={{-1, 0},{-1, 1},{-1,-1},{ 0, 2},{-1, 2},{ 0,-2}},
[23]={{ 1, 0},{ 1,-1},{ 1, 1},{ 0,-2},{ 1,-2},{ 0, 2}},
[32]={{-1, 0},{-1, 1},{-1,-1},{ 1, 0},{ 0, 2},{-1, 2},{ 0,-2}},
[23]={{ 1, 0},{ 1,-1},{ 1, 1},{-1, 0},{ 0,-2},{ 1,-2},{ 0, 2}},
[02]={{ 0,-1},{ 1,-1},{-1, 0},{ 2,-1},{ 0, 1}},
[20]={{ 0, 1},{-1, 1},{ 1, 0},{-2, 1},{ 0,-1}},
[13]={{-1, 0},{-1,-1},{ 0, 1},{-1,-2}},
@@ -302,22 +300,25 @@ local TRS={
{
[01]={{ 1,-1},{ 1, 0},{ 1, 1},{ 0, 1},{-1, 1},{-1, 0},{-1,-1},{ 0,-1},{ 0,-2},{-2,-1},{-2,-2},{ 2, 0},{ 2,-1},{ 2,-2},{ 1, 2},{ 2, 2},{-1, 2},{-2, 2}},
[10]={{-1, 0},{-1,-1},{ 0,-1},{ 1,-1},{-2,-2},{-2,-1},{-2, 0},{-1,-2},{ 0,-2},{ 1,-2},{ 2,-2},{-1, 1},{-2, 1},{-2, 2},{ 1, 0},{ 2, 0},{ 2,-1},{ 0, 1},{ 1,-1},{ 2,-2}},
},--5I
[03]={{-1,-1},{-1, 0},{-1, 1},{-0, 1},{ 1, 1},{ 1, 0},{ 1,-1},{-0,-1},{-0,-2},{ 2,-1},{ 2,-2},{-2, 0},{-2,-1},{-2,-2},{-1, 2},{-2, 2},{ 1, 2},{ 2, 2}},
[30]={{ 1, 0},{ 1,-1},{-0,-1},{-1,-1},{ 2,-2},{ 2,-1},{ 2, 0},{ 1,-2},{-0,-2},{-1,-2},{-2,-2},{ 1, 1},{ 2, 1},{ 2, 2},{-1, 0},{-2, 0},{-2,-1},{ 0, 1},{-1,-1},{-2,-2}},
},--I5
}
TRS[25][03]=flipList(TRS[25][01])
TRS[25][30]=flipList(TRS[25][10])
sym(TRS[8])sym(TRS[9])sym(TRS[25])
reflect(TRS[1],TRS[2])--SZ
reflect(TRS[3],TRS[4])--LJ
reflect(TRS[8],TRS[9])--5S5Z
reflect(TRS[8],TRS[9])--S5Z5
reflect(TRS[10],TRS[11])--PQ
reflect(TRS[12],TRS[13])--FE
reflect(TRS[19],TRS[20])--5L5J
reflect(TRS[19],TRS[20])--L5J5
reflect(TRS[21],TRS[22])--RY
reflect(TRS[23],TRS[24])--HN
for i=1,25 do collect(TRS[i])end
pushZero(TRS)
C_sym(TRS[8])
C_sym(TRS[9])
C_sym(TRS[25])
for i=1,25 do collect(TRS[i])end
local AIRS={
{
[01]={{-1,0},{-1, 1},{ 0,-2},{-1,-2}},
@@ -332,8 +333,8 @@ local AIRS={
false,
false,
false,
function()end,
false,
function()end,
{
[01]={{-2, 0},{ 1, 0},{-2,-1},{ 1, 2}},
[10]={{ 2, 0},{-1, 0},{ 2, 1},{-1,-2}},
@@ -346,9 +347,9 @@ local AIRS={
}
}
collect(AIRS[1])collect(AIRS[7])
pushZero(AIRS)
for i=2,5 do AIRS[i]=AIRS[1]end
for i=8,25 do AIRS[i]=AIRS[1]end
pushZero(AIRS)
local NONE={}
for i=1,25 do NONE[i]=ZERO end