Small Satellites

Home » Posts tagged 'Swirl'

Tag Archives: Swirl

Advertisements

Swirl,Matlab Code

 

clc; clear all; close all;
x = -20:0.1:20;
sz = size(x);
ind = 0;
b = 6
for n = 1:15 %
for i = 1:sz(2)
    for j = 1:sz(2)
        sw(i,j) = sin(b*cos(sqrt(x(i)^2+x(j)^2))-n*atan2(x(i),x(j)));
    end
end
ind = ind +1;
fig = figure('Position',[0 0 800 800]);
hold on;
imagesc(sw);
colormap bone;
axis off;
set(fig, 'color', [0 0 0]);
set(gcf, 'InvertHardCopy', 'off');
hold off;
%print(fig,['Sw',num2str(ind)],'-djpeg  ','-r300');
close all;
end

Advertisements
%d bloggers like this: