// Numbas version: exam_results_page_options {"name": "Calculating alpha and beta components of a vector drawn on screen", "extensions": ["eukleides"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Calculating alpha and beta components of a vector drawn on screen", "tags": [], "metadata": {"description": "

The students are given the magnitude and angle (in degrees) of a vector. They have to find its alpha and beta components.

", "licence": "All rights reserved"}, "statement": "

Given a vector of magnitude \\(\\lvert \\bar V\\rvert = \\) {precround(v_mag, 3)} that is at an angle of \\(\\theta =\\) {precround(v_arg, 3)}\\(^\\circ\\) counterclockwise from alpha axis, find its alpha and beta components.

\n

{vector_drawn}

", "advice": "

The alpha component of the vector is its projection on alpha-axis which is obtained by multiplying {precround(v_mag, 3)} by cos({precround(v_arg, 3)}\\(^\\circ\\)). Similarly, the beta component is the projection along beta-axis that can be calculated as: {precround(v_mag, 3)}*sin({precround(v_arg, 3)}\\(^\\circ\\)).

", "rulesets": {}, "extensions": ["eukleides"], "variables": {"v_x": {"name": "v_x", "group": "Ungrouped variables", "definition": "random(0.1 .. 1.5#0.1)", "description": "

x-component of the vector

", "templateType": "randrange"}, "v_y": {"name": "v_y", "group": "Ungrouped variables", "definition": "random(0.1 .. 1.5#0.1)", "description": "

y-component of the vector

", "templateType": "randrange"}, "vector_drawn": {"name": "vector_drawn", "group": "Ungrouped variables", "definition": "eukleides(\"vector\",[\n line(point(0, 0)..point(1, 0)), // x axis: infinite line at y=0\n line(point(0, 0)..point(0, 1)), // y axis: infinite line at x=0\n //line(point(0,0)..point(v_x, v_y)) arrow half // ray beginning at the origin\n point(0, 0)..point(v_x, v_y) arrow, // line segment\n point(v_x, v_y) label('V'), // label('\\(\\lvert \\bar V\\rvert\\)'),\n angle(point(v_x, 0), point(0, 0), point(v_x, v_y)) arrow forth //label(v_arg)\n])\n", "description": "

Draw the vector in 2D plane

", "templateType": "anything"}, "v_mag": {"name": "v_mag", "group": "Ungrouped variables", "definition": "sqrt(v_x*v_x + v_y*v_y)", "description": "", "templateType": "anything"}, "v_arg": {"name": "v_arg", "group": "Ungrouped variables", "definition": "arctan(v_y/v_x)*180/pi", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["v_x", "v_y", "vector_drawn", "v_mag", "v_arg"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": true, "customName": "alpha", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Calculate the value of alpha component (round your answer off to 3 decimal points)

", "minValue": "{v_x}", "maxValue": "{v_x}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "3", "precisionPartialCredit": "0", "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "beta", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Calculate the beta component and insert here (round off your answer to 3 decimal points)

", "minValue": "{v_y}", "maxValue": "{v_y}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "3", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Shafiq Odhano", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5160/"}]}]}], "contributors": [{"name": "Shafiq Odhano", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5160/"}]}