Matlab으로 fcc 3d frame 만들기
% Define the parameters n = 100; % number of atoms a = 0.5; % lattice parameter L = ceil(n^(1/3))*a; % total size of the cubic frame % Generate the FCC lattice points [x,y,z] = meshgrid(0:a:L-a); xyz = [x(:) y(:) z(:)]; xyz_odd = xyz(mod(sum(floor(bsxfun(@rdivide, xyz, a)), 2), 2) == 1,:); xyz_even = xyz(mod(sum(floor(bsxfun(@rdivide, xyz, a)), 2), 2) == 0,:); FCC_points = [xyz_odd; xyz_even]; %..
2023. 2. 25.