- /
-
Earth with labels!
on 2 Dec 2023
- 15
- 168
- 0
- 1
- 738
drawframe(1);
Write your drawframe function below
function drawframe(f)
persistent x;
if f==1
gx = geoaxes(gcf,'Position',[0 0 1 1],'Basemap','streets','grid','off','tickdir','none');
gx.Scalebar.Visible = "off";
geolimits([-90 90],[-180 180]);
x = getframe(gcf);
x = x.cdata;
end
set(gcf,'color','k');
rng(41);
scatter3(2*rand(20,1)-1,2*rand(20,1)-1,-ones(20,1),'.w'); hold on;
scatter3(2*rand(20,1)-1,ones(20,1),2*rand(20,1)-1,'.w');
scatter3(ones(20,1),2*rand(20,1)-1,2*rand(20,1)-1,'.w');
lt = linspace(-90,90,size(x,1));
ln = linspace(-180,180,size(x,2));
[LT,LN] = meshgrid(lt,ln+7.5*f);
surf(cosd(LT').*cosd(LN'),cosd(LT').*sind(LN'),-sind(LT'),'cdata',(double(x)/255).^2,'edgecolor','none');
axis equal off;
hold off;
% camlight(30,25);
light('style','infinite','color',[0.95 1 0.9],'position',[cosd(180)*cosd(45) cosd(180)*sind(45) sind(180)]);
material dull;
end