%% Capture an RGB Image of a Figure
% Create and open a vrworld object and associate it with the virtual world vrmount.wrl.

myworld = vrworld('vrmount');
open(myworld);

%
% View the virtual world in the Simulink® 3D Animation™ Viewer.

f = vrfigure(myworld);

% Create an RGB image of the figure.
%

image_capture = capture(f);

%
% Display the RGB figure image in a MATLAB® figure window.

image(image_capture);

%
% Copyright 2012 The MathWorks, Inc.