I'm going to take this cursory shot at doing it with plot3(). My curve construction is pretty naive, but I just found it easier to indulge in basic precalc tedium instead of trying to make a parametric curve that looked similar to the original.
% parameters
aspectratio = 0.78; % loop width/height
rowoffset = 0.33;
strokew = 12; % stroke width
outlinew = 1.5; % relative to strokew
outlinev = 0.6; % relative brightness of outline
rowcolors = [0.07 0.33 0.52; 0.60 0.22 0.24; ...
0.71 0.70 0.63; 0.26 0.47 0.39]; % white adjusted to taste
nloops = 4; % number of loops per row
loopsontop = false; % controls layer order
% NOTE:
% apparent stroke width is a function of the view configuration (zoom level,etc)
% appearance and clipping aren't going to be consistent if the figure is adjusted
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% the basic curve construction
% i'm just going to make up something that looks like the picture
y = linspace(0,1,100); % start with quarter-curve
x = (y.^(1/3) - 0.5*y) .* (1 + 0.7*(1 - (y + (1-y).^4)));
x = [x fliplr(1-x)]/2; % half-curve expansion
y = [y y+1]/2;
x = [x fliplr(1-x)]; % single-curve expansion
y = [y fliplr(y)];
x = reshape((x+(0:nloops-1).').',1,[]); % replicate loops
y = repmat(y,[1 nloops]);
x = rescale(x,0,aspectratio*nloops); % scale to fit AR
% create z-contour to allow for mutual occlusion
if loopsontop
z = 0.5^(-4)*(y-0.5).^4;
else
z = 1 - 0.5^(-4)*(y-0.5).^4;
end
% plot the thing
hold on
for k = 1:nloops
thisy = y + (k-1)*(1-rowoffset);
thiscolor = rowcolors(nloops-k+1,:);
plot3(x,thisy,z,'color',thiscolor,'linewidth',strokew/outlinew) % the interior stroke
plot3(x,thisy,z-0.1,'color',thiscolor*outlinev,'linewidth',strokew) % the outline stroke
end
%view(-45,75)
axis equal
If we rotate the view, we can see how this works.
The direction of the weave can be swapped by just complementing the z data:
I was honestly expecting this to be a lot more complicated, but then again, using plot3() probably is the easiest way. Still, the lack of control over the relative width of the strokes is really annoying.