MATLAB SIMULINK 3D ANIMATION - S Guide de l'utilisateur

Naviguer en ligne ou télécharger Guide de l'utilisateur pour Logiciel MATLAB SIMULINK 3D ANIMATION - S. MATLAB SIMULINK 3D ANIMATION - S User`s guide Manuel d'utilisatio

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 490
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs

Résumé du contenu

Page 1 - User's Guide

Simulink® 3D Animation™User's GuideR2015a

Page 2 - How to Contact MathWorks

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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 8

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

Page 9

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

Page 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

Page 11

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

Page 12

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

Page 13 - Glossary

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

Page 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

Page 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

Page 17 - Expected Background

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

Page 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

Page 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

Page 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

Page 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

Page 22

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

Page 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

Page 24

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

Page 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

Page 26

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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 33

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

Page 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

Page 35

xiiiBlocks — Alphabetical List9Functions — Alphabetical List10Glossary

Page 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

Page 37

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

Page 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

Page 39

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

Page 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

Page 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

Page 42

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

Page 43

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

Page 44

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

Page 45

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

Page 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.•

Page 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

Page 49 - Installation

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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 60

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

Page 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

Page 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,

Page 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.

Page 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

Page 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

Page 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

Page 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.

Page 68

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

Page 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

Page 70

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

Page 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,

Page 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

Page 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

Page 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

Page 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

Page 76

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

Page 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

Page 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

Page 79

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

Page 80

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

Page 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

Page 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

Page 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

Page 84

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

Page 85

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

Page 86

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

Page 87

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

Page 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

Page 89

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

Page 90

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

Page 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

Page 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

Page 93

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

Page 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

Page 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

Page 96

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

Page 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

Page 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

Page 99

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

Page 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

Page 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

Page 102

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

Page 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

Page 104 - Working with VRML Sensors

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

