Test

Aus Wiki1

(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
Zeile 1: Zeile 1:
<painting width=500 height=456>Name der Zeichnung</painting>
<painting width=500 height=456>Name der Zeichnung</painting>
 +
 +
 +
<jsxgraph box="box" width="600" height="600">
 +
            var board = JXG.JSXGraph.initBoard('box', {boundingbox: [-10, 10, 10, -10], axis:true});
 +
 +
            // Create the two tanks
 +
            var tank1 = board.create('circle', [[-5, 0], 1], {fillcolor: '#8bc34a', strokecolor: 'black', name: 'Tank 1'});
 +
            var tank2 = board.create('circle', [[5, 0], 1], {fillcolor: '#8bc34a', strokecolor: 'black', name: 'Tank 2'});
 +
 +
            // Create the connecting pipe
 +
            var pipe = board.create('line', [tank1, tank2], {strokecolor: 'black', strokewidth: 2});
 +
 +
            // Create the heat exchanger
 +
            var exchanger = board.create('polygon', [[-2, 2], [-2, -2], [2, -2], [2, 2]], {fillcolor: '#2196f3', strokecolor: 'black', name: 'Heat exchanger'});
 +
 +
            // Create the heat flow arrow
 +
            var arrow = board.create('arrow', [[-3, 3], [3, -3]], {strokecolor: 'red', strokewidth: 2, withLabel: true, name: 'Heat flow'});
 +
 +
            // Create the temperature labels
 +
            var temp1 = board.create('text', [-5, -2, 'Temp 1'], {fontsize: 18});
 +
            var temp2 = board.create('text', [5, -2, 'Temp 2'], {fontsize: 18});
 +
 +
            // Create the temperature sensors
 +
            var sensor1 = board.create('point', [-5, 2], {visible: false});
 +
            var sensor2 = board.create('point', [5, 2], {visible: false});
 +
 +
            // Create the temperature meters
 +
            var meter1 = board.create('meter', [[-7, 2], [-7, 0], [-5, 0], [-5, 2]], {value: 50, label: 'Temp 1'});
 +
            var meter2 = board.create('meter', [[7, 2], [7, 0], [5, 0], [5, 2]], {value: 50, label: 'Temp 2'});
 +
 +
            // Create the temperature controller
 +
            var controller = board.create('slider', [[0, -8], [8, -8], [0, 0, 100]], {name: 'Controller'});
 +
            controller.on('drag', function() {
 +
                // Update the temperature meters
 +
                var temp1 = meter1.Value() + (controller.Value() - meter2.Value()) / 10;
 +
                var temp2 = meter2.Value() + (controller.Value() - meter1.Value()) / 10;
 +
</jsxgraph>

Version vom 09:24, 7. Apr. 2023

Name der Zeichnung


Revision 6


Persönliche Werkzeuge