// Numbas version: finer_feedback_settings {"name": "JSXGraph test - function", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {"tst": {"definition": "// First, make the JSXGraph board.\n// The function provided by the JSXGraph extension wraps the board up in\n// a div tag so that it's easier to embed in the page.\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',\n {boundingBox: [-13,16,13,-16],\n axis: false,\n showNavigation: false,\n grid: true\n });\n\n// div.board is the object created by JSXGraph, which you use to\n// manipulate elements\nvar board = div.board;\n\n// Then do whatever you want with the board....\nvar xaxis = board.create('line',[[0,0],[1,0]], { strokeColor: 'black', fixed: true});\nvar xticks = board.create('ticks',[xaxis,2],{\n drawLabels: true,\n label: {offset: [-4, -10]},\n minorTicks: 0\n});\n\n// create the static line based on the coefficients a and b\n// var line1 = board.create('line',[[0,1],[1,4]],{fixed:true, strokeWidth: 4});\n\n// var pepe = board.create('point',[-3,1], {name:'X',size:3});\n\n// var free = board.create('point',[0,0], {name:'pep1', size:3});\n// var dep = board.create('point',[function(){ return free.X();}, 1], {name:'pepe2', face:'[]', size:3});\n\n\n\n// and return the container div\nreturn div;", "type": "html", "language": "javascript", "parameters": []}}, "ungrouped_variables": ["height1", "c_friction", "mass", "incline", "distance", "slope", "gravity", "a_gravity", "a_friction", "acceleration_naive", "acceleration", "t_ground"], "name": "JSXGraph test - function", "tags": [], "preamble": {"css": "", "js": ""}, "advice": "

Either construct the intersection of two circles centred at $\\mathbf{a}$ and $\\mathbf{b}$, or use the Regular Polygon tool.

\n

(I could embed another GeoGebra applet here)

", "rulesets": {}, "parts": [], "extensions": ["jsxgraph"], "statement": "

{tst()}

\n
\n

\n\nvar board = JXG.JSXGraph.initBoard('box', {boundingbox: [-10, 10, 10, -10], axis:true});

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"slope": {"definition": "vector(cos(radians(incline)),sin(radians(incline)))", "templateType": "anything", "group": "Ungrouped variables", "name": "slope", "description": ""}, "acceleration": {"definition": "if(acceleration_naive<0,acceleration_naive,0)", "templateType": "anything", "group": "Ungrouped variables", "name": "acceleration", "description": ""}, "incline": {"definition": "precround(degrees(arctan(height1/50)),1)", "templateType": "anything", "group": "Ungrouped variables", "name": "incline", "description": ""}, "t_ground": {"definition": "if(acceleration=0,0,sqrt(-2*distance/acceleration))", "templateType": "anything", "group": "Ungrouped variables", "name": "t_ground", "description": ""}, "distance": {"definition": "45", "templateType": "anything", "group": "Ungrouped variables", "name": "distance", "description": ""}, "a_friction": {"definition": "let(f,dot(matrix([[0,1],[-1,0]])*slope,gravity)*c_friction,\n min(f,-a_gravity)\n)", "templateType": "anything", "group": "Ungrouped variables", "name": "a_friction", "description": ""}, "c_friction": {"definition": "random(0.01..0.5#0.01)", "templateType": "anything", "group": "Ungrouped variables", "name": "c_friction", "description": ""}, "gravity": {"definition": "vector(0,-9.8)", "templateType": "anything", "group": "Ungrouped variables", "name": "gravity", "description": ""}, "a_gravity": {"definition": "dot(gravity,slope)", "templateType": "anything", "group": "Ungrouped variables", "name": "a_gravity", "description": ""}, "mass": {"definition": "10", "templateType": "anything", "group": "Ungrouped variables", "name": "mass", "description": ""}, "acceleration_naive": {"definition": "a_gravity+a_friction", "templateType": "anything", "group": "Ungrouped variables", "name": "acceleration_naive", "description": ""}, "height1": {"definition": "15", "templateType": "anything", "group": "Ungrouped variables", "name": "height1", "description": ""}}, "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Marlon Arcila", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/321/"}]}]}], "contributors": [{"name": "Marlon Arcila", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/321/"}]}