Skip to content

Commit

Permalink
Update mydata_rotate3D.m
Browse files Browse the repository at this point in the history
  • Loading branch information
baskooijman committed Oct 6, 2024
1 parent f33d8c8 commit 5e58448
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/misc/mydata_rotate3D.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%% mydata_rotate3D
% demo that produces an animated png picture in 3D; it rotates when openend in a browser, such as Firefox
% the demo assumes that operating system can find the open-source animated png-assembler apngasm-2.91-bin-win64.exe
% demo that produces an animated png picture in 3D; it rotates when opened in a browser, such as Firefox
% make sure that your operating system can find the open-source animated png-assembler apngasm-2.91-bin-win64.exe
% this assembler app is ran outside Matlab by Matlab function rotate3D

close all
Expand All @@ -15,9 +15,9 @@
Ax = gca; Ax.XColor = 'none'; Ax.YColor = 'none'; Ax.ZColor = 'none'; % hide all axes
view([60 20]) % set viewing angle on xy-plane, while rotating around z-axis
rotate3D(Hfig, 'mydata_rotate3D'); % this writes 100 files in subdir "frames", and deletes them after producing the output file
% you first see a rotating Matlab-fig, where Matlab does the rotation inside Matlab
% you first see a rotating Matlab-fig, where Matlab does a single rotation inside Matlab
% then frame-pictures are written; this takes a while, see progress in Matlab's command-window
% these frame-pictures are then catenated in the animated png file that is included in a html file and rotates outside Matlab
% these frame-pictures are catenated in the animated png file that is included in a html file and continuously rotates outside Matlab

% write html-file that includes the animated png-file mydata_rotate3D.png
oid = fopen('mydata_rotate3D.html', 'w+'); % open file for reading and writing and deletes old content
Expand All @@ -26,5 +26,6 @@

web('mydata_rotate3D.html','-browser'); % open html-file in browser

pause(3) % edit this if you want to keep these files
delete('mydata_rotate3D.html','mydata_rotate3D.png') % clean-up
pause(3) % make sure that your browser has enough time to load the html before deleting it
delete('mydata_rotate3D.html','mydata_rotate3D.png') % clean-up; edit this if you want to keep these files
% the result of this demo is only held inside your browser; all help-files are deleted

0 comments on commit 5e58448

Please sign in to comment.