function MQi=bola(D,rot_placa,MQi,DHt_final,LB,LC,LD,N)
t=linspace(0,2*pi,N+1);
x=(D/2)*cos(t);
y=(D/2)*sin(t);
z=zeros(1,size(t,2));

coordenadas_origem=[x;y;z];
coord_h=[coordenadas_origem;ones(1,size(coordenadas_origem,2))];
coordenadas_sitio=rot_placa*coord_h;
bola=coordenadas_sitio(1:3,:);


dr=[];
dq=[];
allQ=[];

for n=1:N
    dr(:,n)=bola(:,n+1)-bola(:,n);
end

Qinc=MQi(1:3,end);
for m=1:N
    Ji=jacobianoRRR(Qinc,LB,LC+LD);
    dq=[dq Ji\dr(:,m)];
    Qinc=Qinc+dq(:,m);
    [t4 t5]=angulos_punho(Qinc(1:3),DHt_final,rot_placa);
    Qsoma=Qinc;
    Qsoma(4,1)=t4;
    Qsoma(5,1)=t5;
    MQi=[MQi Qsoma];
    
end


end