// Numbas version: exam_results_page_options {"name": "Sine graph with modifiable amplitude, frequency and phase", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Sine graph with modifiable amplitude, frequency and phase", "tags": [], "metadata": {"description": "

Shows how to use JSXGraph to make a sine graph with amplitude, frequency and phase controlled by sliders.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

{sine_graph}

", "advice": "", "rulesets": {}, "extensions": ["jsxgraph"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"sine_graph": {"name": "sine_graph", "group": "Ungrouped variables", "definition": "jessiecode(800,800,[-3,6,3,-6], safe(\"\"\"\nxaxis = axis([0,0],[1,0]) <>;\n\namplitude = slider([-2.75, 4.5], [-1.25, 4.5], [1,1,5]) <>;\nfrequency = slider([-2.75, 3.5], [-1.25, 3.5], [1,1,10]) <>;\nphase = slider([-2.75, 2.5], [-1.25, 2.5], [-3,0,3]);\n\nfunctiongraph(function(t) { return V(amplitude)*sin((t-phase) * V(frequency)*PI*2); }) <>;\n\"\"\")\n)", "description": "

A sine graph with amplitude, frequency and phase shift controlled by sliders.

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["sine_graph"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "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/"}]}