DEMOS

Principle
Interpreter demos
Anyflo demos
Application demos
Sensitive demos
Launching
Protocols

















































Principle

demox_ddd.func is a file functions all written in anyuflo language) giving an use example of command ddd:
       x=0: interpreter.
       x=1: anyflo.
       x>1: application level x.
All demos have been developed from one basic generic functions:
modele_menu_simple.func
modele_multi_menu.func
modele_sous_menu.func
It is advisable to begin developing new applications in this way

To be translated automatically, we must write these demos in English, using phrases Voc_eng file to be translated into sentences Voc_eng
CAUTION: Do not use words Voc_eng as variable names or functions (because they would then be translated ...).

These functions have a purely didactic and only serve to illustrate some aspects of command with the possibility of varying the parameter scales and visualize the effects (it is essential that you read the corresponding help ).
To produce more advanced effects it is necessary to write programs more complex.

They were written in a standard way and it is advisable to develop any interactive application name xxx by following the following conventions:
1) First function is:
xxx()
{
       init();
       interaction func(0,"F0")func(1,"F1")func(2,"F2")func(3,"F3")func(4,"F4")func(5,"F5");
{

2) Others are:
externes()
init()
generate_menu()

Functions Fi()
Another functions
See examples in the demos.

Note:
Only the functions contained in the demos are assumed without error, and if all the demos work can be seen that the system is (partially) operational.

Applications

The user can write his own demos demon_ddd.func for application level n. demon_ddd.func pour une application de niveau n. L´utilisateur peut écrire ses propres démos demon_ddd.func pour une application de niveau n.

Sensitive demos

Given the large number of demos (more than commands), it is impossible to test them all to each program change, here is the list of demos to validate the main features:

Display:
       demo1_displ.func

Attach:
       demo1_attach.func
       demo1_field.func
       demo1_collision.func
       demo1_dynamic.func
       exemple_6.func

Scales:
       demo1_scale.func

Pour la récursivité:
       demo1_factorielle.func: factorielle
       vonkoch.func et vonkoch.func: courbe de Von Koch
       demo1_frac.func fractals

Images:
       demo1_image.func

Pour les algorithmes génétiques:
       demo1_genetic.func

Pour les périphériques (capteurs):
       demo1_device.func

Neural networks:
       demo1_network.func

Trajectories:
       demo1_traj.func

Generat tests:
       test.func

Launching

Under Window

Files demo*.func (located in the folder env and whose primary function with the same name) are initiated by the same name files (located in the root), but .js extension.

However some demos launch the same function with different parameters:
       demo1_aleax.js demo1_aleay.js demo1_aleaz.js
              launch aleaxyz.func.
       demo1_cutx.js demo1_cuty.js demo1_cutz.js
              launch cutxyz.func.
       demo1_dilx.js demo1_dily.js demo1_dilz.js
              launch dilaxyz.func.
       demo1_cube.js demo1_geod.js demo1_grid.js demo1_prismr.js
              launch demo1_vol.
       demo1_dynamic.js demo1_mass.js
              launch dynamic.func.
       demo1_rota.js demo1_rotx.js demo1_roty.js demo1_rotz.js
              launch rotaxyz.func.
       demo1_frame.js demo1_pixel.js demo1_rectangle.js demo1_segment.js
              launch primitive.func.

Click on demo0*.js: language demos.
Cliquer sur demo1*.js: anyflo demos.

Under anyflo

demo com launches the command com demo, first for the interpreter, and possibly for anyflo, prefer:
demo0_com() or demo1_com()
Notes:
1) For an interpreter commande it is also possible: demo0_com().
2) For an anyflo commande it is also possible: demo1_com().
In this case if thecommand is common language and anyflo 2 demos are launched following. For example message, there will first émissin messages by demo0_message.func (including error messages that will ring the terminal ...) and execution for graphic demo1_message.func anyflo messages.
3) For demos such as rota rotx roty rotz or dila rotx roty rotz dilx dily dilz hom should call rotaxyz () or dilaxyz ().

Protocols:

To simplify the writing and debugging functions it is advisable to follow the following protocols:

Function names

The function of main menu is MEN, help assocoated is HEL.
The names of the functions in the menus are the same as those shown in the boxes.
The functions of a submenuSM will form SM_FFF, eg associated help will be SM_HEL.
The names of the functions called by these functions will form SM_FFF_GGG.
Functions as a validable SM_FFF be triggered by:
if(evaluate menu("SM")menu("SM_FFF")>0)func_SM_FFF();

Helps

Help will be triggered by:
if(evaluate menu("SM")menu("SM_HEL")>0)text(Help_SM)poi(X_HEL,Y_HEL)rectangle(0,0,0);

Interaction

It is ensured by callback interaction func(5,"F5").
The fonction F5() will contain the menus, the inputs and the graphic outputs:
menu
scale
mouse
displ