Question: How to define a new name in proc where I need to the output stops when it found the periodic points?

Hi! PLEASE HELP ME.. I try to give a new name in my proc where it stops at the initial condition, ic. Somehow it gave me an output like

>Orbit:=proc(Map,ic,Nit)
local orbit,z,t:
orbit:=array(0..Nit);
z:=ic:
orbit[0]:=z;
for t to Nit (while z<>ic) ot t=1 do
orbit[t]:=z;
z:=Map(z):
orbit[t]:=z:od;
return[seq(orbit[t],t=0..Nit)];
end;

>Orbit (F,[1,0],20);
##

##I want to eliminate the orbit13 and so on. I tried to give a new name where for example per:=array(0..t). I want it stops at t and do not go until Nit. Can you help me?

Please Wait...