MATLAB SIMULINK 3D ANIMATION - S Guía de usuario

Busca en linea o descarga Guía de usuario para Software MATLAB SIMULINK 3D ANIMATION - S. MATLAB SIMULINK 3D ANIMATION - S User`s guide Manual de usuario

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 490
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente

Indice de contenidos

Pagina 1 - User's Guide

Simulink® 3D Animation™User's GuideR2015a

Pagina 2 - How to Contact MathWorks

x Contents3D World Editor Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-243D World Editor Library Objects . . . . . . . . . . .

Pagina 3 - Revision History

3 Simulink Interface3-184Select the Allow viewing from the Internet check box.Note This option allows any computer connected to the network to view yo

Pagina 4

View Virtual World Remotely3-19Click OK. An IP Configuration dialog box opens with a list of your IP, mask, andgateway addresses.Alternatively, for W

Pagina 5 - Contents

3 Simulink Interface3-208On the host computer, in the Simulink window, from the Simulation menu, clickRun.On the client computer, the animation of the

Pagina 6 - Simulink Interface

View Virtual World Remotely3-2110On the host computer, in the Simulink window, from the Simulation menu, clickStop. On the client computer, close the

Pagina 7

3 Simulink Interface3-22Working with VRML SensorsIn this section...“Add VRML Sensors to Virtual Worlds” on page 3-22“Interactive Mode” on page 3-23“Re

Pagina 8

Working with VRML Sensors3-23Sensors DescriptionVisibilitySensor Detects visibility changes of a rectangular box as you navigate theworld.Interactive

Pagina 9

3 Simulink Interface3-24nh = vrnode(wh, 'Grab_Sensor');% synchronize the translation fieldsync(nh, 'translation', 'on');

Pagina 10 - Viewing Virtual Worlds

Working with VRML Sensors3-25ROUTE Grab_Sensor.translation_changed TO Ball.translation• You can use this method to input information from all VRML no

Pagina 11

3 Simulink Interface3-26VR Source Block Input to Simulink ModelsThe VR Source reads values from virtual world fields specified in the Block Parameters

Pagina 12

Interact with Generated Code3-27Interact with Generated CodeYou can have a virtual world that you create the Simulink 3D Animation productinteract wi

Pagina 13 - Glossary

xiDefine and Reset Viewpoints . . . . . . . . . . . . . . . . . . . . . . . . . 7-30Reset Viewpoints . . . . . . . . . . . . . . . . . . . . . . . . .

Pagina 15 - Getting Started

4MATLAB InterfaceAlthough using the Simulink 3D Animation software with the Simulink interface is thepreferred way of working with the Simulink 3D Ani

Pagina 16 - 1 Getting Started

4 MATLAB Interface4-2Create vrworld Object for a Virtual WorldTo connect MATLAB to a virtual world and to interact with that virtual world throughthe

Pagina 17 - Expected Background

Create vrworld Object for a Virtual World4-31Open MATLAB. In the MATLAB Command Window, typemyworld = vrworld('vrmount.wrl')The MATLAB Comm

Pagina 18

4 MATLAB Interface4-4Open a Virtual World with MATLABOpening a virtual world lets you view the virtual world in a VRML viewer, scan itsstructure, and

Pagina 19

Open a Virtual World with MATLAB4-53If the Web browser has the VRML plug-in installed, in the browser window, click Myfirst virtual world.4Your defau

Pagina 20

4 MATLAB Interface4-6Interact with a Virtual World with MATLABIn the life cycle of a vrworld object you can set new values for all the available virtu

Pagina 21

Interact with a Virtual World with MATLAB4-7mynodes = vrnode object: 13-by-1 Tunnel (Transform) [My first virtual world] Road (Shape) [My first virt

Pagina 22

4 MATLAB Interface4-8 ----------------------------------------------------------- addChildren eventIn MFNode off remove

Pagina 23 - MATLAB Compiler Support

Close and Delete a vrworld Object4-9Close and Delete a vrworld ObjectAfter you are finished with a session, you must close all open virtual worlds an

Pagina 24

xii ContentsView a Virtual World in Stereoscopic Vision . . . . . . . . . . . . 7-62Enable Stereoscopic Vision . . . . . . . . . . . . . . . . . . . .

Pagina 25 - VRML Support

4 MATLAB Interface4-10Animation RecordingIn this section...“Recording Formats” on page 4-10“Manual and Scheduled Animation Recording” on page 4-11The

Pagina 26

Animation Recording4-11vrfigure objects to record 2-D animation files. The recorded 2-D animation reflectsexactly what you see in the viewer window.

Pagina 27 - VRML Coordinate System

4 MATLAB Interface4-12File Name TokensThe Simulink 3D Animation software supports a variety of file naming formats using filetokens. By default, the S

Pagina 28

Define File Name Tokens4-13Define File Name TokensIn this section...“Default File Name Format” on page 4-13“Uses for File Name Tokens” on page 4-13De

Pagina 29 - #VRML V2.0 utf8

4 MATLAB Interface4-14expect to create files of different parts of the model simulation. This feature allowsyou to capture a frame or run a Simulink m

Pagina 30

File Name Tokens4-15File Name TokensThe following tokens are the same for frame capture (.tif or .png) or animation (.wrland .avi) files.Token Descri

Pagina 31

4 MATLAB Interface4-16Token Description%Y The current four-digit year replaces this token in the file name string.For example, the format %f_anim_%Y.w

Pagina 32

Manual 3-D VRML Recording with MATLAB4-17Manual 3-D VRML Recording with MATLABThis topic describes how to manually record a 3-D animation using the M

Pagina 33

4 MATLAB Interface4-18set(myworld,'Record3D','on');5Run the Simulink model. From the Simulation menu, select Mode > Normal, the

Pagina 34

Manual 2-D AVI Recording with MATLAB4-19Manual 2-D AVI Recording with MATLABThis topic describes how to manually record a 2-D animation using the MAT

Pagina 35

xiiiBlocks — Alphabetical List9Functions — Alphabetical List10Glossary

Pagina 36

4 MATLAB Interface4-20If the description string is unique, myworld is assigned the correct virtual world.4To retrieve the handle to the currently disp

Pagina 37

Manual 2-D AVI Recording with MATLAB4-21The Simulink 3D Animation software stops recording the animation. The Simulink3D Animation software creates t

Pagina 38

4 MATLAB Interface4-22Scheduled 3-D VRML Recording with MATLABThis topic describes how to schedule the recording of a 3-D animation using the MATLABin

Pagina 39

Scheduled 3-D VRML Recording with MATLAB4-234Direct the Simulink 3D Animation software to record the animation on a schedule bysetting the RecordMode

Pagina 40

4 MATLAB Interface4-24• From the keyboard, press Ctrl+T to stop the simulation.9Close and delete the objects if you do not want to continue using them

Pagina 41

Scheduled 2-D AVI Recording with MATLAB4-25Scheduled 2-D AVI Recording with MATLABThis topic describes how to schedule the recording of a 2-D animati

Pagina 42

4 MATLAB Interface4-263To retrieve the handle to the currently displayed Simulink 3D Animation Viewerfigure, typef=get(myworld,'Figures')4To

Pagina 43

Scheduled 2-D AVI Recording with MATLAB4-27The simulation runs. The Simulink 3D Animation software starts recordingwhen the simulation time reaches t

Pagina 44

4 MATLAB Interface4-28Record Animations for Unconnected Virtual WorldsThis topic describes how to programmatically record animation files for virtual

Pagina 45

Record Animations for Unconnected Virtual Worlds4-291Retrieve the corresponding vrworld object.2Set the Record3D vrworld property.3To override defaul

Pagina 47

4 MATLAB Interface4-30Because of the repetitive nature of the time interval setting, set the Time property ina loop from within a script or program.•

Pagina 48

Play Animation Files4-31Play Animation FilesIn this section...“Play VRML Animation Files” on page 4-31“Play AVI Animation Files” on page 4-32Play VRM

Pagina 49 - Installation

4 MATLAB Interface4-32The vrview command displays the default Simulink 3D Animation Viewer for theanimation file. Setting the TimeSource property of t

Pagina 50 - Set the Default Viewer

5Build Virtual Reality WorldsThe Simulink 3D Animation product includes tools that you can use to edit and createVRML virtual worlds. A basic understa

Pagina 51

5 Build Virtual Reality Worlds5-2VRML EditorsEditors for Virtual WorldsThere is more than one way to create a virtual world defined with VRML code. Fo

Pagina 52 - 2 Installation

VRML Editors5-3• “Native VRML Editors” on page 5-4• “3D World Editor” on page 5-4Text EditorsA VRML file uses a standard text format that you can rea

Pagina 53 - Set the Default Viewer

5 Build Virtual Reality Worlds5-4General 3-D editing tools target specific types of work. For example, they can targetvisual art, animation, games, or

Pagina 54

VRML Editors5-5• Tree structure pane — View the hierarchy for the virtual world that you are editing.The 3D World Editor lists the nodes and their pr

Pagina 55 - V-Realm Builder Help

5 Build Virtual Reality Worlds5-6Ligos V-Realm BuilderThe Ligos V-Realm Builder interface is available only for Windows operating systems.The V-Realm

Pagina 56 - Set the Default Editor

Build and Connect a Virtual World5-7Build and Connect a Virtual WorldIn this section...“Introduction” on page 5-7“Define the Problem” on page 5-7“Add

Pagina 57 - Set the Default Editor

1Getting Started• “Simulink 3D Animation Product Description” on page 1-2• “Expected Background” on page 1-3• “Build Virtual Worlds to Visualize Dynam

Pagina 58

5 Build Virtual Reality Worlds5-8The following table lists the positions and dimensions of the objects that you create forthis example.Object Center P

Pagina 59

Build and Connect a Virtual World5-91 to 0.4, and the y and z dimensions are expanded so that the volume of the deformedsphere-ellipsoid remains cons

Pagina 60

5 Build Virtual Reality Worlds5-104From the MATLAB Command Window, typevrlibThe Simulink 3D Animation library opens.5From the Library window, drag and

Pagina 61

Build and Connect a Virtual World5-11• In the left pane, a VRML tree with only a ROOT node• In the right pane, an empty virtual world• In the bottom

Pagina 62

5 Build Virtual Reality Worlds5-12aRight-click the Transform node.bSelect the Edit Name menu item.cIn the edit box to the left of the Transform node,

Pagina 63 - 3D World Editor Preferences

Build and Connect a Virtual World5-136Add a Material node to the Appearance node:aExpand the (Appearance) node and select the material(SFNode) node.

Pagina 64

5 Build Virtual Reality Worlds5-14With all the nodes expanded, the 3D World Editor now displays a box in the virtualworld display pane.8Make the box s

Pagina 65 - Figure Appearance Preferences

Build and Connect a Virtual World5-15aSelect the size property of the Box node.bIn the object properties edit pane at the bottom of the 3D World Edit

Pagina 66

5 Build Virtual Reality Worlds5-1610Add a second box that is very similar to the first box.aUnder the ROOT node, add a Transform node (see step 2) and

Pagina 67

Build and Connect a Virtual World5-1711Move the box that you just created to the left by changing the translationproperty of the B2(Transform) node.

Pagina 68

1 Getting Started1-2Simulink 3D Animation Product DescriptionAnimate, visualize, and interact with models in 3DSimulink 3D Animation provides apps for

Pagina 69

5 Build Virtual Reality Worlds5-18Create a SphereYour next task is to add a sphere between the two boxes. This section assumes you havecompleted the t

Pagina 70

Build and Connect a Virtual World5-195To make the sphere blue, under the Material node, select the diffuseColorproperty. In the object properties edi

Pagina 71 - Virtual World Preferences

5 Build Virtual Reality Worlds5-20Link to a Simulink ModelAfter you create a virtual world and a Simulink model, and add a VR Sink block to yourmodel,

Pagina 72

Build and Connect a Virtual World5-2110Double-click the VR Sink block.The viewer appears.11Select the Simulation menu Block Parameters option. Your d

Pagina 73

5 Build Virtual Reality Worlds5-2213In the Simulink window, from the Simulation menu, click Run.In your default viewer, you see a 3-D animation of the

Pagina 74 - Uninstall V-Realm Builder

Build and Connect a Virtual World5-23This example shows you how to create and use a very simple virtual reality model.Using the same method, you can

Pagina 75 - Test the Viewer Installation

5 Build Virtual Reality Worlds5-24VRML Data TypesIn this section...“Section Overview” on page 5-24“VRML Field Data Types” on page 5-24“VRML Data Class

Pagina 76

VRML Data Types5-25VRML Type Description Simulink 3D Animation TypeSFColor Vector of three floating-pointvalues you use for RGB colorspecification.Si

Pagina 77 - Test the Viewer Installation

5 Build Virtual Reality Worlds5-26To ensure backward compatibility with existing models and applications, use theSimulink 3D Animation vrsetpref funct

Pagina 78

VRML Data Types5-27eventInUsually, eventIn events correspond to a field in the node. Node fields are not accessiblefrom outside the node. The only wa

Pagina 79

Expected Background1-3Expected BackgroundTo help you effectively read and use this guide, here is a brief description of the chaptersand a suggested

Pagina 80

5 Build Virtual Reality Worlds5-28Simulink 3D Animation TexturesThe following are texture file recommendations for Simulink 3D Animation models:• Wher

Pagina 81

Add Sound to a Virtual World5-29Add Sound to a Virtual WorldTo add sound to a virtual world, use a VRML Sound node. You can include anAudioClip node

Pagina 82

5 Build Virtual Reality Worlds5-30Using CAD Models with the Simulink 3D Animation ProductIn this section...“Section Overview” on page 5-30“Import STL

Pagina 83

Using CAD Models with the Simulink 3D Animation Product5-311In the 3D World Editor, select the Root node or an MFNode node (usually thechildren node

Pagina 84

5 Build Virtual Reality Worlds5-32have VRML export filters, but there are conversion utilities available from third partiesif the export filter is not

Pagina 85

Using CAD Models with the Simulink 3D Animation Product5-33Level of Detail ConsiderationsCAD models are usually parametric models that use proprietar

Pagina 86

5 Build Virtual Reality Worlds5-34aircraft operation in space). For such navigation to be successful, the scene's author mustdefine the Navigatio

Pagina 87

Using CAD Models with the Simulink 3D Animation Product5-35rotating support — arm — wrist — hand — toolSo when the rotating support moves, all other

Pagina 88

5 Build Virtual Reality Worlds5-36If the pendulum dynamics model uses global coordinates for all moving parts, the VRMLmodel has a flat structure as s

Pagina 89

Using CAD Models with the Simulink 3D Animation Product5-37If the pendulum dynamics model uses local coordinates for moving parts, thecorresponding V

Pagina 90

1 Getting Started1-4Build Virtual Worlds to Visualize Dynamic SimulationsIn this section...“Virtual Reality World Models of Dynamic Systems” on page 1

Pagina 91

5 Build Virtual Reality Worlds5-38Some third-party tools allow you to export each part of the assembly into separate VRMLfiles. All parts are then ref

Pagina 92 - Open a Viewer Window

Using CAD Models with the Simulink 3D Animation Product5-39• “Wrap Shape Objects with Transforms” on page 5-39• “Add DEF Names” on page 5-39Wrap Shap

Pagina 93

5 Build Virtual Reality Worlds5-40DEF Robot_Arm1 Transform { children [ Inline { url ["robot_arm1.wrl"]

Pagina 94

Using CAD Models with the Simulink 3D Animation Product5-41objects in the scene hierarchy. For an example of a viewpoint moving with theobject, see t

Pagina 95

5 Build Virtual Reality Worlds5-421From the vrlib library, insert a VR Sink block into your Simulink model.2Double-click the VR Sink block to open the

Pagina 96

Using CAD Models with the Simulink 3D Animation Product5-43For converting such rotations into the VRML format, use the Rotation Matrix to VRMLRotatio

Pagina 97

5 Build Virtual Reality Worlds5-44center of rotation to coincide with the joint connecting thehand and the tool in the hand’s local coordinates.In a h

Pagina 98 - View Virtual World Remotely

Using CAD Models with the Simulink 3D Animation Product5-45a three-component vector in the VR Sink block. The remaining vector elements are filledwit

Pagina 99

5 Build Virtual Reality Worlds5-46appropriate coordinate systems attached to the bodies, with positions and rotationsdefined using global coordinates.

Pagina 100 - 3 Simulink Interface

Using CAD Models with the Simulink 3D Animation Product5-47When exporting products, the CATIA software creates one compound VRML file thatcontains al

Pagina 101 - View Virtual World Remotely

Build Virtual Worlds to Visualize Dynamic Simulations1-5Simulink, or SimMechanics. If your computer does not already have a graphics cardwith hardwar

Pagina 102

5 Build Virtual Reality Worlds5-48You can achieve best results by using the proportional method of tessellation (arcsare substituted by line segments

Pagina 103

Using CAD Models with the Simulink 3D Animation Product5-49these elements have synthetic DEF names (for example, _0161DC70). For the most part,you wi

Pagina 104 - Working with VRML Sensors

5 Build Virtual Reality Worlds5-50• CylinderSleeve1• PistonAssembly1• CrankshaftAssembly1The export does not preserve the CATProduct and CATPart names

Pagina 105 - Read VRML Sensor Values

Using CAD Models with the Simulink 3D Animation Product5-51• The main Transform representing the CATIA product is always scaled by a factorof 0.001 (

Pagina 106

5 Build Virtual Reality Worlds5-52Do not adjust parts in the scene that you do not want to control from the MATLABenvironment.• Scaling of VRML Object

Pagina 107 - Working with VRML Sensors

6Using the 3D World Editor• “3D World Editor” on page 6-2• “Open the 3D World Editor” on page 6-5• “3D World Editor Panes” on page 6-7• “Create a Virt

Pagina 108

6 Using the 3D World Editor6-23D World EditorIn this section...“Supported Platforms” on page 6-2“Use with Other Editors” on page 6-2“VRML Support” on

Pagina 109 - Interact with Generated Code

3D World Editor6-3For general VRML limitations relating to the Simulink 3D Animation software as awhole, see “VRML Compatibility”.PixelTexture NodesY

Pagina 110

6 Using the 3D World Editor6-4To access templates, use one of the following approaches:• Select File > New From Template.•Select the New File From

Pagina 111 - MATLAB Interface

Open the 3D World Editor6-5Open the 3D World EditorIn this section...“3D World Editor Is the Default Editor” on page 6-5“Open an Empty Virtual World”

Pagina 112 - 4 MATLAB Interface

How to Contact MathWorksLatest news:www.mathworks.comSales and services:www.mathworks.com/sales_and_servicesUser community:www.mathworks.com/matlabcen

Pagina 113

1 Getting Started1-6Invalid MEX-file 'matlab/toolbox/sl3d/sl3d/vrsfunc.mexglx':libGL.so: cannot open shared object file If you see an error

Pagina 114

6 Using the 3D World Editor6-6Open a Saved Virtual WorldUse one of these approaches to open a saved virtual world.• From the MATLAB Current Folder pan

Pagina 115

3D World Editor Panes6-73D World Editor PanesThe 3D World Editor provides three panes:• Tree structure pane — View the hierarchy for the virtual worl

Pagina 116

6 Using the 3D World Editor6-8elements are called nodes. The 3D World Editor lists the nodes and their propertiesaccording to their respective VRML no

Pagina 117

Create a Virtual World6-9Create a Virtual WorldThere are a number of tasks involved in creating a virtual world. You can use the 3DWorld Editor throu

Pagina 118

6 Using the 3D World Editor6-10• You can use Orbisnap to view library objects to determine which objects you wantto insert into the virtual world.7In

Pagina 119

Basic Editing6-11Basic EditingIn this section...“Add Objects” on page 6-11“Copy and Paste a Node” on page 6-12“Edit Object Properties” on page 6-13“D

Pagina 120 - Animation Recording

6 Using the 3D World Editor6-12Approach Procedure2Select Nodes > Add.3Select appropriate submenus to add the node thatyou want.Use a context menu f

Pagina 121 - Animation Recording

Basic Editing6-13• An explicit text copy allows you to edit properties of that node, independently fromthe original node that you copied.• A referenc

Pagina 122 - File Name Tokens

6 Using the 3D World Editor6-14Set Viewpoint Values in the 3D World Editor Based on Camera PositionYou can use the current camera position to interact

Pagina 123 - Define File Name Tokens

Basic Editing6-15Document a Virtual World Using CommentsTo document a virtual world, in the object property edit pane, use the Comments tabfor nodes

Pagina 124

Build Virtual Worlds to Visualize Dynamic Simulations1-7• Simulink model• SimMechanics model• MATLAB virtual world objectSimulinkThe Simulink 3D Anim

Pagina 125

6 Using the 3D World Editor6-16Wrap Nodes as Children of Another NodeTo wrap contiguous nodes as children of another node:1Select the nodes. You can u

Pagina 126

Basic Editing6-17• On the toolbar, click the scissors button.• Select Edit > Cut.• Right-click the node and select Cut.Save and Export Virtual Wo

Pagina 127

6 Using the 3D World Editor6-182Select the appropriate Add Interface Item menu option.The following is an example of a Script node in the Tree structu

Pagina 128

Reduce Number of Polygons for Shapes6-19Reduce Number of Polygons for ShapesFor a node that is, or includes, an IndexedFaceSet node, you can improve

Pagina 129

6 Using the 3D World Editor6-20Virtual World Navigation in 3D World EditorIn this section...“Specify Virtual World Rendering” on page 6-20“Basic Navig

Pagina 130

Virtual World Navigation in 3D World Editor6-21To hide the triad for a virtual world, or to change the location of the triad in the virtualworld disp

Pagina 131

6 Using the 3D World Editor6-22You can also use toolbar buttons to set view panes:When the grid view panes are open, if you change the view pane optio

Pagina 132

Virtual World Navigation in 3D World Editor6-23Pivot PointIn Examine mode, you can use a pivot point for rotating a virtual world around a point,usin

Pagina 133

6 Using the 3D World Editor6-243D World Editor LibraryIn this section...“3D World Editor Library Objects” on page 6-24“Add a Library Object” on page 6

Pagina 134

3D World Editor Library6-25• The first Transform node of the file that you select from another location is insertedin place into the tree view of the

Pagina 135

1 Getting Started1-8From the MATLAB software, you can set positions and properties of VRML objects,create callbacks from graphical interfaces, and map

Pagina 137

7Viewing Virtual Worlds• “VRML Viewers” on page 7-2• “Simulink 3D Animation Viewer” on page 7-4• “Open the Simulink 3D Animation Viewer” on page 7-8•

Pagina 138

7 Viewing Virtual Worlds7-2VRML ViewersIn this section...“Host and Remote Viewing” on page 7-2“Sound” on page 7-3“Comparison of Viewers” on page 7-3“L

Pagina 139

VRML Viewers7-3SoundOther Web viewers may allow for sound playback, but are not officially supported. To addsound to a virtual world, you can include

Pagina 140

7 Viewing Virtual Worlds7-4Simulink 3D Animation ViewerIn this section...“What You Can Do with the Viewer” on page 7-4“Viewer Uses MATLAB Figures” on

Pagina 141 - Play Animation Files

Simulink 3D Animation Viewer7-51Select a Simulink 3D Animation example and type that example’s name in theMATLAB Command Window. For example:vrpendTh

Pagina 142

7 Viewing Virtual Worlds7-6Note The Simulink 3D Animation viewer settings are saved when you save yourmodel file.Viewer Uses MATLAB FiguresThe Simulin

Pagina 143 - Build Virtual Reality Worlds

Simulink 3D Animation Viewer7-7• Treat the viewer window like a MATLAB figure. This ability enables you to performMATLAB figure actions such as dock

Pagina 144 - VRML Editors

7 Viewing Virtual Worlds7-8Open the Simulink 3D Animation ViewerIn this section...“Open from the VR Sink Block” on page 7-8“Open from the Command Line

Pagina 145 - VRML Editors

Simulate with the Simulink 3D Animation Viewer7-9Simulate with the Simulink 3D Animation ViewerYou can start and stop simulations of the virtual worl

Pagina 146

Build Virtual Worlds to Visualize Dynamic Simulations1-9Simulink 3D Animation software is running. This allows others to view an animatedvirtual worl

Pagina 147

7 Viewing Virtual Worlds7-10Specify Rendering TechniquesYou can change the rendering of the scene through the controls on the navigation panelor optio

Pagina 148

Specify Rendering Techniques7-11You can turn the camera headlight and the lighting of the scene on or off. WhenHeadlight is off, the camera does not

Pagina 149 - Define the Problem

7 Viewing Virtual Worlds7-12Note It is helpful to define enough lighting within the virtual scene so that it is litregardless of the Headlight setting

Pagina 150

Specify Rendering Techniques7-13If Transparency is off, transparent objects are rendered as solid objects.

Pagina 151

7 Viewing Virtual Worlds7-14Turning Wireframe on changes the scene's objects from solid to wireframe rendering.The following is the vrpend exampl

Pagina 152 - Open a New Virtual World

Specify Rendering Techniques7-15If Textures is on, objects have texture in the virtual scene. The following is thevrplanets example with Textures on.

Pagina 153 - Add VRML Nodes

7 Viewing Virtual Worlds7-16If Textures is off, objects do not have texture in the virtual scene. The following is thevrplanets example with Textures

Pagina 154

Specify Rendering Techniques7-17You can specify the maximum size of a texture used in rendering the vrfigure object.This option gives you a list of t

Pagina 155

7 Viewing Virtual Worlds7-18Navigate Using the Simulink 3D Animation ViewerIn this section...“Basic Navigation” on page 7-18“Navigation Panel” on page

Pagina 156

Navigate Using the Simulink 3D Animation Viewer7-19Navigation methods — Navigation with the mouse depends on the navigation methodthat you select and

Pagina 157

1 Getting Started1-10Virtual Reality Modeling Language (VRML)In this section...“VRML History” on page 1-10“VRML Support” on page 1-11“VRML Compatibili

Pagina 158

7 Viewing Virtual Worlds7-20From the menu bar, select the View menu Navigation Zones option. The virtualscene changes as the navigation zones are togg

Pagina 159

Navigate Using the Simulink 3D Animation Viewer7-21If you have multiple viewers open, the navigation panel in the active viewer is blue.Minimize the

Pagina 160

7 Viewing Virtual Worlds7-22Viewer Keyboard ShortcutsNavigation Function Keyboard ShortcutUse full-screen mode. Ctrl+fUndo move. BackspaceStart or sto

Pagina 161

Navigate Using the Simulink 3D Animation Viewer7-23Navigation Function Keyboard ShortcutPressing Ctrl alone acquires the examine lockat the point of

Pagina 162 - Link to a Simulink Model

7 Viewing Virtual Worlds7-24If your virtual world contains sensors, these sensors take precedence over mousenavigation at the sensor's location.

Pagina 163

Navigate Using the Simulink 3D Animation Viewer7-252In the Simulink Editor window, from the Simulation menu, choose Run.The example starts running.3C

Pagina 164

7 Viewing Virtual Worlds7-26parallel with global x, y, and z coordinate axes. As you navigate in a virtual world, thetriad display changes to reflect

Pagina 165

Navigate Using the Simulink 3D Animation Viewer7-27To set the pivot point in a virtual world, hold CRTL and double-click the spot where youwant the p

Pagina 166 - VRML Data Types

7 Viewing Virtual Worlds7-28ViewpointsVisitors to your virtual world are navigating in an environment you create for them,using navigation methods all

Pagina 167 - VRML Data Types

Viewpoints7-29• Dynamic -- Created as children of moving objects (objects controlled from MATLABor Simulink) or linked to moving objects with the VRM

Pagina 168 - VRML Data Class Types

Virtual Reality Modeling Language (VRML)1-11VRML97 represents an open and flexible platform for creating interactive three-dimensional scenes (virtua

Pagina 169

7 Viewing Virtual Worlds7-30Define and Reset ViewpointsIn this section...“Reset Viewpoints” on page 7-30“Define Viewpoints” on page 7-30Reset Viewpoin

Pagina 170

Define and Reset Viewpoints7-31In the Simulink 3D Animation viewer, the default viewpoint for this model is Viewfrom top.2From the menu bar, choose t

Pagina 171 - Add Sound to a Virtual World

7 Viewing Virtual Worlds7-3213Repeat steps 2 to 6.14In the Placement field, select Sibling of the current viewpoint. This optioncreates a new viewpoin

Pagina 172 - Section Overview

Define and Reset Viewpoints7-33

Pagina 173

7 Viewing Virtual Worlds7-34Navigate Through ViewpointsYou can navigate through a virtual scene's viewpoints using the menu bar, toolbar,navigati

Pagina 174

Navigate Through Viewpoints7-353Select the drop-down list on the leftmost side of the toolbar to see the list of existingviewpoints from the toolbar.

Pagina 175

7 Viewing Virtual Worlds7-36When you add new viewpoints to the world, these lists are updated to reflect the newviewpoints.The current viewpoint is al

Pagina 176

Navigate Through Viewpoints7-37• Go to the virtual world's default viewpoint• Create and remove viewpoints• Navigate to an existing viewpoint

Pagina 177

7 Viewing Virtual Worlds7-38Record Offline AnimationsIn this section...“Animation Recording” on page 7-38“Recording Formats” on page 7-38“File Names”

Pagina 178

Record Offline Animations7-39• 3-D VRML file — The Simulink 3D Animation software traces object movementsand saves that data into a VRML file using V

Pagina 179

1 Getting Started1-12The software analyzes the structure of the virtual world, determines what signals areavailable, and makes them available from the

Pagina 180 - CAD Virtual World Modeling

7 Viewing Virtual Worlds7-40associated with the model and %n is a number that increments each time you record asimulation for the same virtual world.

Pagina 181

Record Offline Animations7-411In the MATLAB Command Window, type the model name. For example:vrplanetsThe Simulink model is displayed. Also, by defau

Pagina 182

7 Viewing Virtual Worlds7-42Record Files in the Audio Video Interleave (AVI) FormatTo create a 2-D AVI format file from a Simulink model execution, se

Pagina 183 - Link to CAD Virtual Worlds

Record Offline Animations7-43Set FPS to auto if you want to use the sample time of the associated VR Sink blockto make the file playback correspond t

Pagina 184

7 Viewing Virtual Worlds7-44quality numbers result in lower video quality and smaller file sizes. You need tospecify an identification string of a cod

Pagina 185

Record Offline Animations7-453From the Record mode list, choose Scheduled.The Start time and Stop time text fields are enabled.4Enter in Start time a

Pagina 186

7 Viewing Virtual Worlds7-46Ensure that the recording start time value is not earlier than the start time of theSimulink model; the recording operatio

Pagina 187

Play Animations with Simulink 3D Animation Viewer7-47Play Animations with Simulink 3D Animation ViewerYou can use the Simulink 3D Animation You can a

Pagina 188

7 Viewing Virtual Worlds7-48Configure Frame Capture ParametersThis topic describes how to configure and capture a frame, using the vrplanets exampleas

Pagina 189

Capture Frames7-49Capture FramesThe Simulink 3D Animation product allows you to save a frame snapshot (capture) ofthe current Simulink 3D Animation v

Pagina 190

Virtual Reality Modeling Language (VRML)1-13VRML Coordinate System

Pagina 191

7 Viewing Virtual Worlds7-50Simulink 3D Animation Web ViewerUse the Simulink 3D Animation Web Viewer to access virtual worlds with an HTML5-enabled We

Pagina 192

Open the Web Viewer7-51Open the Web ViewerIn this section...“Set Up for Remote Viewing” on page 7-51“Connect the Web Viewer” on page 7-51Set Up for R

Pagina 193

7 Viewing Virtual Worlds7-52Note: If you need to change the HTTP port (for example, if a firewall blocks a port),set a different port number and resta

Pagina 194

Navigate Using the Web Viewer7-53Navigate Using the Web ViewerIn this section...“Display and Navigation” on page 7-53“Keyboard Shortcuts” on page 7-5

Pagina 195 - Using the 3D World Editor

7 Viewing Virtual Worlds7-54Navigation Function Keyboard ShortcutReturn to current viewpoint. RGo to previous viewpoint. Page UpGo to next viewpoint.

Pagina 196 - 3D World Editor

Navigate Using the Web Viewer7-55• Figure > Appearance > Navigation zonesTo access the preferences, from the MATLAB Toolstrip, in the Home tab,

Pagina 197 - 3D World Editor

7 Viewing Virtual Worlds7-56Legacy Simulink 3D Animation ViewerIn this section...“Introduction” on page 7-56“Starting the Legacy Viewer” on page 7-56“

Pagina 198 - 6 Using the 3D World Editor

Legacy Simulink 3D Animation Viewer7-57 DefaultFigureMaxTextureSize: 'auto' DefaultFigureNavPanel: 'ha

Pagina 199 - Open the 3D World Editor

7 Viewing Virtual Worlds7-58To revert to the original default viewer, typevrsetpref('DefaultViewer','internal') Differences Betwee

Pagina 200

Legacy Simulink 3D Animation Viewer7-59• In the legacy viewer, you cannot combine multiple figures in several tiles of aMATLAB figure.The legacy and

Pagina 201 - 3D World Editor Panes

1 Getting Started1-14The VRML coordinate system is different from the MATLAB and Aerospace Blockset™coordinate systems. VRML uses the world coordinate

Pagina 202

7 Viewing Virtual Worlds7-60Listen to Sound in a Virtual WorldIn this section...“System Requirements for Sound” on page 7-60“Listen to Sound” on page

Pagina 203 - Create a Virtual World

Listen to Sound in a Virtual World7-61For a vr.canvas object, to disable sound , set the Sound property to 'off'.To control volume, use you

Pagina 204

7 Viewing Virtual Worlds7-62View a Virtual World in Stereoscopic VisionIn this section...“Enable Stereoscopic Vision” on page 7-62“Control Stereoscopi

Pagina 205 - Basic Editing

View a Virtual World in Stereoscopic Vision7-63Control Stereoscopic EffectsYou can control the following stereoscopic effects interactively or using

Pagina 206

7 Viewing Virtual Worlds7-64Active Stereoscopic Vision ConfigurationIn this section...“Computer Platforms” on page 7-64“Graphics Cards” on page 7-64“D

Pagina 207 - Edit Object Properties

Active Stereoscopic Vision Configuration7-65• 3D television set that displays 3D content. For stereoscopic vision, you typically useactive shutter gl

Pagina 209 - Expand and Collapse Nodes

8Simulink 3D Animation Stand-AloneViewerThe Simulink 3D Animation stand-alone viewer, Orbisnap, allows you to visualize virtualworlds or prerecorded a

Pagina 210

8 Simulink 3D Animation Stand-Alone Viewer8-2Orbisnap ViewerWhat is Orbisnap?The Simulink 3D Animation product includes Orbisnap. Orbisnap is a free,

Pagina 211 - Edit VRML Scripts

Install Orbisnap8-3Install OrbisnapIn this section...“Section Overview” on page 8-3“System Requirements” on page 8-3“Copying Orbisnap to Another Loca

Pagina 212

Virtual Reality Modeling Language (VRML)1-15gives you a good understanding of how the virtual world elements can be controlled usingSimulink 3D Anima

Pagina 213

8 Simulink 3D Animation Stand-Alone Viewer8-4Adding Shortcuts or Symbolic LinksFor convenience, you can create a shortcut (Windows) or symbolic link (

Pagina 214

Start Orbisnap8-5Start OrbisnapYou can start Orbisnap from any command line with the following:orbisnaporbisnap -f vr_filenameorbisnap -c hostname -w

Pagina 215 - View Panes

8 Simulink 3D Animation Stand-Alone Viewer8-6Orbisnap InterfaceIn this section...“Menu Bar” on page 8-8“Toolbar” on page 8-9“Navigation Panel” on page

Pagina 216

Orbisnap Interface8-7Orbisnap provides much of the functionality of the Simulink 3D Animation Viewer.Using the menu bar, toolbar, and navigation pane

Pagina 217 - Pivot Point

8 Simulink 3D Animation Stand-Alone Viewer8-8• Customize the Orbisnap window• Manage virtual world viewpoints• Manage scene renderingYou cannot• Open

Pagina 218 - 3D World Editor Library

Orbisnap Interface8-9• Navigation Panel — Controls the display of the navigation panel, includingtoggling it.• Triad — Shows red, green, and blue arr

Pagina 219 - 3D World Editor Library

8 Simulink 3D Animation Stand-Alone Viewer8-10• Hide panel — Toggles the navigation panel.• Full-screen mode— Uses the whole screen for Orbisnap.• Nex

Pagina 220

Navigate Using Orbisnap8-11Navigate Using OrbisnapYou can navigate around a virtual world using the menu bar, toolbar, navigation panel,mouse, and ke

Pagina 221

8 Simulink 3D Animation Stand-Alone Viewer8-12Movement Mode Zone and DescriptionExamine Outer -- Click and drag the mouse up and down to move forwarda

Pagina 222 - VRML Viewers

Navigate Using Orbisnap8-13Keyboard Command Navigation FunctionEsc Go to default viewpoint.Home Return to current viewpoint.Page Up, Page Down Move b

Pagina 223 - Legacy Viewer

Revision HistoryAugust 2001 First printing New for Version 2.0 (Release 12.1)July 2002 Second printing Revised for Version 3.0 (Release 13)October 200

Pagina 224 - Simulink 3D Animation Viewer

1 Getting Started1-16# This is a comment lineWorldInfo { title "Bouncing Ball" }Viewpoint { position 0 5 30 description "Side View&

Pagina 225 - Simulink 3D Animation Viewer

8 Simulink 3D Animation Stand-Alone Viewer8-14View Animations or Virtual Worlds with OrbisnapThis topic assumes that you have a prerecorded WRL animat

Pagina 226 - 7 Viewing Virtual Worlds

View Virtual Worlds Remotely with Orbisnap8-15View Virtual Worlds Remotely with OrbisnapTo view virtual worlds from the Simulink 3D Animation server

Pagina 227

8 Simulink 3D Animation Stand-Alone Viewer8-163Enter the IP address or hostname of the host computer running the Simulink 3DAnimation server (127.0.0.

Pagina 228

View Virtual Worlds Remotely with Orbisnap8-174Select a virtual world.5Click OK.Orbisnap displays the selected virtual world of the remote Simulink 3

Pagina 230 - Specify Rendering Techniques

9Blocks — Alphabetical List

Pagina 231 - Specify Rendering Techniques

9 Blocks — Alphabetical List9-2Cross ProductCross product of two 3-D vectorsLibrarySimulink 3D AnimationDescriptionTakes two 3-by-1 vectors as input a

Pagina 232

Joystick Input9-3Joystick InputProcess input from asynchronous joystick deviceLibrarySimulink 3D AnimationDescriptionThe Joystick Input block provide

Pagina 233

9 Blocks — Alphabetical List9-4Block Parameters Dialog BoxJoystick ID — The system ID assigned to the given joystick device. You can find thepropertie

Pagina 234

Joystick Input9-5Output Port Value DescriptionAxes Vector of doubles in the range <-1; 1 >Outputs correspond to thecurrent position of the joys

Pagina 235

Virtual Reality Modeling Language (VRML)1-17

Pagina 236

9 Blocks — Alphabetical List9-6Normalize VectorUnit vector parallel to input vectorLibrarySimulink 3D AnimationDescriptionTakes an input vector of any

Pagina 237

Rotation Between 2 Vectors9-7Rotation Between 2 VectorsVRML rotation between two 3-D vectorsLibrarySimulink 3D AnimationDescriptionTakes input of two

Pagina 238

9 Blocks — Alphabetical List9-8Rotation Matrix to VRML RotationConvert rotation matrix into representation used in VRMLLibrarySimulink 3D AnimationDes

Pagina 239

Rotation Matrix to VRML Rotation9-9Rotation MatrixA representation of a three-dimensional spherical rotation as a 3-by-3 real, orthogonalmatrix R: RT

Pagina 240

9 Blocks — Alphabetical List9-10Space Mouse InputProcess input from space mouse deviceLibrarySimulink 3D AnimationDescriptionA space mouse is a device

Pagina 241

Space Mouse Input9-11Block Parameters Dialog Box

Pagina 242

9 Blocks — Alphabetical List9-12Port — Serial port to which the space mouse is connected. Possible values areUSB1...USB4 and COM1...COM4.Output Type —

Pagina 243 - Mouse Navigation

Space Mouse Input9-13Upper position limit — Position coordinates for the upper limit of the mouse.See AlsoManipulator with SpaceMouse

Pagina 244

9 Blocks — Alphabetical List9-14Viewpoint Direction to VRML OrientationConvert viewpoint direction to VRML orientationLibrarySimulink 3D AnimationDesc

Pagina 245

VR Placeholder9-15VR PlaceholderSend unspecified value to Simulink 3D Animation blockLibrarySimulink 3D AnimationDescriptionThe VR Placeholder block

Pagina 246

1 Getting Started1-18Virtual Reality World and Dynamic System ExamplesIn this section...“Simulink Interface Examples” on page 1-18“MATLAB Interface Ex

Pagina 247

9 Blocks — Alphabetical List9-16Block Parameters Dialog BoxOutput Width — Length of the vector containing placeholder signal values.

Pagina 248 - Viewpoints

VR Signal Expander9-17VR Signal ExpanderExpand input vectors into fully qualified VRML field vectorsLibrarySimulink 3D AnimationDescriptionThe VR Sig

Pagina 249 - Viewpoints

9 Blocks — Alphabetical List9-18Block Parameters Dialog BoxOutput width — How long the output vector should be.Output signal indices — Vector indicati

Pagina 250 - Define and Reset Viewpoints

VR Sink9-19VR SinkWrite data from Simulink model to virtual worldLibrarySimulink 3D AnimationDescriptionThe VR Sink block writes values from its port

Pagina 251 - Define and Reset Viewpoints

9 Blocks — Alphabetical List9-20Desktop Real-Time, some sink blocks and Sim Viewing Device blocks stay in Normalmode during simulation, receive data f

Pagina 252

VR Sink9-21Source file — VRML file name specifying the virtual world that connects to this block.By default, the full path to the associated .wrl fil

Pagina 253

9 Blocks — Alphabetical List9-22Nodes that have names are marked with red arrows. You can access them from theSimulink 3D Animation interface. Nodes w

Pagina 254 - Navigate Through Viewpoints

VR Source9-23VR SourceRead data from virtual world to Simulink modelLibrarySimulink 3D AnimationDescriptionThe VR Source provides access to virtual w

Pagina 255 - Navigate Through Viewpoints

9 Blocks — Alphabetical List9-24window opens with the same parameters that were saved, such as position, size, andnavigation mode. When closing the vi

Pagina 256

VR Source9-25Source file — VRML file name specifying the virtual world that connects to this block.By default, the full path to the associated .wrl f

Pagina 257

Virtual Reality World and Dynamic System Examples1-19The following table lists the Simulink examples provided with the Simulink 3DAnimation product.

Pagina 258 - Record Offline Animations

9 Blocks — Alphabetical List9-26SFxxx field that can map to a variable-size signal. For details about these data types, see“VRML Field Data Types”.Not

Pagina 259 - File Names

VR Text Output9-27VR Text OutputAllows display of Simulink signal values as text in VRML sceneLibrarySimulink 3D AnimationDescriptionThe VR Text Outp

Pagina 260

9 Blocks — Alphabetical List9-28Block Parameters Dialog BoxAssociated VRML file — VRML file specifying the virtual world to which text isoutput.Associ

Pagina 261 - Record Offline Animations

VR Text Output9-29string is recycled through the components of the input vector. This block does not supportthe %c and %s conversion formats, as sign

Pagina 262

9 Blocks — Alphabetical List9-30VR To VideoWrite data from Simulink model to virtual world (video output port enabled)LibrarySimulink 3D AnimationDesc

Pagina 263

VR Tracer9-31VR TracerTrace trajectory of object in associated virtual sceneLibrarySimulink 3D AnimationDescriptionTrace the trajectory of an object

Pagina 264

9 Blocks — Alphabetical List9-32Block Parameters Dialog BoxFollowing is the Main pane of the VR Tracer block dialog box.

Pagina 265

VR Tracer9-33

Pagina 266

9 Blocks — Alphabetical List9-34Following is the Marker Projections pane of the VR Tracer block dialog box.Associated VRML file — VRML file name speci

Pagina 267

VR Tracer9-35• Pyramid• Box• Octahedron• SphereConnect markers with line segments — Select this check box to connect the tracedobject path with lines

Pagina 268

1 Getting Started1-20Bouncing Ball Example (vrbounce)The vrbounce example represents a ball bouncing from a floor. The ball deforms as ithits the floo

Pagina 269 - Capture Frames

9 Blocks — Alphabetical List9-36to project the position of the object. The coefficients are in the form ax+by+cz+d=0.For example, if you use the defau

Pagina 270

10Functions — Alphabetical List

Pagina 271 - Open the Web Viewer

10 Functions — Alphabetical List10-2stl2vrmlConvert STL files to VRML formatSyntaxstl2vrml(source)stl2vrml(source,destination)Descriptionstl2vrml(sour

Pagina 272

stl2vrml10-3destination(Optional) Folder in which to create converted files. If the destination folder does notexist, stl2vrml attempts to create the

Pagina 273 - Navigate Using the Web Viewer

10 Functions — Alphabetical List10-4need to add lights, viewpoints, and surrounding objects, modify part materials, definenavigation speeds, or make o

Pagina 274

vrcadcleanup10-5vrcadcleanupClean up VRML file exported from CAD toolsSyntaxvrcadcleanup('filename')vrcadcleanup('filename', &apo

Pagina 275

10 Functions — Alphabetical List10-6The function also performs the following:• Upon output, discards any additional nodes, including transform nodes,

Pagina 276

vr.canvas class10-7vr.canvas classCreate virtual reality canvasDescriptionCreate a virtual reality canvas.ConstructionvirtualCanvas = vr.canvas(world

Pagina 277

10 Functions — Alphabetical List10-8parent — Figure or uipanel for displaying canvasfigure object | uipanel objectFigure or uipanel for displaying the

Pagina 278

vr.canvas class10-9Smooth textures using antialising, specified as 'on' or 'off'. Antialiasing smoothstextures by interpolating v

Pagina 279

Virtual Reality World and Dynamic System Examples1-21Portal Crane with Joystick Control (vrcrane_joystick)The vrcrane_joystick example illustrates ho

Pagina 280

10 Functions — Alphabetical List10-10Headlight from camera, specified as 'on' or 'off'. If you specify 'off', the camera

Pagina 281

vr.canvas class10-11'NavZones' — Display navigation zones'off' (default) | 'on'Navigation zones display, specified as &

Pagina 282

10 Functions — Alphabetical List10-12Data Types: int32'Stereo3DCameraOffset' — Distance of left and right camera for stereoscopic visionnon-

Pagina 283 - Control Stereoscopic Effects

vr.canvas class10-13'Units' — Units for Position property'pixels' (default) | 'normalized'Units for Position property,

Pagina 284

10 Functions — Alphabetical List10-14Camera movement with the current viewpoint, returned as 'on' or 'off'.CameraDirection — Camer

Pagina 285

vr.canvas class10-15ExaminePivotPoint — Pivot point about which camera rotates in examine navigationmodevector of three doublesPivot point about whic

Pagina 286

10 Functions — Alphabetical List10-16NavZones — Display navigation zones'off' (default) | 'on'Navigation zones display, returned a

Pagina 287

vr.canvas class10-17Stereoscopic vision mode, returned as 'off', 'anaglyph', 'active' or avr.utils.stereo3d object.Spec

Pagina 288 - Orbisnap Viewer

10 Functions — Alphabetical List10-18Transparency effect, returned as 'on' or 'off'.Triad — Triad location'bottomleft' (

Pagina 289 - Install Orbisnap

vr.canvas class10-19ExamplesCreate a Canvas That Displays in a FigureCreate and open a vrworld object.myWorld = vrworld('vrlights.wrl');ope

Pagina 290

1 Getting Started1-22Portal Crane with Predefined Trajectory Example (vrcrane_traj)The vrcrane_traj example is based on the vrcrane_joystick example,

Pagina 291 - Start Orbisnap

10 Functions — Alphabetical List10-20Create a Canvas in a UipanelCreate a figure.pf = figure;Create a uipanel in the figure and specify a title.pp1 =

Pagina 292 - Orbisnap Interface

vr.canvas class10-21Create a canvas in the uipanel.c = vr.canvas(w,pp1);Set Property Values of CanvasSet the camera direction, navigation mode, and s

Pagina 293 - Orbisnap Interface

10 Functions — Alphabetical List10-22myStereo3D = vr.utils.stereo3d.ANAGLYPH_RED_CYAN;Create a canvas. Define non-default values for some properties.m

Pagina 294 - Menu Bar

vr.canvas class10-23• “Create vrworld Object for a Virtual World”• “MATLAB Interaction”• “View a Virtual World in Stereoscopic Vision”See Alsovr.util

Pagina 295 - Navigation Panel

10 Functions — Alphabetical List10-24captureClass: vr.canvasCapture virtual reality canvas imageSyntaximage_capture = capture(canvas)Descriptionimage_

Pagina 296

capture10-25lights_world = vrworld('vrlights.wrl');open(lights_world);Create a vr.canvas object for lights_world.c = vr.canvas(lights_world

Pagina 297 - Navigate Using Orbisnap

10 Functions — Alphabetical List10-26vrclearRemove all closed virtual worlds from memorySyntaxvrclearvrclear('-force')DescriptionThe vrclear

Pagina 298

vrclose10-27vrcloseClose virtual reality figure windowsSyntaxvrclosevrclose allDescriptionvrclose and vrclose all close all the open virtual reality

Pagina 299 - Navigate Using Orbisnap

10 Functions — Alphabetical List10-28vrdir2oriConvert viewpoint direction to orientationSyntaxvrdir2ori(d)vrdir2ori(d,options)Descriptionvrdir2ori(d)

Pagina 300

vrdrawnow10-29vrdrawnowUpdate virtual worldSyntaxvrdrawnowDescriptionvrdrawnow removes from the queue pending changes to the virtual world and makest

Pagina 301

Virtual Reality World and Dynamic System Examples1-23For more details on how to read values from virtual worlds programmatically, see“Working with VR

Pagina 302

10 Functions — Alphabetical List10-30vreditOpen 3D World EditorSyntaxw = vreditw = vredit(filename)Descriptionw = vredit opens the 3D World Editor wit

Pagina 303

vrfigure class10-31vrfigure classCreate virtual reality figureDescriptionCreates a virtual reality figure.To access vrfigure properties, use the vrfi

Pagina 304

10 Functions — Alphabetical List10-32Position — Figure location and sizevector with four elementsLocation and size of virtual figure, specified as the

Pagina 305

vrfigure class10-33capture Capture virtual reality figure imageclose Close virtual reality figureget Return property value of vrfigure objectisval

Pagina 306 - Cross Product

10 Functions — Alphabetical List10-34• “Create vrworld Object for a Virtual World”• “MATLAB Interaction”• “View a Virtual World in Stereoscopic Vision

Pagina 307 - Joystick Input

vrfigure class10-35See Alsovr.utils.stereo3d class | vr.canvas classIntroduced before R2006a

Pagina 308 - Block Parameters Dialog Box

10 Functions — Alphabetical List10-36captureClass: vrfigureCapture virtual reality figure imageSyntaximage_capture = capture(figure)Descriptionimage_c

Pagina 309 - Joystick Input

capture10-37myworld = vrworld('vrmount.wrl');open(myworld);View the virtual world in the Simulink 3D Animation Viewer.f = vrfigure(myworld)

Pagina 310 - Normalize Vector

10 Functions — Alphabetical List10-38closeClass: vrfigureClose virtual reality figureSyntaxclose(figure)Descriptionclose(figure) closes the virtual re

Pagina 311 - Rotation Between 2 Vectors

close10-39Introduced before R2006a

Pagina 312 - Description

1 Getting Started1-24The VRML model represents a nuclear hot chamber manipulator. It is manipulated by asimple Simulink model containing the Space Mou

Pagina 313 - Rotation Matrix

10 Functions — Alphabetical List10-40getClass: vrfigureReturn property value of vrfigure objectSyntaxget(figure)figureProp = get(figure,propertyName)D

Pagina 314 - Space Mouse Input

get10-41vrfigure Property MeaningCameraDirectionAbs Camera direction in the world coordinates.(read-only property).CameraPosition Camera position in

Pagina 315

10 Functions — Alphabetical List10-42vrfigure Property MeaningRecord2DCompressMethodCompression method for creating 2-D animation files. See profile i

Pagina 316 - 9 Blocks — Alphabetical List

get10-43vrfigure Property MeaningWorld Virtual world that the figure displays(read-only property).ZoomFactor Camera zoom factor.Output Argumentsfigur

Pagina 317 - See Also

10 Functions — Alphabetical List10-44 DeleteFcn: '' ExaminePivotPoint: [0 0 0] Fullscreen: 'o

Pagina 318

get10-45VR Car in the Mountains• “MATLAB Interaction”• “Create vrworld Object for a Virtual World”• “View a Virtual World in Stereoscopic Vision”See

Pagina 319 - VR Placeholder

10 Functions — Alphabetical List10-46isvalidClass: vrfigureCheck validity of vrfigure object handlesSyntaxvalid_handles = isvalid(vrfigure_vector)Desc

Pagina 320

isvalid10-47ExamplesCheck Validity of Figure HandlesCheck whether the figure handles of the vrfigure object are valid. The first checkshows that the

Pagina 321 - VR Signal Expander

10 Functions — Alphabetical List10-48setClass: vrfigureSet property values of vrfigure objectSyntaxset(figure,PropertyName,Value,...,PropertyName,Valu

Pagina 322

set10-49'CameraBound' — Camera movement with current viewpoint'on' (default) | 'off'Camera movement with the current vi

Pagina 323

Virtual Reality World and Dynamic System Examples1-25• Simple collision detection• Simulation of haptic effectsThe VR Source block supports using glo

Pagina 324 - Data Type Support

10 Functions — Alphabetical List10-50'Fullscreen' — Fullscreen display of figure'off' (default) | 'on'Fullscreen display

Pagina 325 - VR Sink

set10-51Navigation mode, specified as 'examine', 'fly', 'walk', or 'none'. See “MouseNavigation”.'NavPan

Pagina 326

10 Functions — Alphabetical List10-52Example: [230 250 570 510]Data Types: double'Record2D' — 2-D offline animation file recording'off&

Pagina 327 - VR Source

set10-53Sound effects, specified as 'on' or 'off'.'StatusBar' — Status bar display'on' (default) | 'off&

Pagina 328

10 Functions — Alphabetical List10-54'Toolbar' — Toolbar display'on' (default) | 'off'Toolbar display, specified as &apo

Pagina 329 - VR Source

set10-55myworld = vrworld('vrmount.wrl');open(myworld);virtual_fig = vrfigure(myworld);Create a vr.utils.stereo3d object to use to specify

Pagina 330

10 Functions — Alphabetical List10-56 Record2DFileName = '%f_anim_%n.avi' Sound = 'on' StatusBar = 'on' Stereo3D = &apos

Pagina 331 - VR Text Output

vrgcbf10-57vrgcbfCurrent callback vrfigure objectSyntaxf = vrgcbfDescriptionf = vrgcbf returns a vrfigure object representing the virtual reality fig

Pagina 332

10 Functions — Alphabetical List10-58vrgcfHandle for active virtual reality figureSyntaxh = vrgcfDescriptionh = vrgcf returns the handle of the curren

Pagina 333 - VR Text Output

vrgetpref10-59vrgetprefValues of Simulink 3D Animation preferencesSyntaxx = vrgetprefx = vrgetpref('preference_name')x = vrgetpref('pr

Pagina 335 - VR Tracer

1 Getting Started1-26capability, you can perform massive color changes or morphing. This model morphs acube into an octahedron and then changes it bac

Pagina 336

10 Functions — Alphabetical List10-60Preference DescriptionDataTypeBool Specifies the handling of the VRML Bool datatype for vrnode/setfield and vrnod

Pagina 337 - VR Tracer

vrgetpref10-61Preference DescriptionDefaultCanvasNavPanel Controls the appearance of the control panel inthe vr.canvas object. Values are:• 'non

Pagina 338

10 Functions — Alphabetical List10-62Preference DescriptionDefaultFigureMaxTextureSizeSpecifies the default maximum size of a textureused in rendering

Pagina 339

vrgetpref10-63Preference DescriptionDefaultFigureStatusBar Specifies whether the status bar appearsby default at the bottom of the Simulink 3DAnimati

Pagina 340

10 Functions — Alphabetical List10-64Preference DescriptionDefaultViewer Specifies which viewer is used to view a virtualscene.• 'internal'D

Pagina 341

vrgetpref10-65Preference DescriptionDefaultWorldRemoteView Specifies whether the virtual world is enabledby default for remote viewing for new vrworl

Pagina 342 - Input Arguments

10 Functions — Alphabetical List10-66The HttpPort, VrPort, and TransportBuffer preferences affect Web-based viewingof virtual worlds. DefaultFigurePos

Pagina 343 - More About

vrgetpref10-67%matlabroot Refers to the MATLAB root folder%file Refers to the VRML file nameFor instance, a possible value for the Editor preference

Pagina 344

10 Functions — Alphabetical List10-68vrifs2patchConvert VRML IndexedFaceSet nodes to MATLAB patchesSyntaxvrifs2patch(ifs)Descriptionvrifs2patch(ifs) c

Pagina 345

vrifs2patch10-69Convert the IndexedFaceSet a MATLAB patch and show it.set(vrfig1,'CameraUpVector',[0 0 -1]);figure('Name',...

Pagina 346

Virtual Reality World and Dynamic System Examples1-27objects. In this case, the virtual world displays three graphs that update at each majorsimulati

Pagina 347 - Construction

10 Functions — Alphabetical List10-70Change the patch color, show the axes grid, rotate the camera, and enable mouserotation.tp.FaceColor = 'red&

Pagina 348

vrifs2patch10-71More About• “Introduction to Patch Objects”See Alsopatch | vrpatch2ifsIntroduced in R2015a

Pagina 349 - vr.canvas class

10 Functions — Alphabetical List10-72vrinstallInstall and check Simulink 3D Animation componentsSyntaxvrinstall('action')vrinstall actionx =

Pagina 350

vrinstall10-73Action Value Description-install Installs optional components. This action requires you to specifythe component name.-uninstall Uninsta

Pagina 351

10 Functions — Alphabetical List10-74vrjoystickCreate joystick objectSyntaxjoy = vrjoystick(id)joy = vrjoystick(id,'forcefeedback')Descripti

Pagina 352

vrjoystick10-75Method Descriptionclose close(joy) closes and invalidates the joystickobject. The object cannot be used once it is closed.force force(

Pagina 353 - Properties

10 Functions — Alphabetical List10-76vrlibOpen Simulink block library for Simulink 3D AnimationSyntaxvrlibDescriptionThe Simulink library for the Simu

Pagina 354

vrnode10-77vrnodeCreate node or handle to existing nodeSyntaxmynode = vrnodemynode = vrnode([])mynode = vrnode(vrworld_object,'node_name')m

Pagina 355

10 Functions — Alphabetical List10-78mynode = vrnode([]) creates an empty array of vrnode handles.mynode = vrnode(vrworld_object,'node_name'

Pagina 356

vrnode10-79Method Descriptionsetfield Change field value of vrnode objectsync Enable or disable synchronization of VRML fields with clientSee Alsovrn

Pagina 357

1 Getting Started1-28Inverted Pendulum Example (vrpend)The vrpend example illustrates the various ways a dynamic model in the Simulinkinterface can in

Pagina 358

10 Functions — Alphabetical List10-80vrnode/deleteRemove vrnode objectSyntaxdelete(vrnode_object)delete(n)Argumentsvrnode_object Name of a vrnode obje

Pagina 359

vrnode/fields10-81vrnode/fieldsVRML field summary of node objectSyntaxfields(vrnode_object)x = fields(vrnode_object)Argumentsvrnode_object Name of a

Pagina 360 - Create a figure

10 Functions — Alphabetical List10-82vrnode/getProperty value of vrnode objectSyntaxget(vrnode_object)x = get(vrnode_object)x = get(vrnode_object, &ap

Pagina 361

vrnode/get10-83Property Value DescriptionName String Name of the node.Type String VRML type of the node. The value is a string (forexample, 'Tra

Pagina 362

10 Functions — Alphabetical List10-84vrnode/getfieldField value of vrnode objectSyntaxgetfield(vrnode_object)x = getfield(vrnode_object)x = getfield(v

Pagina 363

vrnode/getfield10-85See Alsovrnode | vrnode/get | vrnode/set | vrnode/setfield

Pagina 364 - Output Arguments

10 Functions — Alphabetical List10-86vrnode/isvalid1 if vrnode object is valid, 0 if notSyntaxx = isvalid(vrnode_object_vector)Argumentsvrnode_object_

Pagina 365

vrnode/set10-87vrnode/setChange property of virtual world nodeSyntaxx = set(vrnode_object, 'property_name','property_value')Argum

Pagina 366

10 Functions — Alphabetical List10-88Property Value DescriptionWorld Handle Handle of the parent vrworld object. This is a vrworldobject that represen

Pagina 367

vrnode/setfield10-89vrnode/setfieldChange field value of vrnode objectSyntaxx = setfield(vrnode_object,'fieldname','fieldvalue')A

Pagina 368

Virtual Reality World and Dynamic System Examples1-29Mutual gravity accelerations of the bodies are computed using Simulink matrix-type datasupport.P

Pagina 369

10 Functions — Alphabetical List10-90vrnode/syncEnable or disable synchronization of VRML fields with clientSyntaxsync(vrnode_object, 'field_name

Pagina 370

vrnode/sync10-91See Alsovrnode | vrnode/get

Pagina 371

10 Functions — Alphabetical List10-92vrori2dirConvert viewpoint orientation to directionSyntaxvrori2dir(r)vrori2dir(r,options)Descriptionvrori2dir(r)

Pagina 372

vrpatch2ifs10-93vrpatch2ifsConvert MATLAB patches to VRML IndexedFaceSet nodesSyntaxnode = vrpatch2ifs(patches,world)node = vrpatch2ifs(patches,shape

Pagina 373

10 Functions — Alphabetical List10-94ExamplesConvert MATLAB Patches to VRML IndexedFaceSet NodesThis command converts three MATLAB patches to VRML Ind

Pagina 374 - • “MATLAB Interaction”

vrpatch2ifs10-95dv.position = [-1 15 30];dv.orientation = [-0.38 -0.93 0 0.55];setfield(dv,'set_bind',true); %#ok<STFLD,SFLD>Convert

Pagina 375

10 Functions — Alphabetical List10-96Virtual world that contains Shape nodes, specified as a vrworld object.parent — Parent grouping nodevrnode object

Pagina 376

vrphysmod10-97vrphysmodAdd virtual reality visualization framework to block diagramsSyntaxvrphysmod(vrmlfile, model)vrphysmod(vrmlfile, subsystem)Des

Pagina 377

10 Functions — Alphabetical List10-98ExamplesTo update the model four_link using the VRML file four_link.wrl:vrphysmod('four_link.wrl', &apo

Pagina 378

vrplay10-99vrplayPlay VRML animation fileSyntaxvrplayvrplay(filename)x=vrplay(filename)Descriptionvrplay opens the 3D Animation Player, which you us

Pagina 379 - Introduced before R2006a

1 Getting Started1-30MATLAB Interface ExamplesThe following table lists the MATLAB interface examples provided with the software.Descriptions of the e

Pagina 380

10 Functions — Alphabetical List10-100rewindstep reversestopplaystep forwardfast forwardstartjumplooptime indicatorlastSetting the DefaultViewer prope

Pagina 381

vrplay10-101Key FunctionP Play/pause toggleS StopR, Page Up RewindRight arrow key Step forwardLeft arrow key Step reverseUp arrow key FirstDown arrow

Pagina 382

10 Functions — Alphabetical List10-102vrrotvecCalculate rotation between two vectorsSyntaxr = vrrotvec(a,b)r = vrrotvec(a,b,options)Descriptionr = vrr

Pagina 383

vrrotmat2vec10-103vrrotmat2vecConvert rotation from matrix to axis-angle representationSyntaxr = vrrotmat2vec(m)r = vrrotmat2vec(m,options)Descriptio

Pagina 384 - Create a vrfigure object

10 Functions — Alphabetical List10-104vrrotvec2matConvert rotation from axis-angle to matrix representationSyntaxm = vrrotvec2mat(r)m = vrrotvec2mat(r

Pagina 385

vrsetpref10-105vrsetprefChange Simulink 3D Animation preferencesSyntaxvrsetpref('preference_name', 'preference_value')vrsetpref(&

Pagina 386

10 Functions — Alphabetical List10-106Preference DescriptionInt32 data type is returned as 'double'.Default is 'double'.DataTypeFl

Pagina 387

vrsetpref10-107Preference DescriptionDefaultFigureCaptureFileNameSpecifies default file name for capturing viewerfigures. See get (vrfigure) for deta

Pagina 388

10 Functions — Alphabetical List10-108Preference DescriptionDefaultFigureRecord2DFPS Specifies the default frames per second playbackspeed.To have the

Pagina 389

vrsetpref10-109Preference DescriptionDefaultViewer Specifies which viewer is used to view a virtualscene.• 'internal'Default Simulink 3D An

Pagina 390

Virtual Reality World and Dynamic System Examples1-31of time-based temperature distribution in an L-shaped metal block is used. The data isthen sent

Pagina 391

10 Functions — Alphabetical List10-110Preference DescriptionDefaultWorldTimeSource Specifies the default source of the time for newvrworld objects. Va

Pagina 392

vrsetpref10-1113D Animation Viewer. Changes to the HttpPort or VrPort preferences take effect onlyafter you restart the MATLAB software.DefaultFigure

Pagina 393

10 Functions — Alphabetical List10-112%file Refers to the VRML file nameFor instance, a possible value for the Editor preference is`%matlabroot\bin\wi

