We will use the "Membrane" example for Simulink 3D Animation:
You can get the position and direction of the camera using the following code example:
>> wh = vrworld('membrane.wrl');
>> open(wh);
>> view(wh);
>> fig = get(wh, 'Figures');
>> dir = get(fig, 'CameraDirection');
>> pos = get(fig, 'CameraPosition');
You may need the Field Of View (FOV) of the camera.
First, get the name of the currently used viewpoint:
If there is a viewpoint, get the FOV of each viewpoint:
>> vp = get(wh, 'Viewpoints');
>> getfield(vp, 'fieldOfView')
If there is no viewpoint, the FOV is set to the default value specified by the VRML Standard: 0.785398 radians (45 degrees).
Please refer to the following link for more information on the VRML standard:
Best Answer