// Numbas version: exam_results_page_options {"name": "JSXGraph: position a circle so it touches a point", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "JSXGraph: position a circle so it touches a point", "tags": [], "metadata": {"description": "

The student is shown a Cartesian diagram containing a point $P$ and a circle. They must move the point and change its radius so that the point $P$ is touching the circle.

\n

They can type the radius and coordinates in, or move the circle around on the diagram.

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

{diagram}

", "advice": "", "rulesets": {}, "extensions": ["jsxgraph"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"diagram": {"name": "diagram", "group": "Ungrouped variables", "definition": "jessiecode(400,400,\"\"\"\n\n A = point(0,0) <>;\n C = circle(A,1) <>;\n \n P = point({p[0]},{p[1]}) <>;\n\"\"\")", "description": "", "templateType": "anything", "can_override": false}, "p": {"name": "p", "group": "Ungrouped variables", "definition": "vector(random(-4..-1),random(1..4))", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["diagram", "p"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "centre: jxg_position(diagram[\"A\"])\n\nradius: jxg_radius(diagram[\"C\"])\n\nin_right_quadrant:\n if(centre[0]>0 and centre[1]>0,\n add_credit(1/2, \"The centre of your circle is in the top-right quadrant.\")\n , negative_feedback(\"Your circle is not in the top-right quadrant.\")\n )\n\ntouches_point:\n if(isclose(len(centre-p),radius,0,0.1),\n add_credit(1/2, \"Your circle is touching the point.\")\n , negative_feedback(\"Your circle is not touching the point.\")\n )\n\nmark:\n apply(in_right_quadrant);\n apply(touches_point)\n\ninterpreted_answer: [centre, radius]", "extendBaseMarkingAlgorithm": false, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Make the circle touch the point $P$. The circle's centre must be in the top-right quadrant of the graph.

\n

You can change its radius and the position of its centre.

\n

Radius: [[0]]

\n

Coordinates of the centre: [[1]]

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "Radius", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "jxg_input (Update the diagram after the student's answer changes):\n if(not isnan(studentnumber) and studentNumber>0,\n [jxg_set(diagram[\"C\"],\"Radius\",studentNumber)]\n ,\n []\n )\n\njxg_output (Fill in the answer box after the diagram changes):\n dpformat(jxg_radius(diagram[\"C\"]),2)", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "1", "maxValue": "1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "matrix", "useCustomName": true, "customName": "Coordinates of the centre", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "jxg_input: \n [ jxg_set_position(diagram[\"A\"],studentMatrix[0]) ]\n\njxg_output:\n let([x,y],jxg_position(diagram[\"A\"]),\n [[dpformat(x,2),dpformat(y,2)]]\n )", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "transpose(vector(0,0))", "correctAnswerFractions": false, "numRows": 1, "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "http://localhost:8000/accounts/profile/1/"}, {"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "http://localhost:8000/accounts/profile/1/"}, {"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}