function acrobot_animate(t_ode,X_ode,isLF_list)
 
% function acrobot_animate(t_ode,X_ode,isLF_list)
%
% Animates motion of a compass gait downhill.
% Dimensions of inputs match the format of output
% from "ode45".
% Inputs:
%   t_ode : Nx1 list of time
%   x_ode : Nx4 list of states (over time)
%   isLF_list : Nx1 binary (0 or 1) list, which
%               just sets colors of legs
%
% Katie Byl, 1/19/2010. ECE594D, Winter 2010. (UCSB)

dt = .05;
tlist = min(t_ode):dt:max(t_ode);
Xlist = zeros(4,length(tlist));
for i=1:4
    Xlist(i,:) = interp1(t_ode,X_ode(:,i),tlist);
end
isLF = interp1(t_ode,isLF_list,tlist);
for n=1:length(tlist)
    cg_draw(Xlist(:,n),isLF(n)); drawnow; pause(dt*.5);
end
cg_draw(X_ode(end,:)',isLF_list(end)); drawnow % be sure to show last position!
