Benutzer-Werkzeuge

Webseiten-Werkzeuge


test01

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
Letzte ÜberarbeitungBeide Seiten der Revision
test01 [2022/07/11 08:47] torsten.roehltest01 [2022/07/11 09:55] torsten.roehl
Zeile 1: Zeile 1:
-====== Überschrift ======+==AA== 
 +<PRELOAD>
  
 +#
 +# jsxgraph
 +#
 +https://cdn.jsdelivr.net/npm/jsxgraph/distrib/jsxgraphcore.js
 +https://cdn.jsdelivr.net/npm/jsxgraph/distrib/jsxgraph.css
  
-var board = JXG.JSXGraph.initBoard('box', {boundingbox: [-1.33, 1.33, 1.33, -1.33], axis: true}); +</PRELOAD> 
-board.suspendUpdate(); +<HTML>
-var b1c1 = board.create('circle', [[0,0], [1,0]]); +
-var b1p1 = board.create('point', [2, 0], {slideObject: b1c1}); +
-var perp = board.create('perpendicular', [board.defaultAxes.x,b1p1],[{strokeColor: '#ff0000', visible: true}, {visible: false}]); +
-var perp2 = board.create('perpendicular',[board.defaultAxes.y,b1p1],[{strokeColor: '#0000ff', visible: true}, {visible: false}]); +
-board.unsuspendUpdate();+
  
-// Animation +<body> 
-var animated false+<div id="box" class="jxgbox" style="width:500px; height:500px;"></div> 
-function animate(pointdirectioncount) +<script type="text/javascript"> 
-    if(animated) { +  
-        point.stopAnimation(); +board1 JXG.JSXGraph.initBoard('jxgbox1', {axis: true, boundingbox: [-6, 5, 6, -5]})
-        animated false+board1.suspendUpdate(); 
-    } else +var s = board1.create('slider'[[0.75,-2],[4.5,-2],[0,0,10]], {name:'S',snapWidth:1}); 
-        point.startAnimation(direction, count); +board1.create('functiongraph', [ 
-        animated true+    function(t) { 
-    +        var val = 0, sv = s.Value()+1, 
-}+        1
 +        for(var i = 0; i < sv; i++) 
 +            val = val + Math.sin(2*Math.PI*k*t)/k
 +            k +1
 +        
 +        return val+2; 
 +    }, -10, 10], {strokeColor: "#bb0000"});
  
-var board2 = JXG.JSXGraph.initBoard('box2', {boundingbox: [-1, 1.33, 7, -1.33]}); +board1.create('functiongraph', [ 
-board2.suspendUpdate(); +    function(t{ 
-var xax2 board2.create('axis'[[0,0], [1,0]])+        var val 0, sv = s.Value()+1, 
-board2.create('axis', [[0,0], [0,1]]); +            k = 1; 
-board2.create('ticks', [xax2, [Math.PI2*Math.PI]], {strokeColor: 'green', strokeWidth: 2});+        for(var i = 0; i < sv; i++{ 
 +            val = val + Math.sin(2*Math.PI*(2*k-1)*t)/(2*k-1); 
 +            k += 1; 
 +        } 
 +        return val-2; 
 +    }, -10, 10], {strokeColor: "#cc5520"});
  
-// sine: +board1.unsuspendUpdate(); 
-var b2p1 = board2.create('point',+ 
-             function(){ return JXG.Math.Geometry.rad([1,0],[0,0],b1p1); },  + 
-             function() { return b1p1.Y() }],  +</script> 
-             {fixed: true, trace: true, color: '#ff0000', name: 'S'}); + 
-// cosine: + 
-var b2p2 = board2.create('point', [ + 
-             function(){ return JXG.Math.Geometry.rad([1,0],[0,0],b1p1); },  +</body> 
-             function() { return b1p1.X() }],  +</HTML> 
-             {fixed: true, trace: true, color: '#0000ff', name: 'C'}); + 
-// Dependencies (only necessary if b2p1 or b2p2 is deleted) +hhjkjkj
-b1p1.addChild(b2p1); +
-b1p1.addChild(b2p2); +
-board2.unsuspendUpdate();+
  
-board.addChild(board2); 
test01.txt · Zuletzt geändert: 2022/07/11 09:57 von torsten.roehl