Delta={{Sqrt[2],0},{1/Sqrt[2],1/Sqrt[2]},{0,Sqrt[2]},{-1/Sqrt[2],1/Sqrt[2]}};

Aj[L_]:={{L,0},{0,L}};

Cond[theta_,k_,j_,f_,n_]:=Mod[FullSimplify[f*(-Sin[theta]*Delta[[k,1]]+Cos[theta]*Delta[[k,2]])*(Aj[Sqrt[2]*n][[j,1]]*Cos[theta]+Aj[Sqrt[2]*n][[j,2]]*Sin[theta]+(Cos[theta]*Delta[[k,1]]+Sin[theta]*Delta[[k,2]])/2.)],1]==0;

Cond2[theta_,k_,j_,f_,n_]:=Chop[N[f*(-Sin[theta]*Delta[[k,1]]+Cos[theta]*Delta[[k,2]])*(Aj[Sqrt[2]*n][[j,1]]*Cos[theta]+Aj[Sqrt[2]*n][[j,2]]*Sin[theta]+(Cos[theta]*Delta[[k,1]]+Sin[theta]*Delta[[k,2]])/2.)]-Round[N[f*(-Sin[theta]*Delta[[k,1]]+Cos[theta]*Delta[[k,2]])*(Aj[Sqrt[2]*n][[j,1]]*Cos[theta]+Aj[Sqrt[2]*n][[j,2]]*Sin[theta]+(Cos[theta]*Delta[[k,1]]+Sin[theta]*Delta[[k,2]])/2.)]]]==0;

Table[FullSimplify[f*(-Sin[theta]*Delta[[k,1]]+Cos[theta]*Delta[[k,2]])*(Aj[Sqrt[2]*n][[j,1]]*Cos[theta]+Aj[Sqrt[2]*n][[j,2]]*Sin[theta]+(Cos[theta]*Delta[[k,1]]+Sin[theta]*Delta[[k,2]])/2.)],{k,1,4},{j,1,2}]

Table[Mod[FullSimplify[4*(-Sin[0]*Delta[[k,1]]+Cos[0]*Delta[[k,2]])*(Aj[Sqrt[2]*29][[j,1]]*Cos[0]+Aj[Sqrt[2]*29][[j,2]]*Sin[0]+(Cos[0]*Delta[[k,1]]+Sin[0]*Delta[[k,2]])/2.)],1],{k,1,8},{j,1,2}]

1

Mod[FullSimplify[aa],1]

(* Test pour theta = 0, L = 29*Sqrt[2] *)

Test[theta_,f_,L_]:=Module[{res},res=True;Do[res=res&&Cond[theta,k,j,f,L],{k,1,8},{j,1,2}];res];

Test2[theta_,f_,L_]:=Module[{res},res=True;Do[res=res&&Cond2[theta,k,j,f,L],{k,1,8},{j,1,2}];res];

Test2[0,4,29]

Valfth2[nth_,m_,n_]:=Reap[Do[If [Test2[2*Pi*k/nth,j/m,n],Sow[{2*Pi*k/nth,j/m}]],{k,0,nth},{j,0,10*m}]];

Valf2[4,1,28]

Test2[(π/2),0,28]

Valf[theta_,m_,d_,n_]:=Reap[Do[If [Test2[theta,j/d,n],Sow[{theta,j/d}]],{j,0,d*m}]];

Valf[0,100,200,28]