Question: Howto make my double loop not overwrite my initial conditions

Howto make all points start from [0,0] and goto [1,0] 
and make my loop not overwrite my initial conditions for the next steps?

M:=10; N:=1000;

for i to M do
X[i, 0] := 0;
Y[i, 0] := 0;
X[i, 1] := 1;
Y[i, 1] := 0;
for j to N do
Vinkel := c*rand()-Pi;
X[i, j] := X[i, j-1]+cos(Vinkel);
Y[i, j]:= Y[i, j-1]+sin(Vinkel)
end do:
end do :

 

 

 

Please Wait...