Thread Subject: 3D plot problem

Subject: 3D plot problem

From: Drago Zarkovic

Date: 5 Jun, 2009 07:48:02

Message: 1 of 5

I made a 3D plot and set cameraposition and target so that only a part of plot is displayed. As soon as I try rotate3d it sets cameraposition so far from a plot that it is shown whole. In earlier versions of Matlab (7.1, 7.0) it was OK, but in 7.7 I have this problem...
"""""""""""""""""""""""""
figure(1)
plot3([-25 25],[0 0],[0 0],'m')
hold on
plot3([0 0],[-25 25],[0 0],'m')
plot3([0 0],[0 0],[-25 25],'m')
[Xosa,Yosa] = meshgrid(-25:25,-25:25:-25:25);
Zosa=Xosa.*0;
surf(Xosa,Yosa,Zosa,'FaceAlpha',0,'LineStyle',':')
set(gca,'CameraPosition',[5 5 5],'CameraTarget',[0 0 0],'CameraUpVector',[0 0 1],'CameraViewAngle',45,'Projection','perspective')
rotate3d
"""""""""""""""""""""""""""
I want camera to stay close...

Thank you in advance

Subject: 3D plot problem

From: Drago Zarkovic

Date: 6 Jun, 2009 05:47:01

Message: 2 of 5

When I call camera toolbar and orbit with it it seems to be ok, but rotate3d doesn't work. Is it posible to call camera toolbar comands by code?

Subject: 3D plot problem

From: Drago Zarkovic

Date: 7 Jun, 2009 12:22:01

Message: 3 of 5

I just found out that rotate3d function sets 'CameraPositionMode' to 'Auto' as soon as I rptate plot. Is it posible to override this?

Please someone help

Subject: 3D plot problem

From: Drago Zarkovic

Date: 7 Jun, 2009 19:20:16

Message: 4 of 5

Can someone help please????

Subject: 3D plot problem

From: Sadik

Date: 8 Jun, 2009 03:55:04

Message: 5 of 5

Have you ever used the function view? Maybe that could help. For instance, if you like a view and want to save it, you say:

goodView = view;

Then, when you make another plot and want to use this good view, then you say:

view(goodView);


"Drago Zarkovic" <dragozarkovic@yahoo.com> wrote in message <h0h3tg$qfb$1@fred.mathworks.com>...
> Can someone help please????

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
cameraposition Drago Zarkovic 5 Jun, 2009 03:49:03
campos Drago Zarkovic 5 Jun, 2009 03:49:03
rotate3d Drago Zarkovic 5 Jun, 2009 03:49:03
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com