Skip to content

Commit

Permalink
matrices variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Alain authored and Alain committed Oct 10, 2016
1 parent eca9f66 commit d311502
Show file tree
Hide file tree
Showing 19 changed files with 521 additions and 6 deletions.
10 changes: 7 additions & 3 deletions Sofus.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<script src="javascript/blocks_compressed.js"></script>
<script src="javascript/javascript_compressed.js"></script>
<script src="javascript/fr.js"></script>
<script src="javascript/jquery-2.2.1.min.js"></script>
<script src="javascript/jquery-3.1.1.min.js"></script>
<script src="javascript/tortue.js"></script>
<script src="javascript/fractions.js"></script>
<script src="javascript/sylvester.js"></script>
Expand All @@ -29,8 +29,7 @@
</script>
<h1><img src="favicon.ico"/> avec Blockly<img src="img/turtle.png"/></h1>

<p>Pour écrire un programme de calcul, glisser les éléments sur le plan de travail. Pour effacer, glisser tout vers la corbeille
(en bas à droite). </p>
<p>Programmer sans se prendre la tête avec les tortues</p>

<table><tr><td>
<div id="blocklyDiv" style="height: 480px; width: 800px;"></div>
Expand Down Expand Up @@ -474,6 +473,7 @@ <h1><img src="favicon.ico"/> avec Blockly<img src="img/turtle.png"/></h1>
<category name="Vecteurs" colour="20">
<category name="construction">
<block type="vec_const"></block>
<block type="vec_expr"></block>
<block type="vec_nul"></block>
<block type="vec_alea"></block>
<block type="vec_unitaire"></block>
Expand Down Expand Up @@ -518,6 +518,7 @@ <h1><img src="favicon.ico"/> avec Blockly<img src="img/turtle.png"/></h1>
<block type="mat_colonne1"></block>
<block type="mat_colonne2"></block>
<block type="mat_diagonal"></block>
<block type="mat_col"></block>
</category>
</category>
<category name="3D">
Expand All @@ -526,12 +527,15 @@ <h1><img src="favicon.ico"/> avec Blockly<img src="img/turtle.png"/></h1>
<block type="vec_alea3"></block>
<block type="vec_nul3"></block>
<block type="mat_colonne3"></block>
<block type="vec_cote"></block>
<block type="vec_expr3D"></block>
</category>
<category name="matrices">
<block type="mat_3D"></block>
<block type="mat_id3"></block>
<block type="mat_alea3"></block>
<block type="mat_nulle3"></block>
<block type="mat3D_col"></block>
</category>
</category>

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion css/sofus.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
text-shadow: 2px 1px 3px gray; }
#sortieSVG { display: none; width: 640px; height: 400px; }
#graphique { width: 640px; height: 480px; border: 3px inset gray; background-image: url("img/sableblanc.jpg"); }
#sortieNum { resize: both; height: 240px; width: 640px; background-color: lightCyan; border: 3px inset green; text-shadow: 2px 1px 3px gray; }
#sortieNum { resize: both; height: 80px; width: 640px; background-color: lightCyan; border: 3px inset green; text-shadow: 2px 1px 3px gray; }
313 changes: 313 additions & 0 deletions exemples/bezout.sof
Original file line number Diff line number Diff line change
@@ -0,0 +1,313 @@
<xml xmlns="http://www.w3.org/1999/xhtml">
<block type="procedures_defreturn" collapsed="true" x="75" y="-29">
<mutation>
<arg name="a"></arg>
<arg name="b"></arg>
</mutation>
<field name="NAME">bezout</field>
<statement name="STACK">
<block type="variables_set">
<field name="VAR">c1</field>
<value name="VALUE">
<block type="vec_expr3D">
<value name="ABS">
<block type="variables_get">
<field name="VAR">a</field>
</block>
</value>
<value name="ORD">
<block type="math_number">
<field name="NUM">1</field>
</block>
</value>
<value name="COT">
<block type="math_number">
<field name="NUM">0</field>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set">
<field name="VAR">c2</field>
<value name="VALUE">
<block type="vec_expr3D">
<value name="ABS">
<block type="variables_get">
<field name="VAR">b</field>
</block>
</value>
<value name="ORD">
<block type="math_number">
<field name="NUM">0</field>
</block>
</value>
<value name="COT">
<block type="math_number">
<field name="NUM">1</field>
</block>
</value>
</block>
</value>
<next>
<block type="controls_whileUntil">
<field name="MODE">UNTIL</field>
<value name="BOOL">
<block type="logic_compare">
<field name="OP">LT</field>
<value name="A">
<block type="vec_abscisse">
<value name="autre">
<block type="variables_get">
<field name="VAR">c2</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number">
<field name="NUM">1</field>
</block>
</value>
</block>
</value>
<statement name="DO">
<block type="variables_set">
<field name="VAR">c3</field>
<value name="VALUE">
<block type="variables_get">
<field name="VAR">c2</field>
</block>
</value>
<next>
<block type="variables_set">
<field name="VAR">q</field>
<value name="VALUE">
<block type="vec_abscisse">
<value name="autre">
<block type="variables_get">
<field name="VAR">c1</field>
</block>
</value>
</block>
</value>
<next>
<block type="sophus_diviser">
<field name="VAR">q</field>
<value name="DELTA">
<block type="vec_abscisse">
<value name="autre">
<block type="variables_get">
<field name="VAR">c2</field>
</block>
</value>
</block>
</value>
<next>
<block type="sophus_tronquer">
<field name="VAR">q</field>
<field name="GRAD">1e-</field>
<value name="DELTA">
<block type="math_number">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="variables_set">
<field name="VAR">c2</field>
<value name="VALUE">
<block type="vec_fois">
<field name="lui">c2</field>
<value name="autre">
<block type="variables_get">
<field name="VAR">q</field>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set">
<field name="VAR">c1</field>
<value name="VALUE">
<block type="vec_sub">
<field name="lui">c1</field>
<value name="autre">
<block type="variables_get">
<field name="VAR">c2</field>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set">
<field name="VAR">c2</field>
<value name="VALUE">
<block type="variables_get">
<field name="VAR">c1</field>
</block>
</value>
<next>
<block type="variables_set">
<field name="VAR">c1</field>
<value name="VALUE">
<block type="variables_get">
<field name="VAR">c3</field>
</block>
</value>
<next>
<block type="big_aff">
<value name="VAR">
<block type="vec_aff">
<value name="vec">
<block type="variables_get">
<field name="VAR">c1</field>
</block>
</value>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</statement>
<value name="RETURN">
<block type="text_join">
<mutation items="9"></mutation>
<value name="ADD0">
<block type="vec_ordonnee">
<value name="autre">
<block type="variables_get">
<field name="VAR">c1</field>
</block>
</value>
</block>
</value>
<value name="ADD1">
<block type="text">
<field name="TEXT">×</field>
</block>
</value>
<value name="ADD2">
<block type="variables_get">
<field name="VAR">a</field>
</block>
</value>
<value name="ADD3">
<block type="text">
<field name="TEXT"> + </field>
</block>
</value>
<value name="ADD4">
<block type="vec_cote">
<value name="autre">
<block type="variables_get">
<field name="VAR">c1</field>
</block>
</value>
</block>
</value>
<value name="ADD5">
<block type="text">
<field name="TEXT">×</field>
</block>
</value>
<value name="ADD6">
<block type="variables_get">
<field name="VAR">b</field>
</block>
</value>
<value name="ADD7">
<block type="text">
<field name="TEXT"> = </field>
</block>
</value>
<value name="ADD8">
<block type="math_arithmetic">
<field name="OP">ADD</field>
<value name="A">
<block type="math_arithmetic">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="vec_ordonnee">
<value name="autre">
<block type="variables_get">
<field name="VAR">c1</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="variables_get">
<field name="VAR">a</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_arithmetic">
<field name="OP">MULTIPLY</field>
<value name="A">
<block type="vec_cote">
<value name="autre">
<block type="variables_get">
<field name="VAR">c1</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="variables_get">
<field name="VAR">b</field>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
<block type="big_efface" x="89" y="26">
<next>
<block type="big_aff">
<value name="VAR">
<block type="procedures_callreturn">
<mutation name="bezout">
<arg name="a"></arg>
<arg name="b"></arg>
</mutation>
<value name="ARG0">
<block type="math_number">
<field name="NUM">10946</field>
</block>
</value>
<value name="ARG1">
<block type="math_number">
<field name="NUM">6765</field>
</block>
</value>
</block>
</value>
</block>
</next>
</block>
</xml>
Loading

0 comments on commit d311502

Please sign in to comment.