ctor[z_]:=(output={};
Do[AppendTo[output,{Re[z[[k]]],Im[z[[k]]]}],{k,1,Length[z]}];
output);


plotpolylist[vertlist_]:=Show[Table[Graphics[{(*GrayLevel[1],Thickness[.01],{Polygon[vertlist[[k]]]},*)GrayLevel[If[k==Length[vertlist],0,.1]],Thickness[If[k==Length[vertlist],.005,.005]],{Line[vertlist[[k]]]}},{PlotRange->All,Axes->None,AspectRatio->Automatic}],{k,1,Length[vertlist]}]];

plotpolylistC2[vert_]:=(vert3={};
Do[vert1=ctor[vert[[k]]];
AppendTo[vert3,vert1];,{k,1,Length[vert]}];
plotpolylist[vert3]);

(*compute the tayor series coefficients of (1+z)^p The kth item of the list the coefficient of z^{k-1}*)makecoeff[p_,z_,n_]:=(out={1};
Do[(AppendTo[out,Last[out] (p-k+1)/((k)(-z))];),{k,1,n}];
out);
(* evaluate the poser series with given coefficients at given point *)

sumcoeff[coeff_,w_]:=(wout=First[coeff];
wpower=1;
Do[(wpower=wpower w;
wout=wout+wpower coeff[[k]];),{k,2,Length[coeff]}];
wout);

(* compute product of power series by convolution formula only n terms *)

multcoef[data1_,data2_]:=(mout={data1[[1]] data2[[1]]};
Do[(AppendTo[mout,Sum[data1[[1+j]] data2[[1+k-j]],{j,0,k}]];),{k,1,Length[data1]-1}];
mout);

(*integrate power series term-by-term*)

intcoef[data1_]:=(out={0};
Do[(AppendTo[out,data1[[k]]/k];),{k,1,Length[data1]}];
out);

makeSCcoef[alpha_,para_,n_]:=(scout=makecoeff[alpha[[1]]-1,para[[1]],n];
Do[(next=makecoeff[alpha[[k]]-1,para[[k]],n];
scout=multcoef[scout,next];),{k,2,Length[alpha]}];
scout=intcoef[scout];
scout);

  (* plt only image of unit circle *)
plotSCcoef2[data_,num_]:=(plotpolyC[Table[sumcoeff[data,Exp[2 Pi I k/num]],{k,1,num}]];);
(* plot smaller circles and radii too *) 
plotSCcoef3[data_,para_,num_]:=(circles={Table[sumcoeff[data,Exp[2 Pi I k/num]],{k,0,num}]};
num2=100;
AppendTo[circles,Table[sumcoeff[data,(.5) Exp[2 Pi I k/num2]],{k,0,num2}]];
AppendTo[circles,Table[sumcoeff[data,(.75) Exp[2 Pi I k/num2]],{k,0,num2}]];
AppendTo[circles,Table[sumcoeff[data,(.85) Exp[2 Pi I k/num2]],{k,0,num2}]];
num2=200;
AppendTo[circles,Table[sumcoeff[data,(.95) Exp[2 Pi I k/num2]],{k,0,num2}]];
radii=Table[.98^k,{k,1,50}];
PrependTo[radii,1];
AppendTo[radii,0];
lines={};
Do[(AppendTo[lines,Table[sumcoeff[data,radii[[j]] para[[k]]],{j,1,Length[radii]}]];),{k,1,Length[para]}];
plotpolylistC2[Join[circles,lines]]);


plotSC[alpha_,para_,num_]:=(scout=makeSCcoef[alpha,para,num];
plotSCcoef3[scout,para,10 num])

alpha1={.5,.5,.5,.5};
para1={1,I,-1,-I};
alpha2={.5,.5,1.5,.5,.5,.5,1.5,.5};
para2=N[Table[Exp[2 Pi I k/8],{k,1,8}]];

plotSC[alpha1,para1,10]