Pagina 394

vrspacemouse10-113vrspacemouseCreate space mouse objectSyntaxmouse = vrspacemouse(id)Descriptionmouse = vrspacemouse(id) creates a space mouse object

Pagina 395 - View the figure properties

10 Functions — Alphabetical List10-114Property DescriptionUpperPositionLimit Position coordinates for the upper limit of the mouse.LimitPosition Enabl

Pagina 396 - Stereo3DHIT = 0

vrspacemouse10-115Method Descriptionviewpoint p = viewpoint(mouse) reads the space mousecoordinates in VRML viewpoint format. Translationsand rotatio

Pagina 397

10 Functions — Alphabetical List10-116vr.utils.stereo3d classStereoscopic vision settings for vr.canvas and vr.figure objectsDescriptionSpecifies thes

Pagina 398

vr.utils.stereo3d class10-117stereoVision = vr.utils.stereo3d.ANAGLYPH_RED_GREEN enables red-greenanaglyph stereoscopic vision.stereoVision = vr.util

Pagina 399 - Arguments

10 Functions — Alphabetical List10-118Horizontal image translation, specified as either the predefined DEFAULT_HIT or asa floating-point number from 0

Pagina 400

vr.utils.stereo3d class10-119Stereoscopic vision mode. Read only.• STEREO3D_OFF — No stereoscopic vision.• STEREO3D_ACTIVE — Active stereoscopic visi

