// Numbas version: exam_results_page_options {"name": "Baseline Trigonometry 1 adjacent JSXGraph version", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Baseline Trigonometry 1 adjacent JSXGraph version", "tags": [], "metadata": {"description": "

Use Pythagoras' Theorem to find the length of a side on a right-angled triangle.

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

{diagram}

\n", "advice": "

By Pythagoras' Theorem:

\n

\\(\\begin{align}\\var{abs(bc)}^2+c^2&=\\var{hypotenuse}^2\\\\c^2&=\\var{hypotenuse}^2-\\var{abs(bc)}^2\\\\&=\\var{hypotenuse^2-bc^2}\\\\c&=\\sqrt{\\var{hypotenuse^2-bc^2}}\\end{align}\\)

\n

$\\therefore \\var{simplify(expression(\"c=\\sqrt(\"+hypotenuse+\"*\"+hypotenuse+\"-\"+bc+\"*\"+bc+ \")\"),\"all\")}$

", "rulesets": {}, "extensions": ["jsxgraph"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"diagram": {"name": "diagram", "group": "Triangle diagram", "definition": "jessiecode(500,{axesV},[{left},{top},{right},{bottom}],\n\"aLabel={aLabel};bLabel={bLabel};cLabel={cLabel};ab={ab};bc={bc};XCoordOfRA={XCoordOfRA};YCoordOfRA={YCoordOfRA};hSMPX={horizontalSideMidpointX};hSMPY={horizontalSideMidpointY};vSMPX={verticalSideMidpointX};vSMPY={verticalSideMidpointY};hypMPX={hypotenuseMidpointX};hypMPY={hypotenuseMidpointY};hAHP0={horizontalAngleHorizontalPoint[0]};hAHP1={horizontalAngleHorizontalPoint[1]};hAVP0={horizontalAngleVerticalPoint[0]};hAVP1={horizontalAngleVerticalPoint[1]};horizontalLabelPosition={horizontalLabelPosition};verticalLabelPosition={verticalLabelPosition};hypotenuseLabelPositionX={hypotenuseLabelPositionX};hypotenuseLabelPositionY={hypotenuseLabelPositionY};\"+safe(\"\"\" // [l,t,r,b]\n point(0,0) <>;\n point(ab,0) <>;\n point(ab,bc) <>;\n segment(A,B) <>;\n segment(B,C) <>;\n segment(C,A) <>;\n \n// Mark in the right angle marker \n point(XCoordOfRA,0) <>;\n point(XCoordOfRA,YCoordOfRA) <>;\n point(ab,YCoordOfRA) <>;\n\n// Add the side labels. \n point(hSMPX,hSMPY) <>, showInfobox: false, size: 0>>;\n point(vSMPX,vSMPY) <>, showInfobox: false, size: 0>>;\n point(hypMPX,hypMPY) <>, showInfobox: false, size: 0>>; \n\n// Set up the angle marker \n point(hAHP0,hAHP1) <>;\n point(hAVP0,hAVP1) <>;\n point(hAHP0,hAVP1) <>;\n point(hAHP0,hAVP1) <>;\n \n// Add the angle markers \nhAngle = function() {if (ab>0) {\n if (bc>0) {\n return angle(B,A,C) <>>>;\n } else {\n return angle(C,A,B) <>>>;\n }\n } else {\n if (bc>0) {\n return angle(C,A,B) <>>>;\n } else {\n return angle(B,A,C) <>>>;\n }\n }\n};\nrAngle = function() {if (ab>0) {\n if (bc>0) {\n return angle(C,B,A) <>;\n } else {\n return angle(A,B,C) <>;\n }\n } else {\n if (bc>0) {\n return angle(A,B,C) <>;\n } else {\n return angle(C,B,A) <>;\n }\n }\n};\nvAngle = function() {if (ab>0) {\n if (bc>0) {\n return angle(A,C,B) <>>>;\n } else {\n return angle(B,C,A) <>>>;\n }\n } else {\n if (bc>0) {\n return angle(B,C,A) <>>>;\n } else {\n return angle(A,C,B) <>>>;\n }\n }\n}; \n\n //hAngle();\n rAngle();\n //vAngle();\n \n\"\"\"),\n[\n \"axis\": false,\n \"keepaspectratio\": true\n ])", "description": "

Draw the right angled triangle

", "templateType": "anything", "can_override": false}, "ab": {"name": "ab", "group": "Side lengths", "definition": "random(-6..6#1 except [0,1,2])", "description": "

approximate length of side c. This is just a starting approximation to the length. It is used to draw the triangle.

", "templateType": "anything", "can_override": false}, "bc": {"name": "bc", "group": "Side lengths", "definition": "random(2..abs(ab)-1)*random(-1,1)//if(ab<0,ab+1,ab-1)//random(-6..6#1 except [0,1,2])", "description": "

Length of side b. It is also used to draw the triangle.

", "templateType": "anything", "can_override": false}, "left": {"name": "left", "group": "JSX box dimensions", "definition": "if(ab<0,ab-vertexInc,-vertexInc)", "description": "

Min. value of x-axis scale for triangle diagram

", "templateType": "anything", "can_override": false}, "right": {"name": "right", "group": "JSX box dimensions", "definition": "if(ab>0,ab+vertexInc,vertexInc)", "description": "

Max. value of x-axis scale for triangle diagram

", "templateType": "anything", "can_override": false}, "top": {"name": "top", "group": "JSX box dimensions", "definition": "if(bc<0,vertexInc,bc+vertexInc)", "description": "

Max. value of y-axis scale for triangle diagram

", "templateType": "anything", "can_override": false}, "bottom": {"name": "bottom", "group": "JSX box dimensions", "definition": "if(bc>0,-vertexInc,bc-vertexInc)", "description": "

Min. value of y-axis scale for triangle diagram

", "templateType": "anything", "can_override": false}, "abPortionPre": {"name": "abPortionPre", "group": "Helping variables", "definition": "0.1*abs(ab)", "description": "

Used to draw the right angle

", "templateType": "anything", "can_override": false}, "bcPortionPre": {"name": "bcPortionPre", "group": "Helping variables", "definition": "abPortionPre*(boxHeight/boxWidth)//0.1*abs(bc)*1/(boxHeight/boxWidth)", "description": "

Used to draw the right angle

", "templateType": "anything", "can_override": false}, "XCoordOfRA": {"name": "XCoordOfRA", "group": "Diagram feature positions", "definition": "if(ab>0,ab-abPortionPre,ab+abPortionPre)", "description": "

x-coordinate of the right angle marker.

", "templateType": "anything", "can_override": false}, "YCoordOfRA": {"name": "YCoordOfRA", "group": "Diagram feature positions", "definition": "if(bc>0,bcPortionPre,-bcPortionPre)", "description": "

y-coordinate of the right angle marker.

", "templateType": "anything", "can_override": false}, "vertexInc": {"name": "vertexInc", "group": "Helping variables", "definition": "0.5", "description": "", "templateType": "anything", "can_override": false}, "boxHeight": {"name": "boxHeight", "group": "JSX box dimensions", "definition": "(top-bottom)", "description": "

Dimensions of the JSX box

", "templateType": "anything", "can_override": false}, "boxwidth": {"name": "boxwidth", "group": "JSX box dimensions", "definition": "right-left", "description": "

Dimensions of the JSX box

", "templateType": "anything", "can_override": false}, "horizontalSideMidpointX": {"name": "horizontalSideMidpointX", "group": "Diagram feature positions", "definition": "ab/2", "description": "

x-location of side label on triangle diagram.

", "templateType": "anything", "can_override": false}, "horizontalSideMidpointY": {"name": "horizontalSideMidpointY", "group": "Diagram feature positions", "definition": "0", "description": "

y-location of side label on triangle diagram.

", "templateType": "anything", "can_override": false}, "verticalSideMidpointX": {"name": "verticalSideMidpointX", "group": "Diagram feature positions", "definition": "ab", "description": "

x-location of side label on triangle diagram.

", "templateType": "anything", "can_override": false}, "verticalSideMidpointY": {"name": "verticalSideMidpointY", "group": "Diagram feature positions", "definition": "bc/2", "description": "

x-location of side label on triangle diagram.

", "templateType": "anything", "can_override": false}, "hypotenuseMidpointX": {"name": "hypotenuseMidpointX", "group": "Diagram feature positions", "definition": "horizontalSideMidpointX", "description": "

x-location of hypotenuse label on triangle diagram.

", "templateType": "anything", "can_override": false}, "hypotenuseMidpointY": {"name": "hypotenuseMidpointY", "group": "Diagram feature positions", "definition": "verticalSideMidpointY", "description": "

y-location of hypotenuse label on triangle diagram.

", "templateType": "anything", "can_override": false}, "horizontalLabelPosition": {"name": "horizontalLabelPosition", "group": "Diagram feature positions", "definition": "if(bc>0,-20,20)", "description": "

Used in positioning the side label

", "templateType": "anything", "can_override": false}, "verticalLabelPosition": {"name": "verticalLabelPosition", "group": "Diagram feature positions", "definition": "if(ab>0,20,-25)", "description": "

Used in positioning the side label

", "templateType": "anything", "can_override": false}, "hypotenuseLabelPositionX": {"name": "hypotenuseLabelPositionX", "group": "Diagram feature positions", "definition": "if(ab>0,-20,15)", "description": "

Used in positioning the hypotenuse label

", "templateType": "anything", "can_override": false}, "hypotenuseLabelPositionY": {"name": "hypotenuseLabelPositionY", "group": "Diagram feature positions", "definition": "if(bc>0,15,-15)", "description": "

Used in positioning the hypotenuse label

", "templateType": "anything", "can_override": false}, "horizontalAngleHorizontalPoint": {"name": "horizontalAngleHorizontalPoint", "group": "Diagram feature positions", "definition": "[0.5*ab,0]", "description": "

Used to determine the position of the angle marker on the diagram

", "templateType": "anything", "can_override": false}, "horizontalAngleVerticalPoint": {"name": "horizontalAngleVerticalPoint", "group": "Diagram feature positions", "definition": "[0.5*adjRatioH*ab*cos(alpha),0.5*adjRatioH*ab*sin(alpha)] //*adjRatioH", "description": "

Used to determine the position of the angle marker on the diagram

", "templateType": "anything", "can_override": false}, "alpha": {"name": "alpha", "group": "Helping variables", "definition": "atan2(bc,ab)", "description": "", "templateType": "anything", "can_override": false}, "adjRatioW": {"name": "adjRatioW", "group": "Helping variables", "definition": "boxWidth/boxHeight", "description": "", "templateType": "anything", "can_override": false}, "adjRatioH": {"name": "adjRatioH", "group": "Helping variables", "definition": "((boxHeight-1)*boxWidth)/(boxHeight*(boxWidth-1))//12/10//1-(bc/ab)//boxHeight/boxWidth", "description": "", "templateType": "anything", "can_override": false}, "axesV": {"name": "axesV", "group": "JSX box dimensions", "definition": "((abs(bc)+1)*500)/(abs(ab)+1)", "description": "

image height

", "templateType": "anything", "can_override": false}, "aLabel": {"name": "aLabel", "group": "Side labels", "definition": "\"'\"+ceil(sqrt(ab*ab+bc*bc))+\"'\"", "description": "", "templateType": "anything", "can_override": false}, "bLabel": {"name": "bLabel", "group": "Side labels", "definition": "\"'\"+abs(bc)+\"'\"", "description": "", "templateType": "anything", "can_override": false}, "cLabel": {"name": "cLabel", "group": "Side labels", "definition": "\"'\"+abs(ab)+\"'\"", "description": "", "templateType": "anything", "can_override": false}, "hypotenuse": {"name": "hypotenuse", "group": "Side lengths", "definition": "ceil(sqrt(ab*ab+bc*bc))", "description": "

hypotenuse length

", "templateType": "anything", "can_override": false}, "ans_squared": {"name": "ans_squared", "group": "Side lengths", "definition": "hypotenuse^2-bc^2", "description": "

square of required side length

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "Triangle diagram", "variables": ["diagram"]}, {"name": "Side lengths", "variables": ["ab", "bc", "hypotenuse", "ans_squared"]}, {"name": "JSX box dimensions", "variables": ["left", "right", "top", "bottom", "boxHeight", "boxwidth", "axesV"]}, {"name": "Diagram feature positions", "variables": ["XCoordOfRA", "YCoordOfRA", "horizontalSideMidpointX", "horizontalSideMidpointY", "verticalSideMidpointX", "verticalSideMidpointY", "hypotenuseMidpointX", "hypotenuseMidpointY", "horizontalLabelPosition", "verticalLabelPosition", "hypotenuseLabelPositionX", "hypotenuseLabelPositionY", "horizontalAngleHorizontalPoint", "horizontalAngleVerticalPoint"]}, {"name": "Helping variables", "variables": ["abPortionPre", "bcPortionPre", "vertexInc", "alpha", "adjRatioW", "adjRatioH"]}, {"name": "Side labels", "variables": ["aLabel", "bLabel", "cLabel"]}], "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": "

Find the exact value of $c$. You might need to use square roots in your answer. To type $\\sqrt{2}$, enter sqrt(2).

\n

$c = $ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "sqrt({ans_squared})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": "0.0000000000000000000001", "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Don Shearman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/680/"}, {"name": "Jim Pettigrew", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2037/"}, {"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}, {"name": "Patrick O'Doherty", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/19427/"}]}]}], "contributors": [{"name": "Don Shearman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/680/"}, {"name": "Jim Pettigrew", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2037/"}, {"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}, {"name": "Patrick O'Doherty", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/19427/"}]}