Hi Philip,

Here is a possible implementation for the next major release of Scilab (6.2)

https://codereview.scilab.org/#/c/21801/

Take a look at the video and tell me if it is OK for you. However, there are still some glitches which have to fo be fixed (e,g, problems when zooming in isoview mode) but we have some time to think about it.

S.

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*2R
x=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 R
T=(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 
stream
end;
animaGIF(idGif);     // Closes the GIF stream








_______________________________________________
users mailing list
users@lists.scilab.org
http://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)344234688
http://www.utc.fr/~mottelet

_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to