- /
-
A collection of Exoplanets with liquid water
on 20 Oct 2022
- 2
- 46
- 0
- 0
- 253
% A collection of Exoplanets with liquid water (marshes?).
% Image captured with MATLAB ;)
%
% This is a simpler version of a script I wrote in 2020 for a publication
% in the Journal of Fluid Mechanics. The purpose of the original script was
% to draw a sketch of a planar detonation with inhomogeneties in the upstream
% fuel mixture composition.
%
% Here is the DOI (10.1017/jfm.2020.651) and the preprint can be found on
% ResearchGate, if anyone is interested.
% Set camera zoom (its value is inversely proportional to the zoom factor)
m=20;
% Set region to take picture
x=linspace(0,.5,m);
% Auxiliary index
e=1:m;
% Dummy function to get random values
f=@(x)rand(x);
% Loop to generate the samples
for k=e
B=round(9*f(1)); % Gives random values \in (0, 9)
for i=m:-B:1
for j=m:-B:1
d(i,j)=1e-3*f(1);
end
end
end
% Generate mesh with the data
h=linspace(0,.5,5*m);
[s,t]=meshgrid(h,h);
w=griddata(x,x,d',s,t,'cubic');
% Plot
contourf(s,t,w,m,'LineStyle','none')
% Apply colormap
colormap(brewermap(m,'GnBu'));
% Remove axis
axis off
% % Original colormap (needs FEX function: hex2rgb.m, C. Greene)
% c=['#00aaff';'#00aaff';'#00aaff';'#00aaff';'#00aaff';'#00aaff';'#00aaff';'#00aaff';'#00aaff';...
% '#37bdff';'#37bdff';'#37bdff';'#37bdff';'#37bdff';'#37bdff';'#37bdff';'#37bdff';'#37bdff';...
% '#69cdff';'#69cdff';'#69cdff';'#69cdff';'#69cdff';'#69cdff';'#69cdff';'#69cdff';'#69cdff';...
% '#9bdeff';'#9bdeff';'#9bdeff';'#9bdeff';'#9bdeff';'#9bdeff';'#9bdeff';'#9bdeff';'#9bdeff';...
% '#cdefff';'#cdefff';'#cdefff';'#cdefff';'#cdefff';'#cdefff';'#cdefff';'#cdefff';'#cdefff';...
% '#e6f7ff';'#e6f7ff';'#e6f7ff';'#e6f7ff';'#e6f7ff';'#e6f7ff';'#e6f7ff';'#e6f7ff';'#e6f7ff';...
% '#f5fcff';'#f5fcff';'#f5fcff';'#f5fcff';'#f5fcff';'#f5fcff';'#f5fcff';'#f5fcff';'#f5fcff';...
% '#28b463';...
% '#fffcf5';'#fffcf5';'#fffcf5';'#fffcf5';'#fffcf5';'#fffcf5';'#fffcf5';'#fffcf5';'#fffcf5';...
% '#fff7e6';'#fff7e6';'#fff7e6';'#fff7e6';'#fff7e6';'#fff7e6';'#fff7e6';'#fff7e6';'#fff7e6';...
% '#ffefcd';'#ffefcd';'#ffefcd';'#ffefcd';'#ffefcd';'#ffefcd';'#ffefcd';'#ffefcd';'#ffefcd';...
% '#ffde9b';'#ffde9b';'#ffde9b';'#ffde9b';'#ffde9b';'#ffde9b';'#ffde9b';'#ffde9b';'#ffde9b';...
% '#ffcd69';'#ffcd69';'#ffcd69';'#ffcd69';'#ffcd69';'#ffcd69';'#ffcd69';'#ffcd69';'#ffcd69';...
% '#ffbd37';'#ffbd37';'#ffbd37';'#ffbd37';'#ffbd37';'#ffbd37';'#ffbd37';'#ffbd37';'#ffbd37';...
% '#ffaa00';'#ffaa00';'#ffaa00';'#ffaa00';'#ffaa00';'#ffaa00';'#ffaa00';'#ffaa00';'#ffaa00'];
% % Convert hex to rgb values \in [0,1]
% c=hex2rgb(c,256)/255;
% colormap(c);