// Numbas version: finer_feedback_settings {"name": "Plot an implicit curve corresponding to a function given by the student", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Plot an implicit curve corresponding to a function given by the student", "tags": [], "metadata": {"description": "
This shows how to take an expression given by the student and plot the implicit curve of points where it equals zero.
", "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": "jsxgraph(400,400, [-4,4,4,-4], [\n \"a\": [\"slider\", [[-3.5,2.5],[-1.5,2.5],[-3,0,3]], [\"id\": \"a\"]],\n \"b\": [\"slider\", [[-3.5,1.5],[-1.5,1.5],[-3,0,3]], [\"id\": \"b\"]],\n \"f\": [\"implicitcurve\", [expr], [\"id\": \"f\"]]\n])", "description": "", "templateType": "anything", "can_override": false}, "expr": {"name": "expr", "group": "Ungrouped variables", "definition": "expression(\"x^2+y^2-a\")", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["expr", "diagram"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Write an expression in terms of the coordinates $(x,y)$ and the parameters $a$ and $b$.
\nThe plot above will show points where your expression equals zero.
\nNote: very complicated plots can slow down your device.
\nA nice expression is sin(x^2+y^2)+4a^2y^2(x^2+y^2-b^2)
$f(x,y,a,b) = $ [[0]]
", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "0", "scripts": {}, "customMarkingAlgorithm": "plotExpr:\n try(\n simplify(\n expand_juxtapositions(parse(studentAnswer), expand_juxtapositions_settings),\n 'basic'\n )\n , error,\n expression(\"1\")\n )\n\njxg_input:\n [ jxg_set_term(diagram[\"f\"], plotExpr) ]\n\nmark:\n nothing", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "x", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "http://clppc: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://clppc:8000/accounts/profile/1/"}, {"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}