BeginPackage["nucstruc`","nuclcoor`"] nucstruc::usage:= "The nucstruc[s,a,z] displays nuclear structure in terms of layers, wrappers, envelopes, scrolls and sheets of the layer model of the nucleus. The layers, wrappers, envelopes, scrolls and sheets describe locations with the same values of quantum numbers : iso-spin, spin, main, orbital and magnetic respectively in quantum description of the nucleus. To display the structure type in as the first argument s the \"layers\", \"wrappers\", \"envelopes\", \"scrolls\" or \"sheets\", as the second argument a - the mass number, and as the third argument z - the atomic number.\nCurrently, the data comprise the following nuclei: He-4, O-16, Ne-20, Ar-40, Ca-40, Fe-56, Se-80, Sn-120, Ce-140, Pb-208, U-238 and Uk-332, an unknown the most stable superheavy nucleus with the atomic number 122." Begin["`private`"] nucstruc/: nucstruc[s_,a_,z_]:=(i=1;j=1;k=1;n=nc[a,z];p=pc[a,z]; Which[Length[p]!=z||Length[n]!=a-z,Return[Message[nucstruc::usage]], s=="layers", While[i+j<=a,If[n[[i,3]]{Which[ s=="layers", {bs[3,{17.5,-10.8}],Text["n",Scaled[{0.98,0.1}],{1,0}], bs[6,{17.5,-7.75}],Text["p",Scaled[{0.98,0.215}],{1,0}]}, s=="wrappers",{bs[2,{17.5,-10.8}],Text["d",Scaled[{0.98,0.1}],{1,0}], bs[5,{17.5,-7.75}],Text["u",Scaled[{0.98,0.215}],{1,0}]}, True, {Table[{cs[h,{17.5,3.05*h-10.8}], Text[h,Scaled[{0.98,0.115*h+0.1}],{1,0}]},{h,0,7}], Table[{cs[h,{-17.5,3.05*(h-8)-10.8}], Text[h,Scaled[{0.04,0.115*(h-8)+0.1}],{1,0}]},{h,8,15}]}]}]) bs/: bs[g_,c_]:=Table[{GrayLevel[g m/24], PointSize[0.0655*Sqrt[1-(m/5)^2]], Point[Scaled[{0.0231*c[[1]]+0.5,0.0374*c[[2]]+0.5}]]},{m,0,4}] cs/: cs[h_,c_]:=Table[{Hue[2/3-h/12,1,m/4], PointSize[0.0655*Sqrt[1-(m/5)^2]], Point[Scaled[{0.0231*c[[1]]+0.5,0.0374*c[[2]]+0.5}]]},{m,0,4}] t/: t[y_,z_]:=(EvenQ[(y-1)/2]&&(EvenQ[(z-1)/4]||EvenQ[(z+1)/4]) ||OddQ[(y-1)/2]&& (OddQ[(z-1)/4]|| OddQ[(z+1)/4])) End[] EndPackage[]