// Numbas version: finer_feedback_settings {"name": "Angle between 3D Cartesian Vectors", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Angle between 3D Cartesian Vectors", "tags": [], "metadata": {"description": "

Test students ability to find 3D Cartesian vector magnitudes, dot products, angles between arbitrary vectors and cross products of arbitrary vectors 

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Given the following vectors:

\n

A = \u3008 {A_x} , {A_y} , {A_z} \u3009

\n

B = \u3008 {B_x} , {B_y} , {B_z} \u3009

\n

Calculate the magnitude of each vector,

\n

find the vector dot product A·B,

\n

find the angle between vectors A and B when they are placed tail to tail, 

\n

and find the vector cross product A X B

", "advice": "

The magnitude of a 3D Cartesian vector \u3008x , y , z\u3009 = sqrt(x^2+y^2+z^2)

\n

Dot product of two 3D Cartesian vectors \u3008a , b , c\u3009 ⋅\u3008d , e , f\u3009= ad + be + cf

\n

Angle between two 3D Cartesian vectors \u3008a , b , c\u3009 and\u3008d , e , f\u3009= arccos( (ad + be + cf) / [ sqrt(a^2+b^2+c^2) ⋅ sqrt(d^2+e^2+f^2) ] )

\n

Cross product of two 3D Cartesian vectors \u3008a , b , c\u3009 and\u3008d , e , f\u3009

\n

     î component = bf-ec

\n

     \u0135 component = -(af-dc)

\n

    k\u0302component = (ae-db)

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"A_x": {"name": "A_x", "group": "Ungrouped variables", "definition": "random(1..20)-10", "description": "

Random x component of vector A

", "templateType": "anything", "can_override": true}, "A_y": {"name": "A_y", "group": "Ungrouped variables", "definition": "random(1..20)-10", "description": "

Random y component of vector A

", "templateType": "anything", "can_override": false}, "B_x": {"name": "B_x", "group": "Ungrouped variables", "definition": "random(1..20)-10", "description": "

Random x component of vector B

", "templateType": "anything", "can_override": false}, "B_y": {"name": "B_y", "group": "Ungrouped variables", "definition": "random(1..20)-10", "description": "

Random y component of vector B

", "templateType": "anything", "can_override": false}, "B_z": {"name": "B_z", "group": "Ungrouped variables", "definition": "random(1..20)-10", "description": "

Random zcomponent of vector B

", "templateType": "anything", "can_override": false}, "A_dot_B": {"name": "A_dot_B", "group": "Ungrouped variables", "definition": "A_x*B_x+A_y*B_y+A_z*B_z", "description": "

Dot product of vectors A and B (A·B) calculated using Cartesian dot product formula

", "templateType": "anything", "can_override": false}, "A_magnitude": {"name": "A_magnitude", "group": "Ungrouped variables", "definition": "sqrt(A_x^2+A_y^2+A_z^2)", "description": "

Magnitude of vector A

", "templateType": "anything", "can_override": false}, "B_Magnitude": {"name": "B_Magnitude", "group": "Ungrouped variables", "definition": "sqrt(B_x^2+B_y^2+B_z^2)", "description": "

Magnitude of vector B

", "templateType": "anything", "can_override": false}, "Angle_AB": {"name": "Angle_AB", "group": "Ungrouped variables", "definition": "arccos(A_dot_B/(A_magnitude*B_magnitude))*180/pi", "description": "", "templateType": "anything", "can_override": false}, "A_z": {"name": "A_z", "group": "Ungrouped variables", "definition": "random(1..20)-10", "description": "

Random z component of vector A

", "templateType": "anything", "can_override": false}, "cp_x": {"name": "cp_x", "group": "Ungrouped variables", "definition": "1", "description": "", "templateType": "anything", "can_override": false}, "cp_y": {"name": "cp_y", "group": "Ungrouped variables", "definition": "2", "description": "", "templateType": "anything", "can_override": false}, "cp_z": {"name": "cp_z", "group": "Ungrouped variables", "definition": "3", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["A_x", "A_y", "A_z", "B_x", "B_y", "B_z", "A_dot_B", "A_magnitude", "B_Magnitude", "Angle_AB", "cp_x", "cp_y", "cp_z"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": true, "customName": "Magnitude of A", "marks": "10", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

What is the magnitude of vector A = {A_x}î + {A_y}\u0135 + {A_z}k\u0302

\n

Give answers to two decimal places.

", "minValue": "A_magnitude * 0.999", "maxValue": "A_magnitude * 1.001", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "A_magnitude", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "Magnitude of B", "marks": "10", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

What is the magnitude of vector B = {B_x}î + {B_y}\u0135 + {B_z}k\u0302

\n

Give answers to two decimal places.

", "minValue": "B_magnitude*0.999", "maxValue": "B_magnitude*1.001", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "B_magnitude", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "10", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

What is the dot product A·B 

\n

({A_x}î + {A_y}\u0135 + {A_z}k\u0302) · ({B_x}î + {B_y}\u0135 + {B_z}k\u0302)

", "minValue": "A_dot_B*0.999", "maxValue": "A_dot_B*1.001", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "A_dot_B", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "25", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

What is the angle between vector A and vector B

\n

Give answer in degrees to two decimal places.

", "minValue": "Angle_AB*0.999", "maxValue": "Angle_AB*1.001", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "Angle_AB", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

What is the cross product AXB 

\n

({A_x}î + {A_y}\u0135 + {A_z}k\u0302) X ({B_x}î + {B_y}\u0135 + {B_z}k\u0302) = [[0]]î +  [[1]]\u0135 + [[2]]k\u0302

\n

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "CP_x", "marks": "15", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "(A_y*B_z-B_y*A_z)*0.999", "maxValue": "(A_y*B_z-B_y*A_z)*1.001", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "A_y*B_z-B_y*A_z", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "CP_y", "marks": "15", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "-(A_x*B_z-B_x*A_z)*0.999", "maxValue": "-(A_x*B_z-B_x*A_z)*1.001", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "-(A_x*B_z-B_x*A_z)", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "CP_z", "marks": "15", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "(A_x*B_y-B_x*A_y)*0.999", "maxValue": "(A_x*B_y-B_x*A_y)*1.001", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "(A_x*B_y-B_x*A_y)", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false, "inlineCorrectAnswer": true}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false, "contributors": [{"name": "Max Lupton", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/38923/"}], "resources": []}]}], "contributors": [{"name": "Max Lupton", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/38923/"}]}