MATLAB Answers

How can a show the correct view of graphical objects??

1 view (last 30 days)
David Winthrop
David Winthrop on 19 Oct 2017
Commented: Kelly Kearney on 20 Oct 2017
I am trying to make an animation, and I noticed that the camera DOES NOT show what it should show. How can I fix this?
I make a unit circle, and place the camera directly above the central point and set the camera target to a far away location outside the circle with a narrow field of view. Obviously, from this view I should not see the entire circle, but I do.
PLEASE ANY ADVICE!?
t = linspace(0,pi,100);
x = cos(t);
y = sin(t);
plot3(x,y,zeros(size(x)))
hold on
plot3(-x,-y,zeros(size(x)))
set(gca,'cameraposition',[0,0,1])
set(gca,'cameratarget',[10,0,0])
set(gca,'cameraviewangle',25)
xlabel('x')
ylabel('y')

  0 Comments

Sign in to comment.

Answers (1)

David Winthrop
David Winthrop on 19 Oct 2017
Since I have asked this question twice and nobody has commented, I think it is safe to assume nobody knows or it is a bug nobody wants to talk about.
In that case, can anyone recommend if Octave handles camera view correctly? What about python?
Thanks

  4 Comments

Show 1 older comment
David Winthrop
David Winthrop on 20 Oct 2017
Hello Kelly,
I am using r2012b. And I only ran the code you see immediately after clearing all and closing all. So it must be a version thing?
Which version do you have that gives a more correct view?
Thanks again.

Sign in to comment.

Sign in to answer this question.

Tags

Products