function [ C ] = triangulo_versao1(N)

C(N) = 0;
% C = zeros(N,1);
C(1) = rand + 1i*rand;
for i=1:(N-1)
    regra = rand;
    if regra<1/3
        C(i+1) = C(i)/2;
    elseif regra<2/3
        C(i+1) = C(i)/2 + 1;
    else
        C(i+1) = C(i)/2 + 0.5 + 1i;
    end
end
