BIOSCILAB
SCILAB 4.0 PAS-A-PAS
SCILAB 4.0 STEP-BY-STEP

Jacques-Deric Rouault

CNRS / INRIA

Volume 4   LE GRAPHISME
Volume 4   GRAPHISM
4.03 INTERACTIVITE
4.03 INTERACTIVITY
Version 4.0.22 du 6 Janvier 2006 / Version 4.0.22, January 6th 2006
Scilab 4.0 / Windows - Linux

4.02       LA MEMOIRE GRAPHIQUE / THE GRAPHIC MEMORY
ALLER A L'INDEX GENERAL / GO TO THE GENERAL INDEX
ALLER A LA TABLE GENERALE / GO TO THE GENERAL TABLE
4.10       GESTION DES FENETRES / MANAGING WINDOWS

4.03.01   Présentation / Presentation
4.03.10   Déplacer la fenetre / Moving the window
4.03.11   Agrandir/réduire la fenetre / Enlarging/reducing the window
4.03.12   Agrandir/réduire la fenetre / Enlarging/reducing the window
4.03.20   Zoom 2D / 2D Zoom
4.03.21   Zoom 3D / 3D Zoom
4.03.22   Rotations / Rotations
4.03.30   L'éditeur graphique / The graphic editor
4.03.40   Création d'objets graphiques / Creating graphic objects
4.03.50   Couper-Copier-Coller 2D / 2D Cut-Copy-Paste
4.03.98   Mon point de vue  / My viewpoint

4.03.01   Présentation / Presentation

La figure présentée à l'écran peut être modifiée très simplement de façon interactive par l'utilisateur, en temps réel.
The figure displayed at screen can be very simply modified by the user, in real time.

4.03.10   Déplacer la fenetre / Moving the window

Déplacer la fenetre graphique
Moving the graphic window


Exécutons le programme suivant.
Run the following program

//  Program Spas40310A
//  Designed for Scilab 3.1.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.03.10A");
hf = scf (1);
ha = gca ();
ha.axes_visible = "on";
ha.box = "on";

Télécharger le fichier / Download the file Spas40310A.sce

Nous obtenons la représentation d'un carré unité dans le plan.
We have the representation of a unit square.



En plaçant la souris sur le bandeau supérieur bleu de la fenetre et en déplaçant la souris tout en maintenant le bouton appuyé, il est possible de déplacer la fenetre graphique.
By moving the mouse on the upper blue edge of the window, and by moving the mouse while pressing the button, it is possible to move the graphic window.

Pour refermer la fenetre graphique, cliquer sur le carré rouge dans le coin supérieur droit.
To close this window, click on the red square at the upper right corner.

4.03.11   Agrandir/réduire la fenetre / Enlarging/reducing the window

Agrandir la fenetre graphique
Enlarging the graphic window

Reducing the graphic window
Réduire la fenetre graphique

Exécutons le programme suivant.
Run the following program

//  Program Spas40311A
//  Designed for Scilab 3.1.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.03.11A");
hf = scf (1);
ha = gca ();
ha.axes_visible = "on";
ha.box = "on";

Télécharger le fichier / Download the file Spas40311A.sce

Nous obtenons la représentation d'un carré unité dans le plan.
We have the representation of a unit square.

En plaçant la souris sur l'un des coins de la fenetre graphique et en déplaçant la souris en maintenant le bouton appuyé, il est possible d'agrandir ou de diminuer la fenetre graphique.
By moving the mouse on one of the corners of the window, and by by moving the mouse while pressing the button, it is possible to enlarge or reduce the graphic window.









Pour refermer la fenetre graphique, cliquer sur la croix dans le coin supérieur droit.
To close this window, click on the cross at the upper right corner.

4.03.12   Agrandir/réduire la fenetre / Enlarging/reducing the window

Agrandir la fenetre graphique (conserver les proportions)
Enlarging the graphic window (keeping the proportions)

Reducing the graphic window (keeping the proportions)
Réduire la fenetre graphique (conserver les proportions)

Exécutons le programme suivant.
Run the following program

//  Program Spas40312A
//  Designed for Scilab 3.1.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.03.12A");
hf = scf (1);
ha = gca ();
ha.axes_visible = "on";
ha.box = "on";
t=[0:0.1:2*%pi]';
plot2d(sin(t),cos(t),frameflag=4);

Télécharger le fichier / Download the file Spas40312A.sce

Nous obtenons la représentation d'un cercle unité dans le plan.
We have the representation of a unit circle.



