function H=DrawFrames(AA,P,c)

H(1)=fill3(P(1,:),P(2,:),P(3,:),c(1));
A=eye(4);

for n=(1:size(AA,3))
    A=A*AA(:,:,n);
    Pn=A*P;
    H(n+1)=fill3(Pn(1,:),Pn(2,:),Pn(3,:),c(n+1));
end