Pagina 401 - vrgetpref

1 Getting Started1-32worlds that are associated with Simulink models, where scene time corresponds directlyto the Simulink time.The scene time can rep

Pagina 402

10 Functions — Alphabetical List10-120ExamplesDefine and Apply Stereoscopic Vision SettingsCreate a virtual world.w = vrworld('octavia_scene&apos

Pagina 403

vrview10-121vrviewView virtual world using Simulink 3D Animation viewer or Web browserSyntaxvrviewx = vrview('filename')x = vrview('fi

Pagina 404

10 Functions — Alphabetical List10-122vrwhoList virtual worlds in memorySyntaxvrwhox = vrwhoDescriptionIf you do not specify an output parameter, vrwh

Pagina 405

vrwhos10-123vrwhosList details about virtual worlds in memorySyntaxvrwhosDescriptionvrwhos displays a list of virtual worlds currently in memory, wit

Pagina 406

10 Functions — Alphabetical List10-124vrworldCreate new vrworld object associated with virtual worldSyntaxmyworld = vrworld(filename)myworld = vrworld

Pagina 407

vrworld10-125myworld = vrworld creates an invalid vrworld handlemyworld = vrworld('') creates an empty vrworld object that is not associate

Pagina 408

10 Functions — Alphabetical List10-126Method Descriptionreload Reload virtual world from VRML filesave Write virtual world to VRML fileset Change prop

Pagina 409 - vrifs2patch

vrworld/addexternproto10-127vrworld/addexternprotoAdd externproto declaration to virtual worldSyntaxaddexternproto(vrworld_object, protofile, protona

Pagina 410

10 Functions — Alphabetical List10-128in the virtual scene associated with vrworld_object. After you save the virtual world,these PROTO declarations n

Pagina 411

vrworld/close10-129vrworld/closeClose virtual worldSyntaxclose(vrworld_object)Argumentsvrworld_object A vrworld object representing the virtual world

Pagina 412

Virtual Reality World and Dynamic System Examples1-33This example requires the Mapping Toolbox software from MathWorks®.Plane Manipulation Using Spac

Pagina 413

10 Functions — Alphabetical List10-130close(myworld)See Alsovrworld | vrworld/delete | vrworld/open

Pagina 414

vrworld/delete10-131vrworld/deleteRemove virtual world from memorySyntaxdelete(vrworld_object)Argumentsvrworld_object A vrworld object representing a

Pagina 415 - vrjoystick

10 Functions — Alphabetical List10-132vrworld/editOpen virtual world file in external VRML editorSyntaxedit(vrworld_object)Argumentsvrworld_object A v

Pagina 416

vrworld/get10-133vrworld/getProperty value of vrworld objectSyntaxget(vrworld_object)x = get(vrworld_object)x = get(vrworld_object, 'property_na

Pagina 417

10 Functions — Alphabetical List10-134Property Value DescriptionClientUpdates 'off' | 'on'Default: 'on'Client cannot or

Pagina 418 - Method Summary

vrworld/get10-135Property Value DescriptionRecordInterval Vector of two doublesDefault: [0 0]Start and stop times for scheduledanimation recording. C

Pagina 419

10 Functions — Alphabetical List10-136The RemoteView property is set to 'off' by default and can be set by the user. If it isset to 'on

Pagina 420

vrworld/isvalid10-137vrworld/isvalid1 if vrworld object is valid, 0 if notSyntaxx = isvalid(vrworld_object)Argumentsvrworld_object A vrworld object r

Pagina 421

10 Functions — Alphabetical List10-138vrworld/nodesList nodes available in virtual worldSyntaxnodes(vrworld_object, '-full')x = nodes(vrworl

Pagina 422

vrworld/open10-139vrworld/openOpen virtual worldSyntaxopen(vrworld_object)Argumentsvrworld_object A vrworld object representing a virtual world.Descr

Pagina 424

10 Functions — Alphabetical List10-140myworlds = [myworld1 myworld2];open(myworlds) opens both of these virtual worlds.See Alsovrworld | vrworld/close

Pagina 425

vrworld/reload10-141vrworld/reloadReload virtual world from VRML fileSyntaxreload(vrworld_object)Argumentsvrworld_object A vrworld object representin

Pagina 426

10 Functions — Alphabetical List10-142vrworld/saveWrite virtual world to VRML fileSyntaxsave(vrworld_object,'vrml_file')save(vrworld_object,

Pagina 427

vrworld/set10-143vrworld/setChange property values of vrworld objectSyntaxset(vrworld_object, 'property_name', property_value)Argumentsvrwo

Pagina 428

10 Functions — Alphabetical List10-144Property Value DescriptionNodes Vector of vrnode objects Vector of vrnode objects for all namednodes in the virt

Pagina 429

vrworld/set10-145Property Value DescriptionTimeSource 'external' | 'freerun'Default: 'external'Source of the time for t

Pagina 430

10 Functions — Alphabetical List10-146vrworld/viewView virtual worldSyntaxview(vrworld_object)x = view(vrworld_object)x = view(vrworld_object,'-i

Pagina 431

vrworld/view10-147Examplesmyworld = vrworld('vrpend.wrl')open(myworld)view(myworld)See Alsovrview | vrworld

Pagina 433

Glossary-1GlossarysimulationThe process of running a dynamic system in nonreal timeto observe its behavior.virtual figure objectA handle to a Simulink

Pagina 434

2InstallationThe Simulink 3D Animation product provides the files you need for installation on bothyour host computer and client computer.• “Set the D

Pagina 436

vContentsGetting Started1Simulink 3D Animation Product Description . . . . . . . . . . . . 1-2Key Features . . . . . . . . . . . . . . . . . . . . . .

Pagina 437

2 Installation2-2Set the Default ViewerIf you install a VRML plug-in in your Web browser, it is possible to view virtual worldswith either the Simulin

Pagina 438

Set the Default Viewer2-3 DefaultFigureTextures: 'on' DefaultFigureToolBar: 'on'

Pagina 439

2 Installation2-42Reset the Simulink 3D Animation Viewer as your default viewer by typingvrsetpref('DefaultViewer','factory') 3In

Pagina 440 - Keyboard Support

Set the Default Viewer2-5The target of the View button is determined by the DefaultViewer property. Ifthe DefaultViewer property is set to 'inte

Pagina 441

2 Installation2-6Install V-Realm Editor on Host ComputerIn this section...“V-Realm Editor Installation (Windows)” on page 2-6“V-Realm Builder Help” on

Pagina 442

Install V-Realm Editor on Host Computer2-7V-Realm Builder HelpNote: You cannot access the V-Realm Builder documentation from the Web. If you arereadi

Pagina 443

2 Installation2-8Set the Default EditorIn this section...“Use Preferences to Set the Default Editor” on page 2-8“Use MATLAB Commands to Set the Defaul

Pagina 444

Set the Default Editor2-9You can use the VRML Editor preference to select another editor: the V-Realm Builder,the MATLAB editor, or a third-party VRM

Pagina 445

2 Installation2-102The default is the 3D World Editor (*BUILTIN). To change the editor, use thevrsetpref command, specifying the editor that you want.

Pagina 446

Set Simulink 3D Animation Preferences2-11Set Simulink 3D Animation PreferencesIn this section...“Ways to Access Simulink 3D Animation Preferences” on

Pagina 447 - vrsetpref

vi ContentsInstall V-Realm Editor on Host Computer . . . . . . . . . . . . . . . 2-6V-Realm Editor Installation (Windows) . . . . . . . . . . . . . .

Pagina 448

2 Installation2-12Access the Preferences Dialog BoxTo access the Simulink 3D Animation preferences dialog box:1From the MATLAB Toolstrip, in the Home

Pagina 449

Set Simulink 3D Animation Preferences2-133Set the preferences that you want. See the following table for the preferences thatyou can change. Click OK

Pagina 450

2 Installation2-14Preference Value DescriptionDefault: 'logical' If set to 'logical', the VRML Bool data type isreturned as a logi

Pagina 451

Set Simulink 3D Animation Preferences2-15Preference Value DescriptionVRML Editor Built-in 3D WorldEditor | V-RealmBuilder | MATLABEditor | CustomSpec

Pagina 452

2 Installation2-16Property Value DescriptionTriad 'none' | 'top left' | 'topright' | 'bottom left' |'bott

Pagina 453

Set Simulink 3D Animation Preferences2-17Figure PreferencesThe Simulink 3D Animation figure has a number of preferences:• “Figure Rendering Preferenc

Pagina 454

2 Installation2-18Property Value DescriptionNavigation zones 'off' | 'on'Default: 'on'Specifies whether navigationzones

Pagina 455 - vrspacemouse

Set Simulink 3D Animation Preferences2-195Set the preferences as desired. See the following table for the rendering preferencesyou can change. Click

Pagina 456 - • Camera angle

2 Installation2-20Property Value Descriptionyou enter is unsuitable, awarning might trigger. Thesoftware then automaticallyadjusts the property to the

Pagina 457 - — Camera offset

Set Simulink 3D Animation Preferences2-215Set the preferences as desired. See the following table for the rendering preferencesyou can change. Click

Pagina 458

viiView Virtual World Remotely . . . . . . . . . . . . . . . . . . . . . . . . 3-16Working with VRML Sensors . . . . . . . . . . . . . . . . . . . . .

Pagina 459 - vr.utils.stereo3d class

2 Installation2-22Figure Frame Capture PreferencesTo access the virtual figure frame capture preferences:1From the MATLAB Toolstrip, in the Home tab,

Pagina 460

Set Simulink 3D Animation Preferences2-23Virtual World PreferencesTo access the virtual world preferences:1From the MATLAB Toolstrip, in the Home tab

Pagina 461

2 Installation2-244Set the preferences as desired. See the following table for the rendering preferencesyou can change. Click OK to save the settings.

Pagina 462

Set Simulink 3D Animation Preferences2-25Property Value DescriptionDefault: 'off' remote viewing, it is set to 'on';otherwise, it

Pagina 463

2 Installation2-26Uninstall V-Realm BuilderUse the MathWorks uninstaller. Running this utility removes the Simulink 3DAnimation and Ligos V-Realm Buil

Pagina 464

Test the Viewer Installation2-27Test the Viewer InstallationIn this section...“Section Overview” on page 2-27“Simulink Testing” on page 2-27“MATLAB T

Pagina 465

2 Installation2-28The Simulink 3D Animation Viewer opens with a 3-D model of the pendulum.

Pagina 466

Test the Viewer Installation2-292In the Simulink 3D Animation Viewer, from the Simulation menu, click Run. ATrajectory Graph window opens, and a simu

Pagina 467

2 Installation2-303In the Simulink 3D Animation Viewer, point to a position on the blue surface andleft-click.The pendulum set point, represented by t

Pagina 468

Test the Viewer Installation2-31You can now use the trajectory graph as a 2-D input device to set the position of thependulum.6Move the mouse pointer

Pagina 469

viii ContentsScheduled 2-D AVI Recording with MATLAB . . . . . . . . . . . 4-25Record Animations for Unconnected Virtual Worlds . . . . . 4-28Play Ani

Pagina 470

2 Installation2-328Close the Simulink 3D Animation Viewer and close the Simulink window.You can try other examples in “Simulink Interface Examples”, o

Pagina 471

Test the Viewer Installation2-332Use the viewer controls to move within the virtual world, or use the example dialogbox to rotate the membrane. Note

Pagina 473

3Simulink InterfaceThe Simulink 3D Animation product works with both the MATLAB and the Simulinkproducts. However, the Simulink interface is the prefe

Pagina 474

3 Simulink Interface3-2Virtual World Connection to a ModelIn this section...“Add a Simulink 3D Animation Block” on page 3-2“Changing the Virtual World

Pagina 475 - vrworld/get

Virtual World Connection to a Model3-32From the Simulation menu, select Mode > Normal, then click Simulation > Run.Observe the results of the s

Pagina 476

3 Simulink Interface3-46In the Description text box, enter a brief description of the model. This descriptionappears on the list of available worlds s

Pagina 477

Virtual World Connection to a Model3-5The Plane Transform tree expands. Now you can see what characteristics of theplane can be driven from the Simul

Pagina 478

3 Simulink Interface3-6The first input is Plane rotation. The rotation is defined by a four-element vector.The first three numbers define the axis of

Pagina 479

Virtual World Connection to a Model3-715Double-click the VR Sink block in the Simulink model. Select the View button. Aviewer window containing the p

Pagina 480

ixUsing the 3D World Editor63D World Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2Supported Platforms . . . . .

Pagina 481

3 Simulink Interface3-8Changing the Virtual World Associated with a Simulink BlockOn occasion, you might want to associate a different virtual world w

Pagina 482

Virtual World Connection to a Model3-9A VRML tree appears on the right side. The Simulink software associates a newvirtual world with the model.5On t

Pagina 483

3 Simulink Interface3-10Open a Viewer WindowWhen you simulate a model that contains a VR Sink block, your default viewer opens anddisplays the virtual

Pagina 484

Display Virtual World and Start Simulation3-11Display Virtual World and Start SimulationThis example explains how to display a simulated virtual worl

Pagina 485

3 Simulink Interface3-122In the Simulink 3D Animation Viewer, from the Simulation menu, click Run.The simulation starts. In the Simulink 3D Animation

Pagina 486

View Virtual World on Host Computer3-13View Virtual World on Host ComputerNormally, you view a virtual world by double-clicking the VR Sink in the Si

Pagina 487

3 Simulink Interface3-14The following page is loaded and becomes active.The main HTML page for the Simulink 3D Animation product lists the currentlyav

Pagina 488

View Virtual World on Host Computer3-15From the main HTML page, you can select one of the listed available worlds or click thereload link to update t

Pagina 489

3 Simulink Interface3-16View Virtual World RemotelyThe Simulink 3D Animation software allows you to simulate a process on a hostcomputer while running

Pagina 490

View Virtual World Remotely3-172Double-click the VR Sink block. This block is in the right part of the model window.A VRML viewer also opens with a 3

Comentarios a estos manuales

Sin comentarios