0% found this document useful (0 votes)
438 views3 pages

FL13-19-2 How To Use Simulink 3d Animation PDF

This document provides an outline for a lecture on using Simulink 3D Animation. It discusses: 1. What Simulink 3D Animation is and how it can be used to visualize dynamic systems. 2. How to make models using V Realm-Builder and load them into Simulink. 3. How to move models and viewpoints during simulations by inputting signals and transforming coordinates. 4. How to create viewpoints in the Simulink viewer and V Realm-Builder and record animations in actual time rather than simulation time.

Uploaded by

Rodrigo Acosta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
438 views3 pages

FL13-19-2 How To Use Simulink 3d Animation PDF

This document provides an outline for a lecture on using Simulink 3D Animation. It discusses: 1. What Simulink 3D Animation is and how it can be used to visualize dynamic systems. 2. How to make models using V Realm-Builder and load them into Simulink. 3. How to move models and viewpoints during simulations by inputting signals and transforming coordinates. 4. How to create viewpoints in the Simulink viewer and V Realm-Builder and record animations in actual time rather than simulation time.

Uploaded by

Rodrigo Acosta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

2013/10/25

Outline
Tokyo Institute of Technology

What is the Simulink 3D Animation?


How to make or change a model?
How to load a model into Simulink?
How to move a model as you want?
How to create viewpoint?
How to record animation in the actual time not
in the simulation time?
How to move viewpoints during simulation?

How to use Simulink 3D Animation?


Basic Lecture

FL13-19-2
Riku Funada
Tokyo Institute of Technology

Tokyo Institute of Technology

Fujita Laboratory

Tokyo Institute of Technology

What is the Simulink 3D Animation ?

Fujita Laboratory

How to make or change a model ?

Tokyo Institute of Technology

Tokyo Institute of Technology

By using V Realm-Builder 2.0 !!


(SolidWorks is also a powerful tool, but it is difficult to master.)

PTZ Camera motion

1. V Realm-Builder 2.0s installation procedure.


Input vrinstall install editor to
MATLAB command window.
2. Necessary setup to use V Realm-Builder in MATLAB.

Quadcopters motion

In the Home tab,


in the Environment section,
select Preferences > Simulink 3D Animation.

Powerful tool to visualize dynamic system behavior.


Tokyo Institute of Technology

Fujita Laboratory

Choose V Realm-Builder in the VRML Editor.


3

How to make and load a model ?

Now, you can use V Realm-Builder 2.0 in MATLAB.


Tokyo Institute of Technology

Fujita Laboratory

How to move a model as you want ?


Tokyo Institute of Technology

1. Start V Realm-Builder
3. Load VRML file
Click New.
Browse or input file name.

Tokyo Institute of Technology

1. Start V Realm-Builder
Click Edit.

3. Reload VRML file

2. Give a name to parent node

Checkboxes appear at left side of


children nodes whose parent nodes
have name.

Double-click
to open this.

2. Make a simple model


Demonstration

4. Click VR Sink block


Demonstration

Long left-click on
parents node name.

VR SINK can load VRML file, which file extension is .WRL or .wrl.

Change names.

You can also copy and use VRML file in the following folder.
Fourier.fl.ctrl.titech.ac.jpDSimulink 3D Animation.
Tokyo Institute of Technology

Fujita Laboratory

Save this file.


Tokyo Institute of Technology

Check checkboxes of nodes


which you want to input signal.

Input ports appear !!


Fujita Laboratory

2013/10/25

How to move a model as you want ?

How to create viewpoint ? (By Simulink viewer)

Tokyo Institute of Technology

1. Transform input signals axes


(If necessary.)

3. Input position vector


If vectors dimension is 3,
input directly.

Axes introduced in VRML file


is defined as follow.
If its dimension is under 2,
+x points right
use VR Signal Expander.
+y points up
Object moves as you input !!
+z points out of the screen
2. Input rotation matrix
You must use
Rotation Matrix to
VRML Rotation block.

