addpath dados
addpath PassosTipo
addpath PassosTipo/AngulosTipo

[manip_B,manip_C,manip_D,manip_E,Angulos,mi,cmassa,RefPeD,RefPeE,Pe,Binarios]=Inicializacao;% Inicializaçao de constantes (e variaveis)
mov = avifile('testes.avi');                                                                % cria um video para gravar a animacao
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



[Angulos,RefPeD,RefPeE,mov]=SimPasso1(manip_B,manip_C,manip_D,manip_E,Angulos,mi,cmassa,RefPeD,RefPeE,Pe,mov);

[Angulos,RefPeD,RefPeE,mov]=SimPasso2(manip_B,manip_C,manip_D,manip_E,Angulos,mi,cmassa,RefPeD,RefPeE,Pe,mov);
[Angulos,RefPeD,RefPeE,mov]=SimPasso3(manip_B,manip_C,manip_D,manip_E,Angulos,mi,cmassa,RefPeD,RefPeE,Pe,mov);
[Angulos,RefPeD,RefPeE,mov]=SimPasso2(manip_B,manip_C,manip_D,manip_E,Angulos,mi,cmassa,RefPeD,RefPeE,Pe,mov);
[Angulos,RefPeD,RefPeE,mov]=SimPasso3(manip_B,manip_C,manip_D,manip_E,Angulos,mi,cmassa,RefPeD,RefPeE,Pe,mov);
[Angulos,RefPeD,RefPeE,mov]=SimPasso2(manip_B,manip_C,manip_D,manip_E,Angulos,mi,cmassa,RefPeD,RefPeE,Pe,mov);
[Angulos,RefPeD,RefPeE,mov]=SimPasso3(manip_B,manip_C,manip_D,manip_E,Angulos,mi,cmassa,RefPeD,RefPeE,Pe,mov);

[Angulos,RefPeD,RefPeE,mov]=SimPasso4(manip_B,manip_C,manip_D,manip_E,Angulos,mi,cmassa,RefPeD,RefPeE,Pe,mov);



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
mov = close(mov);                                                                           % fecha o video