// Numbas version: exam_results_page_options {"name": "Polar domains", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"extensions": ["jsxgraph"], "functions": {"polar_domains": {"parameters": [["r1", "number"], ["r2", "number"], ["t1", "number"], ["t2", "number"], ["full_rev", "number"]], "definition": "var div = Numbas.extensions.jsxgraph.makeBoard('300px','300px',\n {boundingBox: [-10,10,10,-10], axis: true, showNavigation: true, grid: true});\n \nvar board = div.board;\n\nvar temp = 0;\n\nif (r1>r2) {\n temp = r2;\n r2 = r1\n r1 = temp;\n};\n\nif (t1>t2) {\n temp = t2;\n t2 = t1\n t1 = temp;\n};\n\nvar p0 = board.create('point',[0,0],{visible:false})\n\nvar p1 = board.create('point', [r2*Math.cos(t1),r2*Math.sin(t1)],{visible:false});\nvar p2 = board.create('point', [r2*Math.cos(t2),r2*Math.sin(t2)],{visible:false});\nvar p3 = board.create('point', [r1*Math.cos(t2),r1*Math.sin(t2)],{visible:false});\nvar p4 = board.create('point', [r1*Math.cos(t1),r1*Math.sin(t1)],{visible:false});\n\nif (full_rev) {\n var c1 = board.create('circle', [p0, p1],{strokeColor:'#B22222', strokeWidth:5});\n if (r1>0) {\n var c2 = board.create('circle', [p0, p4],{strokeColor:'#B22222', strokeWidth:5});\n }\n} else {\n var a1 = board.create('arc', [p0, p1, p2],{strokeColor:'#B22222', strokeWidth:5});\n var a2 = board.create('arc', [p0, p4, p3],{strokeColor:'#B22222', strokeWidth:5}); \n var l1 = board.create('line',[p2,p3], {straightFirst:false, straightLast:false,\n strokeColor:'#B22222', strokeWidth:5});\n var l2 = board.create('line',[p4,p1], {straightFirst:false, straightLast:false,\n strokeColor:'#B22222', strokeWidth:5});\n}\n\nreturn div;", "type": "html", "language": "javascript"}}, "advice": "", "preamble": {"js": "", "css": ""}, "variables": {"q2_r1": {"name": "q2_r1", "definition": "random(1..9)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "q3_r2": {"name": "q3_r2", "definition": "random(1..9)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "q2_r2": {"name": "q2_r2", "definition": "random(1..9 except q2_r1)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "q1_r2": {"name": "q1_r2", "definition": "random(2..9)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "q4_t2": {"name": "q4_t2", "definition": "random(-5/6,-3/4,-2/3,-1/2,-1/3,-1/4,-1/6,0,1/6,1/4,1/3,1/2,2/3,3/4,5/6)*pi", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "q4_r2": {"name": "q4_r2", "definition": "random(1..9 except q4_r1)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "q4_t1": {"name": "q4_t1", "definition": "random(-5/6,-3/4,-2/3,-1/2,-1/3,-1/4,-1/6,0,1/6,1/4,1/3,1/2,2/3,3/4,5/6)*pi", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "q4_r1": {"name": "q4_r1", "definition": "random(1..9)", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "q3_t2": {"name": "q3_t2", "definition": "random(-5/6,-3/4,-2/3,-1/2,-1/3,-1/4,-1/6,0,1/6,1/4,1/3,1/2,2/3,3/4,5/6)*pi", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "q3_t1": {"name": "q3_t1", "definition": "random(-5/6,-3/4,-2/3,-1/2,-1/3,-1/4,-1/6,0,1/6,1/4,1/3,1/2,2/3,3/4,5/6)*pi", "group": "Ungrouped variables", "templateType": "anything", "description": ""}}, "statement": "

In this last exercise, you are given four domains in the $xy$-plane. Your task is to describe them in polar coordinates, by specifying the range for the radius $r$ and for the phase $\\theta$.

\n

All the radii are integers less than 10. The possibilities for the phases are: $0,\\frac{\\pi}{6},\\frac{\\pi}{4},\\frac{\\pi}{3},\\frac{\\pi}{2}$, and the corresponding shifts into the other quadrants of the $xy$-plane. Enter phases rounded to two decimals in the range $[-\\pi,\\pi]$ (it is not possible to enter $\\frac{5\\pi}{6}$ -- you would have to evaluate that).

\n

For example, the unit disk ($\\rightarrow$ area inside the circle of radius $1$ centered at $(0,0)$) should be entered as

\n

$\\begin{pmatrix} r_{\\text{lower}} & r_{\\text{upper}} \\\\ \\theta_{\\text{lower}} & \\theta_{\\text{upper}} \\end{pmatrix} = \\begin{pmatrix} 0 & 1 \\\\ -3.14 & 3.14 \\end{pmatrix}$.

