Commit 33221d0d authored by actb's avatar actb

updated ui rotate

parent 633fe72b
......@@ -2,12 +2,11 @@
UISERVER='http://localhost:4444/'
movieFile='pos1_rotate_seg.mp4';
movieFile='9drotation.mp4';
v=VideoWriter(movieFile,'MPEG-4');
v.FrameRate=10;
open(v)
ui=webread([UISERVER 'ui']);
ui.sidebar='none';
ui.webToolbar='none';
......@@ -21,19 +20,6 @@ webwrite([UISERVER 'ui'],options,ui);
time=1;
webwrite([UISERVER 'time/' num2str(time)] ,'');
% wait for mr render to complete
bComplete=false;
while ~bComplete
bComplete=webread([UISERVER 'drawComplete']);
if ~bComplete
pause(0.5)
end
end
im=webread([UISERVER 'screenCap']);
imagesc(im)
axis image
axis off
view=webread([UISERVER 'view']);
options = weboptions('MediaType','application/json');
theta=1/pi;
......@@ -42,11 +28,8 @@ theta=1/pi;
% rz=[cos(theta),-sin(theta),0,0;sin(theta),cos(theta),0,0;0,0,1,0;0,0,0,1];
for theta=0:0.1:2*pi
ry=[cos(theta), 0, sin(theta),0;0,1,0,0;-sin(theta),0,cos(theta),0;0,0,0,1];
%worldRot=reshape(view.worldRot,4,4);
worldRot=ry;
% worldRot=worldRot';
view.worldRot=worldRot(:);
% view.zoom=0.5;
webwrite([UISERVER 'view'],options,view);
bComplete=false;
while ~bComplete
......@@ -56,9 +39,9 @@ for theta=0:0.1:2*pi
end
end
im=webread([UISERVER 'screenCap']);
% imagesc(im)
% axis image
writeVideo(v,im);
imagesc(im)
axis image
% writeVideo(v,im);
drawnow
fprintf(1,'theta=%f complete\n',theta);
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment