// Numbas version: exam_results_page_options {"name": "Graph question for Melissa", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"parts": [{"extendBaseMarkingAlgorithm": true, "unitTests": [], "variableReplacementStrategy": "originalfirst", "scripts": {}, "showCorrectAnswer": true, "marks": 0, "useCustomName": false, "customName": "", "sortAnswers": false, "type": "gapfill", "gaps": [{"extendBaseMarkingAlgorithm": true, "unitTests": [], "variableReplacementStrategy": "originalfirst", "scripts": {}, "showCorrectAnswer": true, "showFractionHint": true, "marks": 1, "useCustomName": true, "customName": "Tmid", "type": "numberentry", "maxValue": "Tmid*1.1", "showFeedbackIcon": true, "minValue": "Tmid*0.9", "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "correctAnswerFraction": false, "mustBeReduced": false, "customMarkingAlgorithm": ""}], "showFeedbackIcon": true, "prompt": "

Determine the temperature at which the increase in F is at 50%  [[0]]

", "variableReplacements": [], "customMarkingAlgorithm": ""}], "variable_groups": [], "metadata": {"description": "

There are copious comments in the definition of the function eqnline about the voodoo needed to have a JSXGraph diagram interact with the input box for a part.

", "licence": "Creative Commons Attribution 4.0 International"}, "variables": {"Tmax": {"group": "Ungrouped variables", "definition": "60", "name": "Tmax", "templateType": "anything", "description": ""}, "Fmin": {"group": "Ungrouped variables", "definition": "random(450..600)/10", "name": "Fmin", "templateType": "anything", "description": ""}, "Fmax": {"group": "Ungrouped variables", "definition": "random(650..900)/10", "name": "Fmax", "templateType": "anything", "description": ""}, "Tmin": {"group": "Ungrouped variables", "definition": "min(25, Tmid-20)", "name": "Tmin", "templateType": "anything", "description": ""}, "Tmid": {"group": "Ungrouped variables", "definition": "random(300..450)/10", "name": "Tmid", "templateType": "anything", "description": ""}}, "advice": "", "preamble": {"js": "", "css": ""}, "rulesets": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "functions": {"eqnline": {"parameters": [["Tmid", "number"], ["Fmin", "number"], ["Fmax", "number"], ["Tmin", "number"], ["Tmax", "number"]], "definition": "// This function creates the board and sets it up, then returns an\n// HTML div tag containing the board.\n \n// The line is described by the equation \n// y = a*x + b\n\n// This function takes as its parameters the coefficients a and b,\n// and the coordinates (x2,y2) of a point on the line.\n\n// 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: [Tmin,Fmax+10,Tmax,Fmin-10],\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// create the x-axis.\nvar xaxis = board.create('line',[[0,Fmin-10],[Tmax,Fmin-10]], { strokeColor: 'black', fixed: true});\nvar xticks = board.create('ticks',[xaxis,10],\n {\n drawLabels: true,\n// label: {offset: [-4, -10]},\n// minorTicks: 0\n});\n\n// create the y-axis\nvar yaxis = board.create('line',[[Tmin,0],[Tmin,Fmax+10]], { strokeColor: 'black', fixed: true });\nvar yticks = board.create('ticks',[yaxis,5],{\ndrawLabels: true,\n//label: {offset: [-20, 0]},\nminorTicks: 0\n});\n\nvar fcalc = function (t) { return Fmin + (Fmax-Fmin)* (1/(1+Math.pow(Math.E,-(t-Tmid)/2.5)))};\n// create the static line based on the coefficients a and b\nvar line1 = board.create('curve',[function (t) {return t},fcalc,Tmin,Tmax],{fixed:true, strokeWidth: 1});\n\n// mark the two given points - one on the y-axis, and one at (x2,y2)\nvar t1 = board.create('text',[Tmax-10,Fmin-5,'Temp (C)'] ,{fontSize:18});\nvar t2 = board.create('text',[Tmin+2,Fmax+5,'F'],{fontSize:18});\n\n//var p2 = board.create('point',[x2,y2],{fixed:true, size:3, name: 'P_2', face: 'cross'});\n\n// Now we can do the clever stuff with the student's answer!\n// We'll add a curve to the board which is a plot of a function we provide.\n// That function will parse the student's input and evaluate it.\n\n// The variable `studentExpression` will store the parsed version of\n// the student's expression.\n\nreturn div;", "language": "javascript", "type": "html"}}, "name": "Graph question for Melissa", "tags": [], "extensions": ["jsxgraph"], "ungrouped_variables": ["Fmin", "Fmax", "Tmid", "Tmin", "Tmax"], "statement": "

{eqnline(Tmid,Fmin,Fmax, Tmin,Tmax)}

\n

\n

The graph shows the F vs temperature

\n

Fmin: $\\var{Fmin}$

\n

Fmax: $\\var{Fmax}$

\n

Tmid: $\\var{Tmid}$

", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "David Martin", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/130/"}, {"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "David Martin", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/130/"}, {"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}]}