Prev: Easy array question
Next: How to move a point on a map
From: Saurabh Mahapatra on 27 Jul 2010 19:22 Hi there, You will have to use the MATLAB API to do this. For the demo here: http://www.mathworks.com/matlabcentral/fileexchange/28089 which is essentially the same MATLAB code except for the WRL file, you need to add the following piece of code just after the vrfigure command: set(fig, 'Headlight', 'off'); set(fig,'Record2D','on'); set(fig,'NavPanel','none'); set(world,'Recording','on'); The final code should look like this: world=vrworld('Wind_Turbine_Realism.wrl', 'new'); open(world); fig=vrfigure(world); set(fig, 'Headlight', 'off'); set(fig,'Record2D','on'); set(fig,'NavPanel','none'); set(world,'Recording','on'); blades_1=vrnode(world, 'Blades_1'); blades_2=vrnode(world, 'Blades_2'); blades_3=vrnode(world, 'Blades_3'); phase_1=0; phase_2=pi/3; phase_3=pi/6; for theta=0:0.25:12*3*pi pause(0.001) blades_1.rotation=[0 0 1 phase_1-theta]; blades_2.rotation=[0 0 1 phase_2-theta]; blades_3.rotation=[0 0 1 phase_3-theta]; vrdrawnow; end If you do: get(fig) you should be able to see these properties that you can set: Record2D = 'off' Record2DCompressMethod = 'auto' Record2DCompressQuality = 75 Record2DFPS = 15 Record2DFileName = '%f_anim_%n.avi' The documentation that you should refer to: http://www.mathworks.de/access/helpdesk/help/toolbox/sl3d/f4-33836.html#f4-36642 Thanks, Saurabh
|
Pages: 1 Prev: Easy array question Next: How to move a point on a map |