Pensieve header: Planet Earth pulled back to the Hopf fibration - G8 (first) runs.

SetDirectory["C:\\drorbn\\AcademicPensieve\\Projects\\PlanetHopf"];
<< PlanetHopf-Programs.m

MakeColourScheme[AllCountries,{
{"Canada", "Greenland"}, {"Canada", "Russia"}, {"UnitedStates", "Russia"}, {"Canada", "Mexico"}, {"Malaysia", "PapuaNewGuinea"}, {"Japan", "Russia"}, {"Japan", "SouthKorea"}, 
{"Kazakhstan", "Mongolia"}, {"Australia", "NewZealand"}, {"Australia", "Indonesia"}, {"Australia", "PapuaNewGuinea"}, {"China", "Japan"}, {"China", "SouthKorea"}, {"NorthKorea", "Japan"}, {"UnitedStates", "Greenland"}, {"Greenland", "Russia"}, {"Pakistan", "Tajikistan"}, {"Canada", "Japan"}, {"Canada", "Italy"}, {"Italy", "Japan"}, {"Italy", "Germany"}, {"France", "UnitedKingdom"}
}];
LoadColourScheme["101127-222611"]

{AllCountries, G20, G8}

MakeImage["ColourWheel", Graphics[
{
Hue[c=CountryColour[#]],
Line[{{0,0},{Cos[2Pi c], Sin[2Pi c]}}]
}& /@ AllCountries
]]

MakeImage["BaseMap",Graphics[{
EdgeForm[White],
{
Hue[CountryColour[#]],
CountryShape[#] /. {CountryShape  -> List, Region[pts___] :> Polygon[{pts} /. LonLat-> List]}
}& /@ 
(AllCountries)
}, Background -> Black]]

(* SaveColourScheme[] *)

beta=(-90+1/Sqrt[5])Degree;
MakeImage["FramingExercise", Graphics3D[{
Whirl[#,
WhirlBottom -> 40Degree, WhirlTop -> 320 Degree,WhirlingSteps -> 0
]& /@ AllCountries,
grid
}]]

wc=G20;
wc={"Canada", "China", "France", "Mexico"};
wc=G8;
wg8 := {
Whirl[#,
WhirlBottom -> 40Degree, WhirlTop -> 320 Degree, WhirlingSteps -> 120,
WhirlRegions -> If[#==="Japan", 4, 1],
TopStyle -> {Glow[Hue[CountryColour[#]]]},
BottomStyle -> {Opacity[1]}
]& /@ wc,
Whirl[#,
WhirlBottom -> -40Degree, WhirlTop -> 40 Degree,
WhirlRegions ->If[#==="Japan", 4, 1],
WhirlStyle-> {Opacity[0.2]},
TopStyle -> {Opacity[0]}, BottomStyle -> {Opacity[0]}
]& /@ {"Canada", "Italy", "Japan"},
Whirl[#,
WhirlBottom -> -40Degree, WhirlTop -> 40 Degree, WhirlingSteps -> 0,
TopStyle -> {Opacity[0.5], Glow[Hue[CountryColour[#]]]},
BottomStyle -> {Opacity[0.5], Glow[Hue[CountryColour[#]]]}
]& /@ Complement[AllCountries, {}],
grid
};

beta=(-90+1/Sqrt[5])Degree;
MakeImage["WhirlG8", Graphics3D[wg8]]

Run["convert -resize 640x640 BaseMap.png BaseMap_640.png"];
Run["convert WhirlG8.png BaseMap_640.png -gravity SouthEast -compose lighten -composite PlanetHopf.png"];
Run["convert PlanetHopf.png Label.png -gravity SouthWest -compose lighten -composite PlanetHopf.png"];
Run["convert -resize 120x120 PlanetHopf.png PlanetHopf_120.png"];
Run["convert -resize 720x720 PlanetHopf.png PlanetHopf_720.png"];
Run["convert -resize 240x240 PlanetHopf.png PlanetHopf_240.png"];
Show[
Import["PlanetHopf_720.png"],
ImageSize -> 512
]

Dynamic[Show[frame, ImageSize -> 512]]

Do[
fname=StringJoin@@Flatten[{"Frames/", ToString /@ IntegerDigits[n, 10, 3], ".png"}];
beta=(n+1/Sqrt[5]) Degree;
frame=Rasterize[
Graphics3D[wg8, ImageSize -> 720],
RasterSize -> 720, ImageSize -> 720
];
Export[fname, frame],
{n,0,359}
]