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.02 LA MEMOIRE GRAPHIQUE
4.02 THE GRAPHIC MEMORY
Version 4.0.19 du 23 Décembre 2005 / Version 4.0.19, December 23th 2005
Scilab 3.1.1 - Scilab 4.0 - Windows

4.00       LE GRAPHISME SCILAB / SCILAB GRAPHISM
ALLER A L'INDEX GENERAL / GO TO THE GENERAL INDEX
ALLER A LA TABLE GENERALE / GO TO THE GENERAL TABLE
4.03       INTERACTIVITE / INTERACTIVITY   

4.02.01   Principe / Principle
4.02.02   Ancien et nouveau mode graphiques / Old and new graphic modes
4.02.03   Fonctionnement / Working

4.02.01   Principe / Principle

Ecran graphique
Graphic memory
Graphic screen
Mémoire graphique


Dans l'affichage graphique, nous avons un point de départ qui est le programme Scilab avec ses instructions, et un ou plusieurs points d'arrivée, l'écran de l'ordinateur et les éventuels fichiers graphiques.
In the graphic display, we have the departure point, the Scilab program with its instructions, and one or several arrival points, the screen of the computer and the optionnal graphic files..

Cependant, le passage de l'un à l'autre n'est pas direct, et, pour comprendre comment fonctionne le graphisme, il faut considérer plusieurs étapes intermédiares :
However, the passage from the fist one to the last one is not direct, and to understand how works the graphics, several intermediate steps have to be considered.

1) Le point de départ, le programme avec les instruction graphiques de Scilab.
1) The departure point, the program Scilab with the graphic instructions of Scilab.

2) L'interprétation des instructions sous forme de modification des variables internes (par exemple la couleur) et/ou en code de tracés graphiques interne (par exemple tracer un cercle).
2) The interpretation of  instructions under the form of modification of internal variables (for instance the colour) and/or into codes of internal graphic draws. (for instance to draw a circle).

3) La conversion des ordres graphiques en points et segments selon des échelles formelles en nombres réels (par exemple convertir le tracé d'un cercle en celui de 300 segments de droite). Les fonction de zoom et de rotation de la fenetre graphique agissent à ce niveau.
3) The conversion of the graphic instructions into points and segments expresses in formal scales in real numbers (for instance, to convert the draw of a circle into the draw of 300 straight segments). The functions of zoom and rotation of the graphic window acts at this level.

4) La conversion de l'échelle formelle en échelle discrète finale des pixels.
4) The conversion of the formal scale in the final discrete scale of the pixels.

5) La mise à jour de la mémoire graphique gérée par Scilab.
5) The update of the graphic memory managed by Scilab.

6) La mise à jour de la mémoire graphique dédiée de l'ordinateur.
6) The update of the specific graphic memory of the computer.

7) La conversion de la mémoire graphique en couleurs des pixels à l'écran. Cette opération est effectuée automatiquement par un processeur spécifique.
7) The conversion of the graphic memory into coloured pixels of screen. This operation is automatically performed by a specific processeur.

4.02.02   Ancien et nouveau mode graphiques / Old and new graphic modes



La différence entre le fonctionnement des deux modes graphiques se situe au second niveau :
The difference between the two graphic modes sets at the second level:

Dans l'ancien mode graphique,  les figures tracées sont mémorisées sous forme d'une liste séquentielle d'ordres. Toute modification consiste à ajouter de nouveaux ordres dans la liste, ou à supprimer l'ensemble. Comme cette liste est entièrement retraitée à chaque nouvel affichage, le temps de traitement est de plus en plus longs.
In the old graphic mode, the figures drawn are memorized under the form of a sequential list of commands. Each modification consists in adding new commands in the list, or to delete the whole list. As this list is wholly retreated for each new display, the delays of treatment are longer and longer.

Dans le nouveau mode graphique,  les figures tracées sont mémorisées sous forme d'un arbre de handles décrivant les structures et leurs propriétés. Cet arbre est retraité à chaque nouvel affichage. Les modifications consistent à changer les valeurs des branches, à en rajouter ou à en supprimer. Le temps de traitement ne dépend que de la complexité de l'arbre, et pas du nombre d'opérations graphiques préalablement effectuées.
In the new graphic mode, the figures drawn are memorized under the form of a tree of handles describing the structures and their properties. The modifications consists in changing the values of branches, adding or sippressing branches. The delay of treatment depends only on the complexity of the tree, not in the number of graphic operation previously performed.

4.02.03   Fonctionnement / Working

drawlater
drawnow


Certaines instructions graphiques agissent seulement sur la modification des états internes des mémoires de Scilab, et agissent jusqu'aux niveaux 3 ou 4.
Some graphic instructions acts only on the modification of the internal states of the Scilab memories, and have an action till levels 3 or 4.

D'autres instructions graphiques provoquent une modification de l'image graphique finale, et agissent jusqu'au niveau 7.
Other instructions cause a modification of the final graphic image, and have an action till level 7.

Par défaut, chaque instruction graphique est immédiatement exécutée et modifie en temps réel l'image figurée à l'écran.
By default, each graphic instruction is immediatly executed ans modified in real time the image figured at screen.

Il est possible de modifier ce fonctionnement avec drawlater qui  bloque le processus au niveau 5  (ancien mode graphique) ou au niveau 3  (nouveau mode graphique) . L'instruction drawnow provoque l'activation des niveaux supérieurs. Ce fonctionnement accelère la vitesse d'exécution et fluidifie l'affichage.
It is possible to modify this working with drawlater which blocks the process at level 5 (old graphic mode) or 3 (new graphic mode). The instruction drawnow causes the activation of the upper levels. This way of working accelerates the running and fluidifies the display.

Les commandes interactives de zoom et de rotation de la fenetre graphique reprennent le graphisme au niveau 4 et le réinterprète jusqu'au niveau 7.
The interactive  commands of zoom and rotation of the graphic window reconsider the graphism for the levels 4 to 7.

4.00       LE GRAPHISME SCILAB / SCILAB GRAPHISM
ALLER A L'INDEX GENERAL / GO TO THE GENERAL INDEX
ALLER A LA TABLE GENERALE / GO TO THE GENERAL TABLE
4.03       INTERACTIVITE / INTERACTIVITY