Logique
Boucles
Math
Texte
Listes
Données
Variables
Fonctions
Programmation
p5.js
Objets web
Propriétés
Formes
Tortue
Apparence
GeoGebra
var canvas, bibSystCoord, x, xmin, xmax, ymin, ymax, a, b, y, temp, pas, compteur, pasY, pasX, f, debut, fin, gliss, d, c, ligne1, ligne2, s1, ligne3, rd, s2, ligne4, nomParametre, valeur, commande, ggbOK, info, figGGBchargee; /** * Fonction exécutée une fois, au départ */ function actions_initiales() { definirPageWebExecution('../../Nouvelles/Fichiers/cadres_p5V_algoGGB/Graphe/graphe.html'); createSpan("<br>"); gliss=createSlider(1,10,1,1); info=createSpan(' n = 1'); commandes_initiales_GeoGebra(); } /** * Décrire cette fonction… */ function commandes_initiales_GeoGebra() { if (!eval('chargementCadreGGBtermine("cadre1")')) { faireDelaiPrudent("commandes_initiales_GeoGebra",commandes_initiales_GeoGebra,0.1); return ; } eval('executerCommandeGeoGebra("n=1","cadre1")'); eval('executerCommandeGeoGebra("a=Slider( -10, 10, 0.01, 1, 100,false, true, false, false)","cadre1")'); eval('fixerValeurVariableGeoGebra("a",2,"cadre1")'); eval('fixerValeurVariableGeoGebra("n",gliss.value(),"cadre1")'); eval('executerCommandeGeoGebra("f=If[x<0,sin(n*x),a*x]","cadre1")'); eval('executerCommandeGeoGebra("ZoomIn(-10,-10,10,10)","cadre1")'); } /** * Fonction exécutée périodiquement, de façon répétée */ function actions_en_boucle() { if (eval('chargementCadreGGBtermine("cadre1")')) { fixeContenuPrudent("info",info,(String(' n = ') + String(valeurPrudent("gliss",gliss)))); eval('fixerValeurVariableGeoGebra("n",gliss.value(),"cadre1")'); } }