@Spiral-1(Definition)
--track0:Axis,0,2,2
--track1:Facing,0,2,1
--track2:IniRadius,0,10000,100
--track3:dRadius,-100,100,0
--param:zoom=0;alpha=0;
rasen_jiku=math.floor(obj.track0)
rasen_dir=math.floor(obj.track1)
rasen_r=obj.track2
rasen_dr=obj.track3


@Spiral-2(Render)
--track0:Count,0,300,10
--track1:dSpin,-360,360,10
--track2:Shift,-1000,1000,10
--track3:Spin,-3600,3600,0
--check0:Sync with spin and move along axis,0
n=math.floor(obj.track0)
drot = obj.track1
dpos = obj.track2
rot = obj.track3
if(rasen_jiku==0) then
  for i=0,n-1 do
    if(obj.check0 and (drot~=0)) then
      x = dpos*i + (dpos/drot)*rot
    else
      x = dpos*i
    end
    y = (rasen_r + rasen_dr*i) * math.sin((rot + drot*i)*math.pi/180)
    z = - (rasen_r + rasen_dr*i) * math.cos((rot + drot*i)*math.pi/180)
    dir_rot = 0
    if(rasen_dir==1) then
      dir_rot = rot + drot*i
    elseif(rasen_dir==2) then
      dir_rot = rot + drot*i + 180
    end
    obj.draw(x,y,z,obj.zoom+zoom/100*i,obj.alpha+alpha/100*i,dir_rot,0,0)
  end
elseif(rasen_jiku==1) then
  for i=0,n-1 do
    x = - (rasen_r + rasen_dr*i) * math.sin((rot + drot*i)*math.pi/180)
    if(obj.check0 and (drot~=0)) then
      y = dpos*i + (dpos/drot)*rot
    else
      y = dpos*i
    end
    z = - (rasen_r + rasen_dr*i) * math.cos((rot + drot*i)*math.pi/180)
    dir_rot = 0
    if(rasen_dir==1) then
      dir_rot = rot + drot*i
    elseif(rasen_dir==2) then
      dir_rot = rot + drot*i + 180
    end
    obj.draw(x,y,z,obj.zoom+zoom/100*i,obj.alpha+alpha/100*i,0,dir_rot,0)
  end
else
  for i=0,n-1 do
    x = (rasen_r + rasen_dr*i) * math.cos((-90 +rot + drot*i)*math.pi/180)
    y = (rasen_r + rasen_dr*i) * math.sin((-90 + rot + drot*i)*math.pi/180)
    if(obj.check0 and (drot~=0)) then
      z = dpos*i + (dpos/drot)*rot
    else
      z = dpos*i
    end
    dir_rot = 0
    if(rasen_dir==1) then
      dir_rot = rot + drot*i
    elseif(rasen_dir==2) then
      dir_rot = rot + drot*i + 180
    end
    obj.draw(x,y,z,obj.zoom+zoom/100*i,obj.alpha+alpha/100*i,0,0,dir_rot)
  end
end


@TASpiral-1(Definition)
--track0:Axis,0,2,2
--track1:Facing,0,2,1
--track2:IniRadius,0,10000,100
--track3:dRadius,-100,100,0
--param:zoom=0;alpha=0;
tar_jiku=math.floor(obj.track0)
tar_dir=math.floor(obj.track1)
tar_r=obj.track2
tar_dr=obj.track3


@TASpiral-2(Render)
--track0:dSpin,-360,360,10
--track1:Shift,-1000,1000,10
--track2:Spin,-3600,3600,0
--check0:Sync with spin and move along axis,0
drot = obj.track0
dpos = obj.track1
rot = obj.track2
obj.zoom=obj.zoom+zoom/100*obj.index
obj.alpha=obj.alpha+alpha/100*obj.index
if(tar_jiku==0) then
    if(obj.check0 and (drot~=0)) then
      obj.ox = dpos*obj.index + (dpos/drot)*rot
    else
      obj.ox = dpos*obj.index
    end
    obj.oy = (tar_r + tar_dr*obj.index) * math.sin((rot + drot*obj.index)*math.pi/180)
    obj.oz = - (tar_r + tar_dr*obj.index) * math.cos((rot + drot*obj.index)*math.pi/180)
    if(tar_dir==1) then
      obj.rx = rot + drot*obj.index
    elseif(tar_dir==2) then
      obj.rx = rot + drot*obj.index + 180
    end
elseif(tar_jiku==1) then
    obj.ox = - (tar_r + tar_dr*obj.index) * math.sin((rot + drot*obj.index)*math.pi/180)
    if(obj.check0 and (drot~=0)) then
      obj.oy = dpos*obj.index + (dpos/drot)*rot
    else
      obj.oy = dpos*obj.index
    end
    obj.oz = - (tar_r + tar_dr*obj.index) * math.cos((rot + drot*obj.index)*math.pi/180)
    if(tar_dir==1) then
      obj.ry = rot + drot*obj.index
    elseif(tar_dir==2) then
      obj.ry = rot + drot*obj.index + 180
    end
else
    obj.ox = (tar_r + tar_dr*obj.index) * math.cos((-90 + rot + drot*obj.index)*math.pi/180)
    obj.oy = (tar_r + tar_dr*obj.index) * math.sin((-90 + rot + drot*obj.index)*math.pi/180)
    if(obj.check0 and (drot~=0)) then
      obj.oz = dpos*obj.index + (dpos/drot)*rot
    else
      obj.oz = dpos*obj.index
    end
    if(tar_dir==1) then
      obj.rz = rot + drot*obj.index
    elseif(tar_dir==2) then
      obj.rz = rot + drot*obj.index + 180
    end
end
