% My twinkling constellation

close all
figure
axis equal off
hold on
DrawRect(-.1, -.1, 1.2, 1.2, 'k')

rounds= 30;       % no. of simulation rounds
n= 9;             % number of stars in my random constellation

x= rand(1,n);
y= rand(1,n);

for r= 1:rounds
    % Do a round of twinkling
    for k= 1:n
        if rand>.5
            DrawStar(x(k),y(k),.1,'y')
        else
            DrawStar(x(k),y(k),.1,'k')
        end
    end
    pause(.2)
end

hold off