Test
Aus Wiki1
(Unterschied zwischen Versionen)
Zeile 1: | Zeile 1: | ||
<jsxgraph box="jxgbox" width="500" height="500"> | <jsxgraph box="jxgbox" width="500" height="500"> | ||
- | var board = JXG.JSXGraph.initBoard("jxgbox", {boundingbox: [- | + | var board = JXG.JSXGraph.initBoard("jxgbox", {boundingbox: [-5, 8, 12, -5], axis:true}); |
// Erstelle den linken Wärmetauscher | // Erstelle den linken Wärmetauscher |
Version vom 09:43, 7. Apr. 2023
// Erstelle den rechten Wärmetauscher var heatexchanger2 = board.create('curve', [[8,0], [11,3], [14,3], [14,6], [11,6], [8,9], [5,6], [5,3], [8,0]], {strokeColor:'black', fillColor:'green', fillOpacity:0.5}); // Erstelle die Trennwand var wall = board.create('line', [[6,0], [6,9]], {strokeColor:'#000', strokeWidth:4}); // Erstelle die Temperaturmesspunkte var temp1 = board.create('glider', [2,2,heatexchanger1], {strokeColor:'#00f', fillColor:'#00f', size:10, name:'T1'}); var temp2 = board.create('glider', [10,2,heatexchanger2], {strokeColor:'#f00', fillColor:'#f00', size:10, name:'T2'}); // Berechne die Temperaturdifferenz var deltaT = board.create('segment', [temp1, temp2], {strokeColor:'#000', strokeWidth:2}); var label = board.create('text', [8, 7, function(){return 'ΔT = ' + Math.abs(temp1.Y() - temp2.Y()).toFixed(1) + ' K';}], {fontSize:18});
//board.update();
</jsxgraph>