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: [-2, 8, 12, -2], axis:true}); | |
- | + | ||
- | + | // Erstelle den linken Wärmetauscher | |
- | + | var heatexchanger1 = board.create('curve', [[0,0], [3,3], [6,3], [6,6], [3,6], [0,9], [-3,6], [-3,3], [0,0]], {strokeColor:'#00f', fillColor:'#00f', fillOpacity:0.5}); | |
- | + | </jsxgraph> | |
// Erstelle den rechten Wärmetauscher | // Erstelle den rechten Wärmetauscher |
Version vom 09:41, 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:'#f00', fillColor:'#f00', 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>