En plaçant la souris sur l'un des coins de la fenetre graphique et en déplaçant la souris en maintenant le bouton appuyé, il est possible d'agrandir ou de diminuer la fenetre graphique. Le cercle reste un cercle.
By moving the mouse on one of the corners of the window, and by by moving the mouse while pressing the button, it is possible to enlarge or reduce the graphic window. The circle remains a circle.



Pour refermer la fenetre graphique, cliquer sur la croix dans le coin supérieur droit.
To close this window, click on the cross at the upper right corner.

4.03.20   Zoom 2D / 2D Zoom

Graphic zoom (2D)
Zoom graphique (2D)


Exécutons le programme suivant.
Run the following program

//  Program Spas40320A
//  Designed for Scilab 3.1.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.03.20A");
hf = scf (1);
ha = gca ();
ha.axes_visible = "on";
ha.box = "on";

Télécharger le fichier / Download the file Spas40320A.sce

Nous obtenons la représentation d'un carré unité dans le plan.
We have the representation of a unit square.



Cliquer sur le bouton + puis dessiner avec la souris un rectangle sur une partie du carré et recliquer. Nous obtenons un zoom.
Click on the button +, then draw a rectangle with the mouse on a part of the square, the click again. We have a zoom.



Il est possible de rezoomer.
It is possible to zoom again.



Pour revenir à l'image initiale, cliquer sur le bouton -.
To return to the initial image, click on the button -.

Pour refermer la fenetre graphique, cliquer sur le carré rouge dans le coin supérieur droit.
To close this window, click on the red square at the upper right corner.

NB : Il y a un bug sous Windows quand on demande un zoom trop puissant : BUG 1418.

NOTE: There is a bug under Windows when a too powerfull zoom is asked: BUG 1418.

//  Program Spas40320B
//  Designed for Scilab 3.1.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.03.20B");
x=[0:0.01:100];
y=sin(x);
plot(x, y);

Télécharger le fichier / Download the file Spas40320B.sce

Nous obtenons le tracé d'une sinusoide dans le plan.
We have the drawing of a sine curve.



En zoomant plusieurs fois de suite, nous obtenons :

By zooming several times, we get:



4.03.21   Zoom 3D / 3D Zoom

Graphic zoom (3D)
Zoom graphique (3D)


Exécutons le programme suivant.
Run the following program

//  Program Spas40321A
//  Designed for Scilab  4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.03.21A");
hf = scf (1);
ha = gca ();
ha.axes_visible = "on";
ha.box = "on";
ha.view = "3d";

Télécharger le fichier / Download the file Spas40321A.sce

Nous obtenons la représentation d'un cube unité dans l'espace
We have the representation of a unit cube.


Cliquer sur le bouton + puis dessiner avec la souris un rectangle sur une partie de la fenetre et recliquer. Nous obtenons un zoom.
Click on the button +, then draw a rectangle with the mouse on a part of the window, the click again. We have a zoom.



Pour revenir à l'image initiale, cliquer sur le bouton -.
To return to the initial image, click on the button -.

Pour refermer la fenetre graphique, cliquer sur la croix dans le coin supérieur droit.
To close this window, click on the cross at the upper right corner.

4.03.22   Rotations / Rotations

alpha (Rotation graphique, Graphic rotation)
Graphic rotation
Rotation graphique
theta (Rotation graphique, Graphic rotation)


Exécutons le programme suivant :
Run the following program:

//  Program Spas40322A
//  Designed for Scilab 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.03.22A");
hf = scf (1);
ha = gca ();
ha.axes_visible = "on";
ha.box = "on";
ha.view = "3d";

Télécharger le fichier / Download the file Spas40322A.sce

Nous obtenons la représentation d'un cube unité dans l'espace.
We have the representation of a unit cube in space.



Appuyer une fois sur le 3e bouton (un cercle avec une fleche),  faire tourner le cube avec la souris, puis cliquer à nouveau.
Click once on the 3rd botton (a circle with an arrow), make the cube turn with the mouse, then click again.



En bas de l'écran s'affichent les valeurs des deux angles alpha et theta qui localisent l'observateur par rapport à la figure.
At the bottom of the screen, the values of the two angles alpha and theta that localize the position of the observer in regard of the figure.

Pour refermer la fenetre graphique, cliquer sur le carré rouge dans le coin supérieur droit.
To close this window, click on the red square at the upper right corner.
quare at the upper right corner.

4.03.30   L'éditeur graphique / The graphic editor

Editeur graphique
Figure Editor
GED
Graphic editor

Exécutons le programme suivant :
Run the following program:

//  Program Spas40330A
//  Designed for Scilab 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.03.30A");
hf = scf (1);
ha = gca ();
ha.axes_visible = "on";
ha.box = "on";
xsegs ([0.1, 0.9], [0.2, 0.8]);

