// Numbas version: finer_feedback_settings {"name": "Plot a function", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Plot a function", "tags": [], "metadata": {"description": "
This question demonstrates how to plot a graph of a function using JSXGraph.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "The amplitude of this sine curve is {amplitude} and its period is {period}.
\n{diagram}
", "advice": "", "rulesets": {}, "extensions": ["jsxgraph"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"period": {"name": "period", "group": "Ungrouped variables", "definition": "random(1..max_period)", "description": "", "templateType": "anything", "can_override": false}, "amplitude": {"name": "amplitude", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "templateType": "anything", "can_override": false}, "diagram": {"name": "diagram", "group": "Ungrouped variables", "definition": "jsxgraph(\n 500,500,\n [-1, amplitude+1, 2*max_period+1, -amplitude-1],\n [\n \"f\": ['functiongraph',[function]]\n ]\n)", "description": "", "templateType": "anything", "can_override": false}, "max_period": {"name": "max_period", "group": "Ungrouped variables", "definition": "6", "description": "", "templateType": "anything", "can_override": false}, "function": {"name": "function", "group": "Ungrouped variables", "definition": "expression(\"sin(2*pi*x/period)*amplitude\")", "description": "The function to plot.
", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["function", "period", "amplitude", "diagram", "max_period"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}