Page 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 (

Page 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

Page 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

Page 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

Page 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

Page 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

Page 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”

Page 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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 124

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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 135

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

Page 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•

Page 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

Page 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

Page 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

Page 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

Page 142

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

Page 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

Page 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

Page 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

Page 146

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

Page 147

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

Page 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

Page 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

Page 150

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

Page 151

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

Page 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.

Page 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

Page 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

Page 155

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

Page 156

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

Page 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

Page 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

Page 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

Page 160

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

Page 161

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

Page 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.

Page 163

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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 169

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

Page 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

Page 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

Page 172 - Section Overview

Define and Reset Viewpoints7-33

Page 173

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

Page 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.

Page 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

Page 176

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

Page 177

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

Page 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

Page 179

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

Page 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.

Page 181

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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 187

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

Page 188

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

Page 189

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

Page 190

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

Page 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

Page 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

Page 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

Page 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

Page 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.

Page 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,

Page 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“

Page 198 - 6 Using the 3D World Editor

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

Page 199 - Open the 3D World Editor

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

Page 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

Page 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

Page 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

Page 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

Page 204

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

Page 205 - Basic Editing

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

Page 206

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

Page 207 - Edit Object Properties

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

Page 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

Page 210

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

Page 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

Page 212

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

Page 213

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

Page 214

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

Page 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

Page 216

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

Page 217 - Pivot Point

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

Page 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

Page 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

Page 220

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

Page 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

Page 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

Page 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

Page 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&

Page 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

Page 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

Page 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.

Page 228

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

Page 230 - Specify Rendering Techniques

9Blocks — Alphabetical List

Page 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

Page 232

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

Page 233

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

Page 234

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

Page 235

Virtual Reality Modeling Language (VRML)1-17

Page 236

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

Page 237

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

Page 238

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

Page 239

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

Page 240

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

Page 241

Space Mouse Input9-11Block Parameters Dialog Box

Page 242

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

Page 243 - Mouse Navigation

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

Page 244

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

Page 245

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

Page 246

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

Page 247

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

Page 248 - Viewpoints

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

Page 249 - Viewpoints

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

Page 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

Page 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

Page 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

Page 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

Page 254 - Navigate Through Viewpoints

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

Page 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

Page 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

Page 257

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

Page 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

Page 259 - File Names

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

Page 260

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

Page 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

Page 262

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

Page 263

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

Page 264

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

Page 265

VR Tracer9-33

Page 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

Page 267

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

Page 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

Page 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

Page 270

10Functions — Alphabetical List

Page 271 - Open the Web Viewer

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

Page 272

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

Page 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

Page 274

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

Page 275

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

Page 276

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

Page 277

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

Page 278

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

Page 279

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

Page 280

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

Page 281

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

Page 282

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

Page 283 - Control Stereoscopic Effects

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

Page 284

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

Page 285

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

Page 286

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

Page 287

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

Page 288 - Orbisnap Viewer

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

Page 289 - Install Orbisnap

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

Page 290

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

Page 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 =

Page 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

Page 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

Page 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

Page 295 - Navigation Panel

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

Page 296

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

Page 297 - Navigate Using Orbisnap

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

Page 298

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

Page 299 - Navigate Using Orbisnap

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

Page 300

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

Page 301

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

Page 302

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

Page 303

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

Page 304

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

Page 305

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

Page 306 - Cross Product

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

Page 307 - Joystick Input

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

Page 308 - Block Parameters Dialog Box

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

Page 309 - Joystick Input

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

Page 310 - Normalize Vector

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

Page 311 - Rotation Between 2 Vectors

close10-39Introduced before R2006a

Page 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

Page 313 - Rotation Matrix

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

Page 314 - Space Mouse Input

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

Page 315

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

Page 316 - 9 Blocks — Alphabetical List

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

Page 317 - See Also

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

Page 318

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

Page 319 - VR Placeholder

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

Page 320

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

Page 321 - VR Signal Expander

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

Page 322

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

Page 323

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

Page 324 - Data Type Support

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

Page 325 - VR Sink

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

Page 326

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

Page 327 - VR Source

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

Page 328

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

Page 329 - VR Source

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

Page 330

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

Page 331 - VR Text Output

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

Page 332

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

Page 333 - VR Text Output

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

Page 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

Page 336

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

Page 337 - VR Tracer

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

Page 338

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

Page 339

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

Page 340

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

Page 341

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

Page 342 - Input Arguments

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

Page 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

Page 344

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

Page 345

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

Page 346

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

Page 347 - Construction

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

Page 348

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

Page 349 - vr.canvas class

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

Page 350

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

Page 351

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

Page 352

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

Page 353 - Properties

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

Page 354

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

Page 355

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

Page 356

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

Page 357

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

Page 358

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

Page 359

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

Page 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

Page 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

Page 362

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

Page 363

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

Page 364 - Output Arguments

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

Page 365

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

Page 366

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

Page 367

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

Page 368

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

Page 369

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

Page 370

vrnode/sync10-91See Alsovrnode | vrnode/get

Page 371

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

Page 372

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

Page 373

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

Page 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

Page 375

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

Page 376

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

Page 377

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

Page 378

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

Page 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

Page 380

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

Page 381

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

Page 382

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

Page 383

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

Page 384 - Create a vrfigure object

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

Page 385

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

Page 386

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

Page 387

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

Page 388

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

Page 389

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

Page 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

Page 391

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

Page 392

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

Page 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

Page 394

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

Page 395 - View the figure properties

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

Page 396 - Stereo3DHIT = 0

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

Page 397

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

Page 398

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

Page 399 - Arguments

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

Page 400

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

Page 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

Page 402

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

Page 403

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

Page 404

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

Page 405

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

Page 406

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

Page 407

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

Page 408

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

Page 409 - vrifs2patch

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

Page 410

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

Page 411

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

Page 412

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

Page 413

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

Page 414

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

Page 415 - vrjoystick

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

Page 416

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

Page 417

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

Page 418 - Method Summary

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

Page 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

Page 420

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

Page 421

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

Page 422

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

Page 424

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

Page 425

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

Page 426

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

Page 427

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

Page 428

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

Page 429

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

Page 430

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

Page 431

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

Page 433

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

Page 434

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

Page 436

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

Page 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

Page 438

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

Page 439

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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 445

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

Page 446

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

Page 447 - vrsetpref

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

Page 448

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

Page 449

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

Page 450

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

Page 451

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

Page 452

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

Page 453

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

Page 454

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

Page 455 - vrspacemouse

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

Page 456 - • Camera angle

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

Page 457 - — Camera offset

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

Page 458

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

Page 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,

Page 460

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

Page 461

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

Page 462

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

Page 463

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

Page 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

Page 465

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

Page 466

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

Page 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

Page 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

Page 469

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

Page 470

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

Page 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

Page 473

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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 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

Page 480

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

Page 481

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

Page 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

Page 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

Page 484

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

Page 485

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

Page 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

Page 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

Page 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

Page 489

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

Page 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

Commentaires sur ces manuels

Pas de commentaire