Télécharger le fichier / Download the file Spas40330A.sce

Nous obtenons la représentation d'un segment dans le carré unité
We have the representation of a segment in the unit square.





Sous Windows, en cliquant sur la case GED, une nouvelle fenetre Figure Editor s'ouvre.
Under Windows, when clicking on the box GED, a new window Figure Editor opens.



Sous Linux, en cliquant sur la case Edit, puis Current axes properties, une nouvelle fenetre Axes Editor s'ouvre.
Under Linux, when clicking on the box EDIT, then Current axes properties, a new window Axes Editor opens.



En cliquant sur Axes(1), la ligne Segs(1) apparait.
When clicking Axes(1), the line Segs(1) appears.





En cliquant sur Segs(1), les propriétés du segment sont visualisées.
When clicking Segs(1), The properties of the segment are visualized.





Les différentes propriétés du segment sont visualisées. Il est alors possible de les modifier de façon interactive. Par exemple, modifions l'épaisseur du trait de 1 à 10.
The different properties of the segment are visualized. Then, it is possible to change them in an interactive way. For instance, let us change the thickness from 1 to 10.





La représentation du segment est immédiatement modifiée en conséquence.
The representation of the segment is immediatly changed according to the new value.





4.03.40   Création d'objets graphiques / Creating graphic objects

Creating graphic objects
Création d'objets graphiques

Exécutons le programme suivant :
Run the following program:

//  Program Spas40340A
//  Designed for Scilab 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.03.40A");
hf = scf (1);
ha = gca ();
ha.axes_visible = "on";

Télécharger le fichier / Download the file Spas40340A.sce

Sous Windows, nous obtenons un carré unité
Under Windows, we have the representation of a unit square.



En cliquant sur les 7 cases de droite, nous dessinons successivement avec la souris :
By clicking on the 7 case at the right, we sucessively draw:

Un segment / a segment.
Une ligne brisée / a polyline.
Un segment avec une flèche / a segment with one arrow
Un segment avec deux flèches / a segment with two arrows
Un texte / a text.
Un rectangle / a rectangle.
Une ellipse / an ellipse.



Sous Linux, en cliquant sur la case Insert, nous avons les 7 objets graphiques :
Unser Linux, by clicking on the case Insert, we have the 7 graphic objets:





4.03.50   Couper-Copier-Coller 2D / 2D Cut-Copy-Paste


Exécutons le programme suivant :
Run the following program:

//  Program Spas40350A
//  Designed for Scilab 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.03.50A");
hf = scf (1);
ha = gca ();
ha.axes_visible = "on";
ha.box = "on";

Télécharger le fichier / Download the file Spas40350A.sce

Nous obtenons un carré unité
We have the representation of a unit square.



Nous créons un rectangle en cliquant la case Rectangle.
We create a rectangle by clicking on the case Rectangle.



Cliquer sur Editer/Edit puis sur Déplacer objet/move object .
Click on Editer/Edit, then on Deplacer objet/Move object.



Attraper le rectangle en cliquant exactement le bord haut ou bas, et le faire glisser avec la souris.
Catch the rectangle by accutely clicking its lower or upper edge, then move it with the mouse.



Cliquer sur Editer/Edit puis sur Copier objet/Copy object .
Click on Editer/Edit, then on Copier objet/Copy object.



Attraper le rectangle en cliquant exactement le bord haut ou bas.
Catch the rectangle by accutely clicking its lower or upper edge.

Cliquer sur Editer/Edit puis sur Coller objet/Paste object .
Click on Editer/Edit, then on Coller objet/Paste object.



Cliquer dans la fenetre graphique.
Click into the graphic window.



4.03.98   Mon point de vue  / My viewpoint

Cette gamme d'outils interactifs font de Scilab un logiciel graphique extrèmement puissant. Cette interactivité devient indispensable dans le cadre d'une communication visuelle.
These set of interactive tools make Scilab to be an extremely powerfull graphic software. This interactivity becomes mandatory in the context of a visual communication.

4.03.99   Zones d'ombre  / Shadowy areas

NB : Il y a un bug quand on demande un zoom trop puissant : BUG 1418.
NOTE: There is a bug when a too powerfull zoom is asked: BUG 1418.

4.02       LA MEMOIRE GRAPHIQUE / THE GRAPHIC MEMORY
ALLER A L'INDEX GENERAL / GO TO THE GENERAL INDEX
ALLER A LA TABLE GENERALE / GO TO THE GENERAL TABLE
4.10       GESTION DES FENETRES / MANAGING WINDOWS