function [ X ] = SpiralWAccelerated(Spiral)
% ĵ x0
% ʼ뾶 r.
% תٶ w
% תǼٶ a
% ʼݾ L
% ݾٶ V
% ݾٶ A
% ۲ʱ T
% TStartΪʼʱ
% TEndΪֹʱ
X0=Spiral.X0;r=Spiral.r;w=Spiral.w;a=Spiral.a;
L=Spiral.L;V=Spiral.V;A=Spiral.A;T=Spiral.T;
TStart=Spiral.TStart;TEnd=Spiral.TEnd;alpha=Spiral.Alpha;
if r==0&&L==0
    X=X0.*ones(max(size(TStart+T:T:TEnd)),2);
   return; 
end
b=0;B=0;
c=0;C=0;
number=(TEnd-TStart)/T;
for k=1:1:number+1
    t=(k-1)*T;
    %% ٶʱĹϵʽ
    aa(k)=a+b*t+c*t^2;  % תٶ
    AA(k)=A+B*t+C*t^2;  % ݾٶ
    %----------------------%
end
Angle(1)=alpha;
S(1)=L;
j=0;
for i=1:1:number
    angle=(w*T+1/2*(aa(i+1)+aa(i))/2*T^2);
    s=V*T+1/2*(AA(i+1)+AA(i))/2*T^2;
    w=w+(aa(i+1)+aa(i))/2*T;
    AC=V+(AA(i+1)+AA(i))/2*T;
    Angle(i+1)=Angle(i)+angle;
    S(i+1)=S(i)+s;
    j=j+1;
    theta(j)=Angle(i+1);
    R(j)=r+S(i+1)*theta(j)/2/pi;
end
[x,y]=pol2cart(theta, R); %תΪѿ
x=x+X0(1,1);
y=y+X0(1,2);
X = [x' y'];
end

