Closed ryancoe closed 3 years ago
I used the following code to do this for WaveBot_caseC
using the CaptureFigVid
function from the MATLAB FileExchange.
knee_idx = 36; % a potential single solution on the Pareto front
figure('color','white')
hold on
grid on
scatter3(-pBar, vol, zmax, 75, zmax, 'filled','LineWidth',0.5,...
'MarkerEdgeColor','k','MarkerFaceAlpha',0.5);
scatter3(-pBar(knee_idx), vol(knee_idx), zmax(knee_idx),150,...
'marker','+','MarkerEdgeColor','k','LineWidth',2);
view([13, 18])
cb = colorbar;
cb.Label.Interpreter = 'latex';
cb.Label.String = ('Max. PTO stroke, $z^{\textrm{max}}$ [m]');
% these kind of get in the way, let's leave them out
% xlabel('Neg. avg. power, $ - \bar{P}$ [W]', 'interpreter','latex')
% ylabel('Vol. fun, $(r_0 + r)^3$ [m$^3$]', 'interpreter','latex')
% zlabel('Max. PTO stroke, $z^{\textrm{max}}$ [m]', 'interpreter','latex')
axis vis3d
vidOpts.FrameRate=25;
vidOpts.Duration=10;
vidOpts.Periodic=true;
CaptureFigVid([160,10;360+160,10],...
'WecOptTool_WaveBot_caseC',vidOpts)
and then produced a .gif
with ffmpeg
and the instructions here.
While not helpful for papers (unless the publisher allows uploading videos) it is often handy to rotate a 3D plot to comprehend the data.