(*Code by Daniel Walsh*) ClearAll["Global`*"]; (*Please set variable "image" below to a rectangular image with an even number of pixels high. The North and South hemispheres will be processed separately: be patient*) image=(*INSERT IMAGE HERE*); n=10; north=ImageTake[image,{1,ImageDimensions[image][[2]]/2},{1,ImageDimensions[image][[1]]}]; south=ImageRotate[ImageRotate[ImageTake[image,{ImageDimensions[image][[2]]/2,ImageDimensions[image][[2]]},{1,ImageDimensions[image][[1]]}]]]; data=ImageData[south]; j=Dimensions[data][[2]]; souslice[k_]:=souslice[k]=ImageRotate[Image[data[[All,1-Ceiling[-((k)j/n)];;Floor[(k+1)j/n]]],"Real"]]; f[\[Theta]_]:=Cos[\[Pi]/n] EllipticE[\[Theta],-Tan[\[Pi]/n]^2]; topcurve[\[Theta]_]:={f[\[Theta]],Sin[\[Pi]/n] Sin[\[Theta]]}; botcurve[\[Theta]_]:={f[\[Theta]],-Sin[\[Pi]/n] Sin[\[Theta]]}; surface[\[Theta]_,\[Phi]_]:=(1-\[Phi]) botcurve[\[Theta]]+\[Phi] topcurve[\[Theta]]; sou[k_]:=sou[k]=ParametricPlot[surface[ArcSec[(Sec[\[Pi]/n] Sqrt[Sec[\[Theta]]^2 (1+Cos[(2 \[Pi])/n-\[Phi]] Cos[\[Phi]]-Cos[2 \[Theta]] Sin[(2 \[Pi])/n-\[Phi]] Sin[\[Phi]])])/Sqrt[2]],1/(1+Csc[\[Phi]] Sin[(2 \[Pi])/n-\[Phi]])],{\[Theta],0.001,\[Pi]/2},{\[Phi],0,(2\[Pi])/n},Mesh->None,Axes->False,Frame->False,BoundaryStyle->None,PlotStyle->{Opacity[1],Texture[souslice[k]]},ImageSize->1500]; ImageAssemble[Table[{sou[n-1-k]},{k,0,n-1}]] data=ImageData[north]; j=Dimensions[data][[2]]; norslice[k_]:=norslice[k]=ImageRotate[Image[data[[All,1-Ceiling[-((k)j/n)];;Floor[(k+1)j/n]]],"Real"]]; f[\[Theta]_]:=Cos[\[Pi]/n] EllipticE[\[Theta],-Tan[\[Pi]/n]^2]; topcurve[\[Theta]_]:={f[\[Theta]],Sin[\[Pi]/n] Sin[\[Theta]]}; botcurve[\[Theta]_]:={f[\[Theta]],-Sin[\[Pi]/n] Sin[\[Theta]]}; surface[\[Theta]_,\[Phi]_]:=(1-\[Phi]) botcurve[\[Theta]]+\[Phi] topcurve[\[Theta]]; nor[k_]:=nor[k]=ParametricPlot[surface[ArcSec[(Sec[\[Pi]/n] Sqrt[Sec[\[Theta]]^2 (1+Cos[(2 \[Pi])/n-\[Phi]] Cos[\[Phi]]-Cos[2 \[Theta]] Sin[(2 \[Pi])/n-\[Phi]] Sin[\[Phi]])])/Sqrt[2]],1/(1+Csc[\[Phi]] Sin[(2 \[Pi])/n-\[Phi]])],{\[Theta],0.001,\[Pi]/2},{\[Phi],0,(2\[Pi])/n},Mesh->None,Axes->False,Frame->False,BoundaryStyle->None,PlotStyle->{Opacity[1],Texture[norslice[k]]},ImageSize->1500]; ImageAssemble[Table[{nor[n-1-k]},{k,0,n-1}]]