Link Simulink Models

Link Simulink® model signals to a virtual reality world

To visualize a dynamic system simulation, connect a Simulink block diagram to a virtual world. Simulating a Simulink model generates signal data for a dynamic system. By connecting the Simulink model to a virtual world, you can use this signal data to control and animate the virtual world.

After you create a virtual world and a Simulink model, you can connect the two with Simulink 3D Animation™ blocks. To write values from the block ports to specified virtual world fields, you can use a VR Sink block. To provide interactivity between a virtual world visitor and a Simulink model, you can use a VR Source block or other blocks such as a Space Mouse Input block.


VR Sink Write data from Simulink model to virtual world
VR Source Read data from virtual world to Simulink model
VR To Video Write data from Simulink model to virtual world (video output port enabled)
VR Tracer Trace trajectory of object in associated virtual scene
VR Text Output Allows display of Simulink signal values as text in virtual reality scene
VR Placeholder Send unspecified value to Simulink 3D Animation block
VR Signal Expander Expand input vectors into fully qualified virtual world field vectors
Joystick Input Process input from asynchronous joystick device
Space Mouse Input Process input from space mouse device
Cross Product Cross product of two 3-D vectors
Normalize Vector Unit vector parallel to input vector
Rotation Between 2 Vectors Virtual world rotation between two 3-D vectors
Rotation Matrix to VRML Rotation Convert rotation matrix into representation used in virtual world
Viewpoint Direction to VRML Orientation Convert viewpoint direction to virtual world orientation


vrlib Open Simulink block library for Simulink 3D Animation
vrjoystick Create joystick object
vrspacemouse Create space mouse object


Virtual World Connection to a Model

Associate a Simulink model with a virtual world and connect signals from the Simulink model to the virtual world.

Use CAD Models with the Simulink 3D Animation Product

Adapt existing CAD designs for use with the Simulink 3D Animation product.

Interact with Generated Code

Have a virtual world that you create with the Simulink 3D Animation product interact with code generated by the Simulink Coder™ product and compiled with a third-party C/C++ compiler in the Simulink Desktop Real-Time™ environment.

Was this topic helpful?