// Numbas version: exam_results_page_options {"name": "Shifted Saw Tooth Fourier Series", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"ungrouped_variables": ["t", "c", "shift"], "preamble": {"css": "table#values th {\n background: none;\n text-align: center;\n}", "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 var shift = scope.variables.shift.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 + shift,y1=0], [x2=0+ shift,y2=c]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n var parabool2 = board.create('line',[[x1=0+ shift,y1=c], [x2=t/2+ shift,y2=0]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n \n var parabool3 = board.create('line',[[x1=-t/2+ shift,y1=0], [x2=-t+ shift,y2=c]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n var parabool4 = board.create('line',[[x1=t/2+ shift,y1=0], [x2=t+ shift,y2=c]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n \n var parabool5 = board.create('line',[[x1=-t+ shift,y1=c], [x2=-1.5*t+ shift,y2=0]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n var parabool6 = board.create('line',[[x1=t+ shift,y1=c], [x2=1.5*t+ shift,y2=0]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n \n var parabool7 = board.create('line',[[x1=-1.5*t+ shift,y1=0], [x2=-2*t+ shift,y2=c]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n var parabool8 = board.create('line',[[x1=1.5*t+ shift,y1=0], [x2=2*t+ shift,y2=c]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n \n// var parabool9 = board.create('line',[[x1=-t+ shift,y1=c], [x2=-1.5*t+ shift,y2=0]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n// var parabool10 = board.create('line',[[x1=t+ shift,y1=c], [x2=1.5*t+ shift,y2=0]],{straightFirst:false, straightLast:false,strokeWidth:1,strokeColor:'blue'});\n}\n\nquestion.signals.on('HTMLAttached',function() {\n dragpoint_board();\n});"}, "functions": {}, "advice": "", "statement": "

Calculate the Fourier Series of the function sketched below.

", "parts": [{"matrix": ["1", 0, 0, 0, 0], "marks": 0, "showFeedbackIcon": true, "displayType": "radiogroup", "maxMarks": 0, "scripts": {}, "displayColumns": 0, "variableReplacements": [], "prompt": "
\n

Fourier Series

\n

What was the percentage of rejects in February?

", "choices": ["

        

", "", "

      

", "", "

        

"], "shuffleChoices": true, "distractors": ["", "", "", "", ""], "variableReplacementStrategy": "originalfirst", "type": "1_n_2", "minMarks": 0, "showCorrectAnswer": true}], "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "extensions": ["jsxgraph"], "rulesets": {"std": ["all", "fractionNumbers"]}, "name": "Shifted Saw Tooth Fourier Series", "tags": [], "metadata": {"description": "

Widget Sales

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "variables": {"shift": {"description": "", "definition": "random(-t/2..t/2 except 0)", "group": "Ungrouped variables", "templateType": "anything", "name": "shift"}, "c": {"description": "", "definition": "random(4..12#1 except t)", "group": "Ungrouped variables", "templateType": "anything", "name": "c"}, "t": {"description": "", "definition": "random(2..20#2)", "group": "Ungrouped variables", "templateType": "anything", "name": "t"}}, "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/"}]}