| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink 3D Animation |
| Contents | Index |
| Learn more about Simulink 3D Animation |
f = figure
f = figure([])
f = figure(world)
f = figure(world, 'PropertyName', propertyvalue, ...)
f = figure returns an empty figure object. This object does not have a visual representation. All properties are empty.
f = figure([]) returns an empty vector of type figure.
f = figure(world) creates a new virtual reality figure. It shows the specified world(s) and returns the figure object, f.
f = figure(world, 'PropertyName', propertyvalue, ...) shows the specified world(s) with specified properties and returns the figure object, f.
Creating a virtual figure object with this method creates and displays the object in the figure window viewer (default viewer 'internalv5'). It ignores the value of the vrsetpref DefaultViewer property.
| Method | Description |
|---|---|
| figure | Create virtual reality figure object |
| Property | Value | Description |
|---|---|---|
Antialiasing | 'off' | 'on' Default: 'off' | Determines whether to use antialiasing when rendering the scene. Antialiasing smooths textures by interpolating values between texture points. Read/write. |
CameraBound | 'off' | 'on' Default: 'on' | Controls whether the camera moves with the current viewpoint. Read/write. |
CameraDirection | Vector of three doubles | Specifies the camera direction relative to the direction of the current viewpoint. Read/write. |
CameraDirectionAbs | Vector of three doubles | Specifies the camera direction in world coordinates. Read only. |
CameraPosition | Vector of three doubles | Specifies the camera position relative to the position of the current viewpoint. Read/write. |
CameraPositionAbs | Vector of three doubles | Specifies the camera position in world coordinates. Read only. |
CameraUpVector | Vector of three doubles | Specifies the camera up vector relative to the up vector of the current viewpoint. Read/write. |
CameraUpVectorAbs | Vector of three doubles | Specifies the camera up vector in world coordinates. Read only. |
CaptureFileFormat | 'tif' | 'png' Default: 'tif' | Specifies file format for a captured frame file. Read/write. |
CaptureFileName | String Default: '%f_anim_%n.ext' | Specifies the file name for the frame capture. The string can contain tokens that the corresponding information replaces when the frame capture occurs. For details, see Frame Capture and Animation Recording File Tokens. Read/write. |
DeleteFcn | String | Specifies the callback invoked when closing the figure object. Read/write. |
Fullscreen | 'off' | 'on' Default: 'off' | Specifies whether the figure is in full screen mode. Read/write. |
Headlight | 'off' | 'on' Default: 'on' | Turns the headlight on or off. Read/write. |
Lighting | 'off' | 'on' Default: 'on' | Specifies whether the software considers lighting when rendering. If lighting is off, the figure draws all objects as if uniformly lit. Read/write. |
'auto' | 32 <= x <= video card limit, where x is a power of 2 (video card limit is typically 1024 or 2048) | Sets the maximum pixel size of a texture in rendering figure objects. The smaller the size, the faster the texture can render. Increasing this value improves image quality but decreases performance. A value of 'auto' sets the maximum pixel size. Setting an unsuitable value might cause a warning. The software then automatically adjusts the property to the next smaller suitable value. | |
Name | String | Specifies the name of this virtual reality figure object. Read/write. |
NavMode | 'fly' | 'examine' | 'walk' Default: 'examine' | Specifies navigation mode. Read/write. |
NavPanel | 'opaque' | 'translucent' | 'none' | 'halfbar' | 'bar' Default: 'halfbar' | Controls the appearance of the navigation panel in the viewer. Read/write. |
NavSpeed | 'very slow' | 'slow' | 'normal' | 'fast' | 'very fast' Default: 'normal' | Specifies navigation speed. Read/write. |
NavZones | 'off' | 'on' Default: 'off' | Turns on or off navigation zones. Read/write. |
Position | Vector of four doubles | Specifies the screen coordinates of this virtual reality object. Read/write. |
Record2D | 'off' | 'on' Default: 'off' | Enables 2-D offline animation file recording. Read/write. |
Record2DCompress | '' | 'auto' | 'lossless' | 'codec_code' Default: 'auto' | Specifies the compression method for creating 2-D animation files. The software must register the codec code in the system. See the MATLAB function documentation for avifile. Read/write. |
Record2DCompress | 0–100 Default: '75' | Specifies the quality of 2-D animation file compression. Read/write. |
Record2DFileName | String Default: '%f_anim_%n.ext' | Specifies the file name for 2-D offline animation. The string can contain tokens that the corresponding information replaces when the animation recording takes place. For details, see Animation Recording File Tokens. Read/write. |
Record2DFPS | Scalar Default: 15 | Specifies the file speed for 2-D offline animation in frames per second (fps). This value is the speed of the .avi movie. For details, see avifile. |
StatusBar | 'off' | 'on' Default: 'on' | Turns on and off the status bar at the bottom of the viewer. Read/write. |
Textures | 'off' | 'on' Default: 'on' | Turns texture rendering on or off. Read/write. |
Toolbar | 'off' | 'on' Default: 'on' | Turns on and off the toolbar on the viewer. Read/write. |
Transparency | 'off' | 'on' Default: 'on' | Specifies whether the software takes transparency information into account when rendering. Read/write. |
Viewpoint | String If active viewpoint does not have a name, value is empty. | Specifies the vrfigure active viewpoint of the object. Read/write. |
Wireframe | 'off' | 'on' Default: 'off' | Specifies whether the software draws objects as solids or wireframes. Read/write. |
World | vrworld object | Specifies the world this vrfigure object is displaying. Read only. |
ZoomFactor | Double | Specifies the camera zoom factor. Read/write. |
![]() | vr.canvas | vrclear | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |