// Numbas version: finer_feedback_settings {"name": "Construct the region satisfied by three inequalities", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Construct the region satisfied by three inequalities", "tags": [], "metadata": {"description": "

The student is shown a set of axes with three lines. They must move the lines so they match the given inequalities, then move a point inside the region satisfied by the inequalities.

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

On the grid, identify the region that satisfies all these inequalities.

\n

\\begin{align}
y &\\gt \\var{y1}
&
x+y &\\lt \\var{y3}
&
y &\\lt \\simplify{{m2}x}
\\end{align}

", "advice": "

The diagram should look like this:

\n

{correct_board}

", "rulesets": {}, "extensions": ["jsxgraph"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"g": {"name": "g", "group": "Ungrouped variables", "definition": "jessiecode(600,600,[-bound,bound,bound,-bound],\"\"\"\n a1 = point(-1,1) <>;\n a2 = point(1,2) <>;\n a = line(a1,a2) <>;\n\n b1 = point(-1,2) <>;\n b2 = point(1,3) <>;\n b = line(b1,b2) <>;\n \n c1 = point(-1,3) <>;\n c2 = point(1,4) <>;\n c = line(c1,c2) <>;\n \n p1 = intersection(a,b) <>;\n p2 = intersection(a,c) <>;\n p3 = intersection(b,c) <>;\n \n // polygon(p1,p2,p3) <>;\n \n region = point(-0.5,0.5) <>;\n\"\"\")", "description": "

The graph to show to the student.

", "templateType": "anything", "can_override": false}, "bound": {"name": "bound", "group": "Ungrouped variables", "definition": "7", "description": "", "templateType": "anything", "can_override": false}, "correct_lines": {"name": "correct_lines", "group": "Ungrouped variables", "definition": "[\n [0,m2],\n [y1,0],\n [y3,-1]\n]", "description": "

Parameters for the inequalities, in the form [y-intercept, slope].

", "templateType": "anything", "can_override": false}, "y1": {"name": "y1", "group": "Ungrouped variables", "definition": "random(0,1,2)", "description": "

The height of the horizontal line.

", "templateType": "anything", "can_override": false}, "m2": {"name": "m2", "group": "Ungrouped variables", "definition": "random(1,2,3)", "description": "

The graidnet of the line through the origin.

", "templateType": "anything", "can_override": false}, "y3": {"name": "y3", "group": "Ungrouped variables", "definition": "random(4,5,6)", "description": "

The y-intercept of the diagonal line

", "templateType": "anything", "can_override": false}, "correct_board": {"name": "correct_board", "group": "Ungrouped variables", "definition": "jessiecode(600,600,[-bound,bound,bound,-bound],\"\"\"\n a1 = point(-1,{y1}) <>;\n a2 = point(1,{y1}) <>;\n a = line(a1,a2) <>;\n\n b1 = point(0,{y3}) <>;\n b2 = point({y3},0) <>;\n b = line(b1,b2) <>;\n \n c1 = point(0,0) <>;\n c2 = point(1,{m2}) <>;\n c = line(c1,c2) <>;\n \n p1 = intersection(a,b) <>;\n p2 = intersection(a,c) <>;\n p3 = intersection(b,c) <>;\n \n // polygon(p1,p2,p3) <>;\n \n region = incenter(p1,p2,p3) <>;\n\"\"\")", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["bound", "g", "correct_lines", "y1", "m2", "y3", "correct_board"], "variable_groups": [], "functions": {"get_lines": {"parameters": [], "type": "list", "language": "javascript", "definition": "var board = scope.getVariable('g').board;\nvar lines = ['a','b','c'].map(function(x) { return board.elementsByName[x]; });\nvar line_props = lines.map(function(l) { return [l.getRise(), l.getSlope()]; });\nreturn Numbas.jme.wrapValue(line_props);"}, "get_region_point": {"parameters": [], "type": "vector", "language": "javascript", "definition": "var board = scope.getVariable('g').board;\nvar p = board.elementsByName['A'];\nreturn [p.X(),p.Y()];"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "extension", "useCustomName": false, "customName": "", "marks": 1, "scripts": {"constructor": {"script": "this.marks = 5;", "order": "after"}}, "customMarkingAlgorithm": "student_lines: get_lines()\n\nstudent_point: get_region_point()\n\npoint_in_shaded_region:\n let([x,y],student_point, all([y>y1, x+y{g}

\n

Drag the points to move the lines around, and then move point A inside the region satisfied by the inequalities.

"}], "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/"}, {"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Kate Henderson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/808/"}, {"name": "Aamir Khan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4537/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Kate Henderson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/808/"}, {"name": "Aamir Khan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4537/"}]}