| 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 |
c = canvas(vrworld)
c = canvas(vrworld, parent)
c = canvas(vrworld, parent,
position)
c
= canvas(world, 'propertyName', propertyValue,...)
c = canvas(vrworld) creates a MATLAB figure containing a virtual reality canvas that shows the specified virtual reality world. It returns a virtual reality canvas object.
c = canvas(vrworld, parent) creates a virtual reality canvas that shows the specified virtual world in the figure specified in parent. It returns a virtual reality canvas object.
c = canvas(vrworld, parent, position) creates a virtual reality canvas object that shows the specified virtual world in the figure specified in parent at position, specified in pixels. It returns a virtual reality canvas object.
c = canvas(world, 'propertyName', propertyValue,...) creates a virtual reality canvas that shows the specified world with specified properties. See Property Summary for a list of the properties and their values.
| Method | Description |
|---|---|
| canvas | Create virtual reality canvas object |
| Method | Description |
|---|---|
| capture | Capture virtual reality canvas to RGB image |
| Property | Values | Description |
|---|---|---|
| Antialiasing | 'off' | 'on' Default: 'off' | Determines whether antialiasing is used when rendering the scene. Antialiasing smooths textures by interpolating values between texture points. This property causes a significant CPU load, but the resulting scene looks more natural. Read/write. |
| CameraBound | 'off' | 'on' Default: 'on' | Controls whether or not the camera moves with the current viewpoint. When the camera is bound, its position, direction, and up vector are relative to the viewpoint. For unbound camera, these values are absolute. 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. |
| DeleteFcn | String | Specifies the callback invoked when closing the vr.canvas object. Read/write. |
| Headlight | 'off' | 'on' Default: 'on' | Turns the headlight on or off. Read/write. Specifies whether headlight is enabled. The headlight is an additional white directional light that moves and rotates with the camera. |
| Lighting | 'off' | 'on' Default: 'on' | Specifies whether the lighting is taken into account when rendering. If it is off, all the objects are drawn as if uniformly lit. Read/write. |
| MaxTextureSize | '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 used in rendering vr.canvas objects. The value must be a power of two and may be further adjusted to match specific hardware renderer limits. 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 possible pixel size. |
| NavMode | 'fly' | 'examine' | 'walk' Default: 'fly' | Specifies the current navigation mode. |
| NavPanel |
Default: 'none' | Controls the appearance of the control panel in the vr.canvas object. |
| NavSpeed | 'very slow' | 'slow' | 'normal' | 'fast' | 'very fast' Default: 'normal' | Specifies navigation speed. Read/write. |
| NavZones | 'off' | 'on' Default: 'off' | Toggles navigation zones on/off. Read/write. |
| Parent | Double | Specifies handle of parent of this virtual reality canvas. Read-only. |
| Position | Vector of four doubles | Specifies screen coordinates of this virtual reality canvas. |
| Textures | 'off' | 'on' Default: 'on' | Turns texture rendering on or off. Read/write. |
| Transparency | 'off' | 'on' Default: 'on' | Specifies whether or not transparency information is taken into account when rendering. If it is off, all objects are drawn opaque. Read/write. |
| Units | 'pixels' | 'normalized' | Specifies the units to interpret the Position property. The DefaultCanvasUnits preference controls the default for this property. Read/write |
| Viewpoint | String. If active viewpoint does not have a name, value is empty. | Specifies the vr.canvas object's active viewpoint. This value is an empty string if the active viewpoint has no description. Read/write. |
| Wireframe | 'off' | 'on' Default: 'off' | Specifies whether objects are drawn as solids or wireframes. Read/write. |
| World | vrworld object | Specifies the world this vr.canvas object is displaying. Read only. |
| ZoomFactor | Double Default: 1 | Specifies the camera zoom factor. Read/write. A zoom factor of 2 makes the scene look twice as big. A zoom factor of 0.1 makes it look 10 times smaller, and so forth. |
![]() | vrcadcleanup | vr.figure | ![]() |

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 |