Problems.
How to create viewpoint
at appropriate position?
How to record animation
in the actual time
not in the simulation time?

Tokyo Institute of Technology

Fujita Laboratory

How to create viewpoint ? (By Simulink viewer)

Tokyo Institute of Technology

1. Choose speed of navigation


Select Navigation > Speed
I recommend you to choose
Very Slow.

3. Create viewpoint
Select Viewpoints >
Create Viewpoint

2. Choose method of navigation


There are 3 methods.
Walk, Examine and Fly.
For details, see the next slide.
(Demonstration)

4. Save VRML file


You must save VRML file
before you close viewer.
Select File > Save As

Now, you can choose Viewpoints from left upper tab!!

Tokyo Institute of Technology

Fujita Laboratory

How to create viewpoint ? (By V Realm-Builder)

Tokyo Institute of Technology

Tokyo Institute of Technology

1. Create viewpoint

Explanation of 3 types of Navigation

3. Set parameter

http://www.mathworks.co.jp/jp/help/sl3d/navigate-in-the-simulink-3d-animation-viewer.html#bt1in3m

Click this.
Then, new node appears.
2. Bind current viewpoint
to the new one.

Choose True.
Tokyo Institute of Technology

Fujita Laboratory

How to record animation in the actual time. 1

Tokyo Institute of Technology

2. Decide movies FPS

Tokyo Institute of Technology

10

Sample time.

For example,
when you set sample time in the VR Sink 0.04,
appropriate FPS is 25.
11

4.Select a compression method


(If necessary)
.AVI files can become large,
so you might need to compress
the .avi files.

In the viewer,
Select Recording,
Capture and Recording Parameter.

Fujita Laboratory

Fujita Laboratory

Tokyo Institute of Technology

3. Schedule the recording

Do not enter -1 as Sample time.


This parameter controls
Check Record to AVI.
how often the simulation is
Enter FPS which is compatible with
recorded to a file.
Nothing to do with
movies FPS(frame per second).

Input viewpoints name


(Demonstration)

How to record animation in the actual time. 2

Tokyo Institute of Technology

1. Decide timing of recorded


Set up Sample time.

These axes are global coordinate.


See P7 1.

Record mode
Scheduled
Input Start time and Stop time.
(In simulation time.)
Manual
You can start and stop recording
by clicking below button
in the viewer.

If you want to get more information,


please read MATLAB help.
Movie is saved in the current folder.
In the default setting,
movie is saved as %f_anim_%n.avi.
(For example,
VRML file name is quad_4.wrl,
then the .avi file name is
quad_4_anim_1.avi.
(for the second time, quad_4_anim_2.avi)

Tokyo Institute of Technology

Fujita Laboratory

12

2013/10/25

How to move viewpoints during simulation?


Tokyo Institute of Technology

Tokyo Institute of Technology

By using Viewpoint Direction to VRML Orientation block.


1. Create viewpoint direction
Please input below vector to this block.
(Coordinate which you want to watch) - (Viewpoints coordinate).

For example, coordinate you want to watch is [2;1;3] and


viewpoints coordinate is [0;0;1], please input [2;1;2].
2. Create input port of viewpoint orientation
Please refer to P10 1.Create viewpoint, P6 2.Give a name to parent node and
3. Reload VRML file. Then, input port of viewpoints rotation will appear.
We can also input transform signal
to viewpoints transform input port.

Thank you for listening.


Simulink 3D animation has too many function to introduce
all of them in this short lecture.
If you want to do something which is not introduced in
this lecture, please feel free to ask me.

(Demonstration)
Tokyo Institute of Technology

Viewpoint always head toward


to the place you want
to watch.
13
Fujita Laboratory

Maybe I can answer them.


Tokyo Institute of Technology

Fujita Laboratory

14

You might also like