", "variable_groups": [], "ungrouped_variables": ["q1_r2", "q2_r1", "q2_r2", "q3_r2", "q3_t1", "q3_t2", "q4_r1", "q4_r2", "q4_t1", "q4_t2"], "rulesets": {}, "name": "Polar domains", "tags": [], "parts": [{"showCorrectAnswer": true, "gaps": [{"correctAnswer": "matrix([0,q1_r2],[-pi,pi])", "variableReplacements": [], "marks": 1, "tolerance": "0.01", "type": "matrix", "scripts": {}, "showCorrectAnswer": true, "allowFractions": true, "numColumns": "2", "allowResize": false, "showFeedbackIcon": true, "numRows": "2", "markPerCell": false, "correctAnswerFractions": false, "variableReplacementStrategy": "originalfirst"}], "showFeedbackIcon": true, "marks": 0, "scripts": {}, "prompt": "

Describe the area inside the circle ($\\rightarrow$ disk) in polar coordinates.

\n

{polar_domains(0,q1_r2,0,0,1)}

\n

$\\begin{pmatrix} r_{\\text{lower}} & r_{\\text{upper}} \\\\ \\theta_{\\text{lower}} & \\theta_{\\text{upper}} \\end{pmatrix} = $ [[0]]

", "type": "gapfill", "variableReplacements": [], "variableReplacementStrategy": "originalfirst"}, {"showCorrectAnswer": true, "gaps": [{"correctAnswer": "matrix([min(q2_r1,q2_r2),max(q2_r1,q2_r2)],[-pi,pi])", "variableReplacements": [], "marks": 1, "tolerance": "0.01", "type": "matrix", "scripts": {}, "showCorrectAnswer": true, "allowFractions": true, "numColumns": "2", "allowResize": false, "showFeedbackIcon": true, "numRows": "2", "markPerCell": false, "correctAnswerFractions": false, "variableReplacementStrategy": "originalfirst"}], "showFeedbackIcon": true, "marks": 0, "scripts": {}, "prompt": "

Describe the area between the two circles ($\\rightarrow$ ring) in polar coordinates.

\n

{polar_domains(q2_r1,q2_r2,0,0,1)}

\n

$\\begin{pmatrix} r_{\\text{lower}} & r_{\\text{upper}} \\\\ \\theta_{\\text{lower}} & \\theta_{\\text{upper}} \\end{pmatrix} = $ [[0]]

", "type": "gapfill", "variableReplacements": [], "variableReplacementStrategy": "originalfirst"}, {"showCorrectAnswer": true, "gaps": [{"correctAnswer": "matrix([0,q3_r2],[min(q3_t1,q3_t2),max(q3_t1,q3_t2)])", "variableReplacements": [], "marks": 1, "tolerance": "0.01", "type": "matrix", "scripts": {}, "showCorrectAnswer": true, "allowFractions": true, "numColumns": "2", "allowResize": false, "showFeedbackIcon": true, "numRows": "2", "markPerCell": false, "correctAnswerFractions": false, "variableReplacementStrategy": "originalfirst"}], "showFeedbackIcon": true, "marks": 0, "scripts": {}, "prompt": "

Describe the disk segment in polar coordinates.

\n

{polar_domains(0,q3_r2,q3_t1,q3_t2,0)}

\n

$\\begin{pmatrix} r_{\\text{lower}} & r_{\\text{upper}} \\\\ \\theta_{\\text{lower}} & \\theta_{\\text{upper}} \\end{pmatrix} = $ [[0]]

", "type": "gapfill", "variableReplacements": [], "variableReplacementStrategy": "originalfirst"}, {"showCorrectAnswer": true, "gaps": [{"correctAnswer": "matrix([min(q4_r1,q4_r2),max(q4_r1,q4_r2)],[min(q4_t1,q4_t2),max(q4_t1,q4_t2)])", "variableReplacements": [], "marks": 1, "tolerance": "0.01", "type": "matrix", "scripts": {}, "showCorrectAnswer": true, "allowFractions": true, "numColumns": "2", "allowResize": false, "showFeedbackIcon": true, "numRows": "2", "markPerCell": false, "correctAnswerFractions": false, "variableReplacementStrategy": "originalfirst"}], "showFeedbackIcon": true, "marks": 0, "scripts": {}, "prompt": "

Describe the ring segment in polar coordinates.

\n

{polar_domains(q4_r1,q4_r2,q4_t1,q4_t2,0)}

\n

$\\begin{pmatrix} r_{\\text{lower}} & r_{\\text{upper}} \\\\ \\theta_{\\text{lower}} & \\theta_{\\text{upper}} \\end{pmatrix} = $ [[0]]

", "type": "gapfill", "variableReplacements": [], "variableReplacementStrategy": "originalfirst"}], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": ""}, "variablesTest": {"condition": "q3_t1 <> q3_t2 and q4_t1 <> q4_t2", "maxRuns": 100}, "type": "question", "contributors": [{"name": "Pascal Philipp", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1569/"}]}]}], "contributors": [{"name": "Pascal Philipp", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1569/"}]}