<iframe src="https://jsxgraph.uni-bayreuth.de/share/iframe/conic-sections-in-polar-form" style="border: 1px solid black; overflow: hidden; width: 550px; aspect-ratio: 55 / 65;" name="JSXGraph example: Conic sections in polar form" allowfullscreen ></iframe>
Curve term: <span id="output"></span> <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 4.0 International License. https://creativecommons.org/licenses/by/4.0/ Please note you have to mention The Center of Mobile Learning with Digital Technology in the credits. */ const BOARDID = 'board-0'; const board = JXG.JSXGraph.initBoard(BOARDID, { axis: true, boundingbox: [-12, 10, 12, -10] }); var p = board.create('slider', [ [2, 8], [6, 8], [0, 3, 6] ], { name: 'p' }); var eps = board.create('slider', [ [2, 7], [6, 7], [-6, 0.5, 6] ], { name: 'ε' }); var len = board.create('slider', [ [2, 6], [6, 6], [0, 3, 6] ], { name: 'len' }); var rho = board.create('slider', [ [2, 5], [6, 5], [0, 0, 2 * Math.PI] ], { name: 'ρ' }); var f = board.create('curve', [function(phi) { return p.Value() / (1 - eps.Value() * Math.cos(phi + rho.Value())); }, [1, 0], 0, function() { return len.Value() * Math.PI } ], { curveType: 'polar', strokewidth: 2, strokeColor: '#CA7291' } ); // Show tangent: var q = board.create('glider', [f], { style: 6, name: 'G' }); board.create('tangent', [q], { dash: 3 }); // Show the curve term board.on('update', function() { var _p = (p.Value()).toFixed(1), _eps = (eps.Value()).toFixed(1), _rho = (rho.Value()).toFixed(1); document.getElementById('output').innerHTML = `r = ${_p} / (1 - (${_eps})*cos(φ+${_rho})`; }); </script>
/* This example is licensed under a Creative Commons Attribution 4.0 International License. https://creativecommons.org/licenses/by/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! const board = JXG.JSXGraph.initBoard(BOARDID, { axis: true, boundingbox: [-12, 10, 12, -10] }); var p = board.create('slider', [ [2, 8], [6, 8], [0, 3, 6] ], { name: 'p' }); var eps = board.create('slider', [ [2, 7], [6, 7], [-6, 0.5, 6] ], { name: 'ε' }); var len = board.create('slider', [ [2, 6], [6, 6], [0, 3, 6] ], { name: 'len' }); var rho = board.create('slider', [ [2, 5], [6, 5], [0, 0, 2 * Math.PI] ], { name: 'ρ' }); var f = board.create('curve', [function(phi) { return p.Value() / (1 - eps.Value() * Math.cos(phi + rho.Value())); }, [1, 0], 0, function() { return len.Value() * Math.PI } ], { curveType: 'polar', strokewidth: 2, strokeColor: '#CA7291' } ); // Show tangent: var q = board.create('glider', [f], { style: 6, name: 'G' }); board.create('tangent', [q], { dash: 3 }); // Show the curve term board.on('update', function() { var _p = (p.Value()).toFixed(1), _eps = (eps.Value()).toFixed(1), _rho = (rho.Value()).toFixed(1); document.getElementById('output').innerHTML = `r = ${_p} / (1 - (${_eps})*cos(φ+${_rho})`; });
Curve term: <span id="output"></span>
// Define the id of your board in BOARDID const board = JXG.JSXGraph.initBoard(BOARDID, { axis: true, boundingbox: [-12, 10, 12, -10] }); var p = board.create('slider', [ [2, 8], [6, 8], [0, 3, 6] ], { name: 'p' }); var eps = board.create('slider', [ [2, 7], [6, 7], [-6, 0.5, 6] ], { name: 'ε' }); var len = board.create('slider', [ [2, 6], [6, 6], [0, 3, 6] ], { name: 'len' }); var rho = board.create('slider', [ [2, 5], [6, 5], [0, 0, 2 * Math.PI] ], { name: 'ρ' }); var f = board.create('curve', [function(phi) { return p.Value() / (1 - eps.Value() * Math.cos(phi + rho.Value())); }, [1, 0], 0, function() { return len.Value() * Math.PI } ], { curveType: 'polar', strokewidth: 2, strokeColor: '#CA7291' } ); // Show tangent: var q = board.create('glider', [f], { style: 6, name: 'G' }); board.create('tangent', [q], { dash: 3 }); // Show the curve term board.on('update', function() { var _p = (p.Value()).toFixed(1), _eps = (eps.Value()).toFixed(1), _rho = (rho.Value()).toFixed(1); document.getElementById('output').innerHTML = `r = ${_p} / (1 - (${_eps})*cos(φ+${_rho})`; });
This example is licensed under a Creative Commons Attribution 4.0 International License. Please note you have to mention The Center of Mobile Learning with Digital Technology in the credits.