Products & Services Solutions Academia Support User Community Company

Learn more about Simulink 3D Animation   

vrfigure/capture - Create RGB image from virtual reality figure

Syntax

image_capture = capture(vrfigure_object)

Description

image_capture = capture(vrfigure_object) captures a virtual reality figure into a TrueColor RGB image. This image can be displayed by the image command and subsequently printed.

Examples

Create a vrworld object. At the MATLAB command prompt, type

myworld = vrworld('vrmount.wrl')

The vrworld object myworld is associated with the virtual world vrmount.wrl.

Next, open the virtual world using the vrworld object. You must open the virtual world before you can view it. At the MATLAB command prompt, type

open(myworld)

You can now view the virtual world in the Simulink 3D Animation viewer by typing

f = vrfigure(myworld)

Your viewer opens and displays the virtual scene. Next, create an RGB image by typing

image_capture = capture(f);

Lastly, view the image

image(image_capture)

The scene from the viewer window is displayed in a MATLAB figure window.

See Also

vrfigure

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2010- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS