// Numbas version: exam_results_page_options {"name": "Saw Tooth Fourier Question", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Saw Tooth Fourier Question", "advice": "", "statement": "

Calculate the Fourier Series of the function sketched below.

", "metadata": {"description": "

Widget Sales

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "variablesTest": {"maxRuns": 100, "condition": ""}, "tags": [], "preamble": {"js": "function dragpoint_board() {\n var scope = question.scope;\n\n JXG.Options.text.display = 'internal';\n \n var t = scope.variables.t.value;\n var c = scope.variables.c.value;\n \n var div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',{boundingBox:[-1.5*t,14,1.5*t,-2], axis:true, grid:false, title:{\n text: \"\"}});\n \n $(question.display.html).find('#dragpoint').append(div);\n \n var board = div.board;\n \n var parabool1 = board.create('line',[[x1=-t/2,y1=0], [x2=0,y2=c]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n var parabool2 = board.create('line',[[x1=0,y1=c], [x2=t/2,y2=0]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n \n var parabool3 = board.create('line',[[x1=-t/2,y1=0], [x2=-t,y2=c]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n var parabool4 = board.create('line',[[x1=t/2,y1=0], [x2=t,y2=c]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n \n var parabool5 = board.create('line',[[x1=-t,y1=c], [x2=-1.5*t,y2=0]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n var parabool6 = board.create('line',[[x1=t,y1=c], [x2=1.5*t,y2=0]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n}\n\nquestion.signals.on('HTMLAttached',function() {\n dragpoint_board();\n});", "css": "table#values th {\n background: none;\n text-align: center;\n}"}, "variables": {"c": {"definition": "random(4..12#1)", "templateType": "anything", "name": "c", "description": "", "group": "Ungrouped variables"}, "t": {"definition": "random(2..20#2)", "templateType": "anything", "name": "t", "description": "", "group": "Ungrouped variables"}}, "rulesets": {"std": ["all", "fractionNumbers"]}, "functions": {}, "parts": [{"variableReplacementStrategy": "originalfirst", "scripts": {}, "showFeedbackIcon": true, "shuffleChoices": true, "maxMarks": 0, "type": "1_n_2", "choices": ["

        

", "", "

      

", "", "

        

"], "minMarks": 0, "distractors": ["", "", "", "", ""], "matrix": ["1", 0, 0, 0, 0], "showCorrectAnswer": true, "displayType": "radiogroup", "variableReplacements": [], "marks": 0, "displayColumns": 0, "prompt": "
\n

Fourier Series

\n

What was the percentage of rejects in February?

"}], "ungrouped_variables": ["t", "c"], "variable_groups": [], "extensions": ["jsxgraph"], "type": "question", "contributors": [{"name": "Gareth Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/978/"}]}]}], "contributors": [{"name": "Gareth Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/978/"}]}