Skip to content

Instantly share code, notes, and snippets.

@s-celles
Created May 13, 2026 10:31
Show Gist options
  • Select an option

  • Save s-celles/1778e19686646e02a60694c60b30aeb2 to your computer and use it in GitHub Desktop.

Select an option

Save s-celles/1778e19686646e02a60694c60b30aeb2 to your computer and use it in GitHub Desktop.
JSXGraph.jl 0.5.2 demo — interactive parabola with sliders a, b, c (a*x^2 + b*x + c)
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>JSXGraph Board</title>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/jsxgraph@1.12.2/distrib/jsxgraph.css" />
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/jsxgraph@1.12.2/distrib/jsxgraphcore.js"></script>
</head>
<body>
<div id="demo" class="jxgbox" style="width:500px;height:500px"></div>
<script>
var board_demo = JXG.JSXGraph.initBoard('demo', {"axis":true,"boundingbox":[-15,15,15,-15],"showCopyright":false,"showNavigation":false});
var el_001 = board_demo.create('slider', [[8,7],[12,7],[-3.0,0.1,10.0]], {"name":"a"});
var el_002 = board_demo.create('slider', [[8,6],[12,6],[-1,1,5]], {"name":"b"});
var el_003 = board_demo.create('slider', [[8,5],[12,5],[-10,-5,2]], {"name":"c"});
var el_004 = board_demo.create('functiongraph', [function(x){return el_001.Value() * Math.pow(x, 2) + el_002.Value() * x + el_003.Value();}], {});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment