[Scilab-users] Fwd: avoid auto-zoom when rotating a 3D graphic

P M p.muehlmann at gmail.com
Wed Jul 7 12:08:39 CEST 2021


Hallo Stéphane,

I did play around with the settings for the following options...but
nothing removed the auto-zooming effect...so I gave up.

a = gca();a.isoview a.auto_margins a.auto_scale a.cube_scaling

Out of curiosity:    Why was the feature removed?


Main question: How to reproduce the feature in Scilab 6 family?


Thank you,

Philipp



Am Mi., 7. Juli 2021 um 10:19 Uhr schrieb Stéphane Mottelet <
stephane.mottelet at utc.fr>:

> Philipp, you should at least add
>
> gc(a().isoview = "on"
>
>
> Le 07/07/2021 à 08:49, P M a écrit :
>
>
> Dear,
>
> is it possible to avoid the effect of auto-zoom / streching  when rotating
> a graph in 3D-view?...see result of attached code.
>
> My best guess is that one would have to set the a.margins according to
> the actual a.rotation_angles for each frame....but is there a easier way?
>
> Thank you,
> Philipp
>
> R=23;N=1000;nmax=1.1*6*N/%pi;// Random points in cube 2R*2R*2Rx=grand(nmax,1,'unf',-R,R);y=grand(nmax,1,'unf',-R,R);z=grand(nmax,1,'unf',-R,R);R2=R*R;// Exclude points outside of sphere with radius RT=(x^2+y^2+z^2)>R2;M=[x y z];M(T,:)=[];[r c]=size(M);M(((N+1):r), :)=[];x=M(:,1); y=M(:,2); z=M(:,3); f = figure();f.background = 8;f.axes_size = [300,300]
> s = linspace(5, 1, N);scatter3d(x,y,z,msizes=1,s);a = gca();a.box = "off";a.axes_visible = ["off","off","off"];a.x_label.visible = "off"a.y_label.visible = "off"a.z_label.visible = "off"
> outgif = "Sphere03.gif";idGif = animaGIF(gcf(), outgif, 1,2);for i = 0:360;
>     a.rotation_angles = [45, i];
>     idGif = animaGIF(gcf(), idGif); // Adds the current figure to the GIF streamend;animaGIF(idGif);    // Closes the GIF stream
>
>
>
>
>
>
>
>
>
> _______________________________________________
> users mailing listusers at lists.scilab.orghttp://lists.scilab.org/mailman/listinfo/users
>
> --
> Stéphane Mottelet
> Ingénieur de recherche
> EA 4297 Transformations Intégrées de la Matière Renouvelable
> Département Génie des Procédés Industriels
> Sorbonne Universités - Université de Technologie de Compiègne
> CS 60319, 60203 Compiègne cedex
> Tel : +33(0)344234688http://www.utc.fr/~mottelet
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20210707/8d514d47/attachment.htm>


More information about the users mailing list