<iframe src="http://jsxgraph.org/share/iframe/predicting-maximal-strength" style="border: 1px solid black; overflow: hidden; width: 550px; aspect-ratio: 55 / 65;" name="JSXGraph example: Predicting maximal strength" allowfullscreen ></iframe>
<div id="board-0-wrapper" class="jxgbox-wrapper " style="width: 100%; "> <div id="board-0" class="jxgbox" style="aspect-ratio: 1 / 1; width: 100%;" data-ar="1 / 1"></div> </div> <script type = "text/javascript"> /* This example is licensed under a Creative Commons Attribution ShareAlike 4.0 International License. https://creativecommons.org/licenses/by-sa/4.0/ Please note you have to mention The Center of Mobile Learning with Digital Technology in the credits. */ const BOARDID = 'board-0'; var board = JXG.JSXGraph.initBoard(BOARDID, { boundingbox: [-1, 1.8, 30, 0.8], axis: true }); var w = board.create('slider', [[24, 0.92], [24, 1.7], [0, 50, 200]], { name: 'weight w', snapWidth: 1 }); var f = function(x) { return (0.988 + 0.0104 * x + 0.00190 * x * x - 0.0000584 * x * x * x); }; var c = board.create('functiongraph', [ f, 1, 22 ], { strokeColor: 'black', highlightStrokeColor: 'black' }); var r = board.create('glider', [10, 1, c], { name: '', fillColor: 'black', strokeColor: 'black', style: 6 }); var t = board.create('text', [function() { return r.X() + 1; }, function() { return r.Y(); }, function() { return "repetitions r = " + Math.floor(r.X()); }]); board.create('text', [5, 1.6, function() { return "predicted 1RM = " + (w.Value() * f(Math.floor(r.X()))).toFixed(2); } ], { fontSize: 24, strokeColor: 'red' }); </script>
/* This example is licensed under a Creative Commons Attribution ShareAlike 4.0 International License. https://creativecommons.org/licenses/by-sa/4.0/ Please note you have to mention The Center of Mobile Learning with Digital Technology in the credits. */ const BOARDID = 'your_div_id'; // Insert your id here! var board = JXG.JSXGraph.initBoard(BOARDID, { boundingbox: [-1, 1.8, 30, 0.8], axis: true }); var w = board.create('slider', [[24, 0.92], [24, 1.7], [0, 50, 200]], { name: 'weight w', snapWidth: 1 }); var f = function(x) { return (0.988 + 0.0104 * x + 0.00190 * x * x - 0.0000584 * x * x * x); }; var c = board.create('functiongraph', [ f, 1, 22 ], { strokeColor: 'black', highlightStrokeColor: 'black' }); var r = board.create('glider', [10, 1, c], { name: '', fillColor: 'black', strokeColor: 'black', style: 6 }); var t = board.create('text', [function() { return r.X() + 1; }, function() { return r.Y(); }, function() { return "repetitions r = " + Math.floor(r.X()); }]); board.create('text', [5, 1.6, function() { return "predicted 1RM = " + (w.Value() * f(Math.floor(r.X()))).toFixed(2); } ], { fontSize: 24, strokeColor: 'red' });
<jsxgraph width="100%" aspect-ratio="1 / 1" title="Predicting maximal strength" description="This construction was copied from JSXGraph examples database: BTW HERE SHOULD BE A GENERATED LINKuseGlobalJS="false"> /* This example is licensed under a Creative Commons Attribution ShareAlike 4.0 International License. https://creativecommons.org/licenses/by-sa/4.0/ Please note you have to mention The Center of Mobile Learning with Digital Technology in the credits. */ var board = JXG.JSXGraph.initBoard(BOARDID, { boundingbox: [-1, 1.8, 30, 0.8], axis: true }); var w = board.create('slider', [[24, 0.92], [24, 1.7], [0, 50, 200]], { name: 'weight w', snapWidth: 1 }); var f = function(x) { return (0.988 + 0.0104 * x + 0.00190 * x * x - 0.0000584 * x * x * x); }; var c = board.create('functiongraph', [ f, 1, 22 ], { strokeColor: 'black', highlightStrokeColor: 'black' }); var r = board.create('glider', [10, 1, c], { name: '', fillColor: 'black', strokeColor: 'black', style: 6 }); var t = board.create('text', [function() { return r.X() + 1; }, function() { return r.Y(); }, function() { return "repetitions r = " + Math.floor(r.X()); }]); board.create('text', [5, 1.6, function() { return "predicted 1RM = " + (w.Value() * f(Math.floor(r.X()))).toFixed(2); } ], { fontSize: 24, strokeColor: 'red' }); </jsxgraph>
// Define the id of your board in BOARDID var board = JXG.JSXGraph.initBoard(BOARDID, { boundingbox: [-1, 1.8, 30, 0.8], axis: true }); var w = board.create('slider', [[24, 0.92], [24, 1.7], [0, 50, 200]], { name: 'weight w', snapWidth: 1 }); var f = function(x) { return (0.988 + 0.0104 * x + 0.00190 * x * x - 0.0000584 * x * x * x); }; var c = board.create('functiongraph', [ f, 1, 22 ], { strokeColor: 'black', highlightStrokeColor: 'black' }); var r = board.create('glider', [10, 1, c], { name: '', fillColor: 'black', strokeColor: 'black', style: 6 }); var t = board.create('text', [function() { return r.X() + 1; }, function() { return r.Y(); }, function() { return "repetitions r = " + Math.floor(r.X()); }]); board.create('text', [5, 1.6, function() { return "predicted 1RM = " + (w.Value() * f(Math.floor(r.X()))).toFixed(2); } ], { fontSize: 24, strokeColor: 'red' });
This example is licensed under a Creative Commons Attribution ShareAlike 4.0 International License. Please note you have to mention The Center of Mobile Learning with Digital Technology in the credits.