# Why does executing the Moving the Camera Through a Scene produce unwanted numerical values?

조회 수: 1 (최근 30일)
Hi, I'm experiementing with the camera functions in MATLAB and came across the Moving the Camera Through a Scene example in MATLAB help. But I'm confused as to what a series of numbers are when they appear at the end of code execution. The code I'm using is as follows;
%
% Moving_Camera.m
%
% Clear out all workspace variables and the command window
close all;
clear all;
clc;
% load the wind data and calculate the actual wind speed
wind_speed = sqrt(u.^2 + v.^2 + w.^2);
hpatch = patch(isosurface(x, y, z, wind_speed, 35));
isonormals(x, y, z, wind_speed, hpatch);
set(hpatch, 'FaceColor', 'red', 'EdgeColor', 'none');
[f vt] = reducepatch(isosurface(x,y,z,wind_speed,45),0.05);
daspect([1,1,1]);
hcone = coneplot(x,y,z,u,v,w,vt(:,1),vt(:,2),vt(:,3),2);
set(hcone,'FaceColor','blue','EdgeColor','none');
camproj perspective ;
camva(25);
set(hpatch, 'AmbientStrength', .1,...
'SpecularStrength', 1,...
'DiffuseStrength', 1);
set(hcone, 'SpecularStrength', 1);
set(gcf, 'Color', 'k');
lighting phong;
set(gcf,'Renderer','zbuffer');
hsline = streamline(x,y,z,u,v,w,78,27,11);
xd = get(hsline,'XData');
yd = get(hsline,'YData');
zd = get(hsline,'ZData');
delete(hsline);
for i=1:length(xd)-40
campos([xd(i),yd(i),zd(i)])
camtarget([xd(i+5)+min(xd)/100,yd(i),zd(i)])
drawnow
end
When the code is done running, I see the following set of values in the last frame:
What could these values represent?
Thank you.

댓글을 달려면 로그인하십시오.

### 채택된 답변

Mike Garrity 2015년 4월 15일
편집: Mike Garrity 2015년 4월 15일
I believe you're using a version of MATLAB that is older than R2014b. Is that correct?
This looks like a bug that was fixed in that version. The bug had to do with it getting confused about things that were behind the CameraPosition. I think that you're seeing the tick marks from the Y axis. If you upgrade to a newer version this should be fixed. It looks OK when I run it with R2015a.
##### 댓글 수: 1이전 댓글 -1개 표시이전 댓글 -1개 숨기기
Mike, thanks for taking a look at this. You were correct in assuming I'm using an older version of MATLAB (2012b).

댓글을 달려면 로그인하십시오.

### 카테고리

Help CenterFile Exchange에서 Camera Views에 대해 자세히 알아보기

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by