// Numbas version: exam_results_page_options {"name": "Block sliding down a frictionless slope (with graphic)", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variables": {"FN": {"definition": "siground(mass*g*cos(radians(theta)),3)", "templateType": "anything", "group": "calculated variables", "name": "FN", "description": "

The normal reaction force of the plane on the block

"}, "a": {"definition": "siground(random(1.1..5#0.1),2)", "templateType": "anything", "group": "random variables", "name": "a", "description": "

The acceleration of the block down the slope.

"}, "mass": {"definition": "siground(random(0.2..9.9#0.1),2)", "templateType": "anything", "group": "random variables", "name": "mass", "description": "

The mass of the block.

"}, "theta": {"definition": "random(30..60#1)", "templateType": "randrange", "group": "random variables", "name": "theta", "description": "

The angle of the slope.

"}, "FP": {"definition": "siground(mass*g*sin(radians(theta)),3)", "templateType": "anything", "group": "calculated variables", "name": "FP", "description": ""}, "answer": {"definition": "aa", "templateType": "anything", "group": "calculated variables", "name": "answer", "description": ""}, "a_string": {"definition": "\"Calculate the acceration of the block in ms$^\\{-2\\}$\"", "templateType": "anything", "group": "calculated variables", "name": "a_string", "description": ""}, "g": {"definition": "9.8", "templateType": "anything", "group": "constants", "name": "g", "description": ""}, "aa": {"definition": "siground(FP/mass,3)", "templateType": "anything", "group": "calculated variables", "name": "aa", "description": ""}}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

A block of given mass is sliding down the plane with a given acceration. Find the normal reaction force, the parallel force and the missing value of a and mu.

"}, "statement": "

{draw_block()}

\n

A block of mass {mass} kg slides down a frictionless plane which is inclined at an angle $\\theta$ = {theta}$^{\\circ}$ to the horizontal.

\n

The acceleration due to gravity is g={g} ms$^{-2}$.

", "name": "Block sliding down a frictionless slope (with graphic)", "variablesTest": {"maxRuns": 100, "condition": ""}, "extensions": ["jsxgraph"], "rulesets": {}, "tags": [], "advice": "

a)

\n

To find the normal reaction force $F_N$, we resolve the forces perpendicular to the plane.

\n

 
$F_N =$ mg cos $\\theta$,
$F_N =$ {mass} $\\times$ {g} cos( {theta}$^{\\circ}$),

\n

And so the normal force $F_N$ is {fn} N.

\n

b)

\n

To find the force $F_P$ parallel to the plane, we resolve the forces parallel to the plane.

\n

 
$F_P =$ mg sin $\\theta$,
$F_P =$ {mass} $\\times$ {g} sin ({theta}$^{\\circ}$),

\n

And so the parallel force $F_P$ is {fp} N.

\n

\n

c)

\n

To find the acceleration of the block, you must calculate divide the force down the slope by the mass.

\n

F=ma

\n

a = F{\"<sub>P</sub>\"} / m

\n

a = {FP} / {mass}

\n

So, the acceration of the block is {answer} m/s<sup>-2</sup>.

\n

", "functions": {"draw_block": {"language": "javascript", "definition": "// Takes variables\n\n// showing K or C?\n//k_c = Numbas.jme.unwrapValue(scope.variables.k_c_switch);\n//\n//if (k_c = 0) {\n// var k_c_corr =0;\n// var k_c_str=\"K\";\n//} else {\n// var k_c_corr =-273;\n// var k_c_str=\"\u00b0C\";\n//}\n\n//Set values\ntheta = Numbas.jme.unwrapValue(scope.variables.theta);\nr_theta = theta * Math.PI / 180. \nm = Numbas.jme.unwrapValue(scope.variables.mass);\n//et = Numbas.jme.unwrapValue(scope.variables.end_temp)+k_c_corr;\n//pt1 = Numbas.jme.unwrapValue(scope.variables.phase1_temp)+k_c_corr;\n//pt2 = Numbas.jme.unwrapValue(scope.variables.phase2_temp)+k_c_corr;\n\n\n// The function provided by the JSXGraph extension wraps the board up in\n// a div tag so that it's easier to embed in the page.\nvar div = Numbas.extensions.jsxgraph.makeBoard('300px','260px',\n//{boundingBox: [-0.1,-0.1,1.,1.],\n {boundingBox: [1.,0.8,-0.1,-0.1],\n axis: false,\n showNavigation: false,\n grid: false\n });\n\n// div.board is the object created by JSXGraph, which you use to\n// manipulate elements\nvar board = div.board;\n\n\n\n// create the x-axis.\n//var xaxis = board.create('line',[[0,0],[1,0]], {strokeColor: 'black', fixed: true});\n//var xticks = board.create('ticks',[xaxis,20],{\n// drawLabels: true,\n// minorTicks: 0\n//});\n\n// create the y-axis\n\n//var yaxis = board.create('line',[[0,0],[0,1]], { strokeColor: 'black', fixed: true });\n//var yticks = board.create('ticks',[yaxis,parseInt((et-st)/50.)*10],{\n//drawZero:true,\n//drawLabels: true,\n//label: {offset: [20, 0]},\n//minorTicks: 0\n//});\n\n\n// each line needs four coordinates start x,y and end x,y - these can then all be rotated\n\n// the slope itself\n\nvar l1_x1=0.\nvar l1_x2=0.9\nvar l1_y1=0.\nvar l1_y2=0.\n\n\t// the left edge of the box \n\nvar l2_x1=0.3\nvar l2_x2=0.3\nvar l2_y1=0\nvar l2_y2=0.2\n\n\t\t// the top edge of the box \n\nvar l3_x1=0.3\nvar l3_x2=0.6\nvar l3_y1=0.2\nvar l3_y2=0.2\n\t\t\t\n\t\t\t// the right edge of the box \n\nvar l4_x1=0.6\nvar l4_x2=0.6\nvar l4_y1=0.2\nvar l4_y2=0.\n\n//centre of the block\n\nvar c_x=0.45\nvar c_y=0.1\n\n//each line must be rotated by theta to get to the correct angle\n\n\n// the slope itself\n\nvar ql1_x1=l1_x1*Math.cos(r_theta)-l1_y1*Math.sin(r_theta)\nvar ql1_y1=l1_x1*Math.sin(r_theta)-l1_y1*Math.cos(r_theta)\nvar ql1_x2=l1_x2*Math.cos(r_theta)-l1_y2*Math.sin(r_theta)\nvar ql1_y2=l1_x2*Math.sin(r_theta)-l1_y2*Math.cos(r_theta)\n\n\t// the left edge of the box \n\nvar ql2_x1=l2_x1*Math.cos(r_theta)-l2_y1*Math.sin(r_theta)\nvar ql2_y1=l2_x1*Math.sin(r_theta)+l2_y1*Math.cos(r_theta)\nvar ql2_x2=l2_x2*Math.cos(r_theta)-l2_y2*Math.sin(r_theta)\nvar ql2_y2=l2_x2*Math.sin(r_theta)+l2_y2*Math.cos(r_theta)\n\n\t\t// the top edge of the box \n\nvar ql3_x1=l3_x1*Math.cos(r_theta)-l3_y1*Math.sin(r_theta)\nvar ql3_y1=l3_x1*Math.sin(r_theta)+l3_y1*Math.cos(r_theta)\nvar ql3_x2=l3_x2*Math.cos(r_theta)-l3_y2*Math.sin(r_theta)\nvar ql3_y2=l3_x2*Math.sin(r_theta)+l3_y2*Math.cos(r_theta)\n\t\t\t\n\t\t\t// the right edge of the box \n\nvar ql4_x1=l4_x1*Math.cos(r_theta)-l4_y1*Math.sin(r_theta)\nvar ql4_y1=l4_x1*Math.sin(r_theta)+l4_y1*Math.cos(r_theta)\nvar ql4_x2=l4_x2*Math.cos(r_theta)-l4_y2*Math.sin(r_theta)\nvar ql4_y2=l4_x2*Math.sin(r_theta)+l4_y2*Math.cos(r_theta)\n\n//centre of the box\n\nvar qc_x=c_x*Math.cos(r_theta)-c_y*Math.sin(r_theta)\nvar qc_y=c_x*Math.sin(r_theta)+c_y*Math.cos(r_theta)\n\n//var block = board.create('polygon',[ [0.3,0], [0.3,0.2] , [0.6,0.2] ,[0.6,0] ] );\n\n//\n//slope 1\nvar line1 = board.create('line',[[l1_x1,l1_y1],[l1_x2,l1_y2]], {straightFirst:true, straightLast:true, strokeColor: 'black', fixed: true });\nvar line1b = board.create('line',[[ql1_x1,ql1_y1],[ql1_x2,ql1_y2]], {straightFirst:false, straightLast:true, strokeColor: 'black', fixed: true });\nvar line2 = board.create('line',[[ql2_x1,ql2_y1],[ql2_x2,ql2_y2]], {straightFirst:false, straightLast:false, strokeColor: 'black', fixed: true });\nvar line3 = board.create('line',[[ql3_x1,ql3_y1],[ql3_x2,ql3_y2]], {straightFirst:false, straightLast:false, strokeColor: 'black', fixed: true });\nvar line4 = board.create('line',[[ql4_x1,ql4_y1],[ql4_x2,ql4_y2]], {straightFirst:false, straightLast:false, strokeColor: 'black', fixed: true });\n\n//var slope6 = board.create('line',[[4,pt1],[20,pt2]], {dash:2,straightFirst:false, straightLast:false, strokeColor: 'black', fixed: true });\n\n//var dash1 = board.create('line',[[s1sz+4,st-10],[s1sz+4,et+10]], {dash:2, strokewidth:1, straightFirst:false, straightLast:false, strokeColor: 'black', fixed: true });\n//var dash2 = board.create('line',[[s1sz+8,st-10],[s1sz+8,et+10]], {dash:2, strokewidth:1, straightFirst:false, straightLast:false, strokeColor: 'black', fixed: true });\n//var dash3 = board.create('line',[[s1sz+s3sz+8,st-10],[s1sz+s3sz+8,et+10]], {dash:2, strokewidth:1, straightFirst:false, straightLast:false, strokeColor: 'black', fixed: true });\n//var dash4 = board.create('line',[[s1sz+s3sz+12,st-10],[s1sz+s3sz+12,et+10]], {dash:2, strokewidth:1, straightFirst:false, straightLast:false, strokeColor: 'black', fixed: true });\n\n\n//label the y-axis\nvar label = board.create('text',[0.25,0.05,theta+'\\xB0'],{fontSize:20});\n\n//label the mass\nvar mass = board.create('text',[qc_x,qc_y, m.toFixed(1)+' kg'], {display:'internal',rotate:-theta,anchorX:'middle',anchorY:'middle',fontSize:18});\n\n\n//var tRot = board.create('transform', [6,0.1,0.15], {type:'rotate'})\n//tRot.bindTo(mass);\n//board.update();\n// and return the container div\nreturn div;", "parameters": [], "type": "html"}}, "variable_groups": [{"variables": ["mass", "theta", "a"], "name": "random variables"}, {"variables": ["FN", "FP", "aa", "answer", "a_string"], "name": "calculated variables"}, {"variables": ["g"], "name": "constants"}], "preamble": {"js": "", "css": ""}, "parts": [{"maxValue": "FN+FN/100", "notationStyles": ["plain", "en", "si-en"], "mustBeReducedPC": 0, "scripts": {}, "marks": 1, "correctAnswerStyle": "plain", "mustBeReduced": false, "type": "numberentry", "variableReplacements": [], "allowFractions": false, "prompt": "

Find the normal reaction, $F_N$ between the block and the plane, in N to 3 decimal places.

", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "showFeedbackIcon": true, "correctAnswerFraction": false, "minValue": "FN-FN/100"}, {"maxValue": "FP+FP/100", "notationStyles": ["plain", "en", "si-en"], "mustBeReducedPC": 0, "scripts": {}, "marks": 1, "correctAnswerStyle": "plain", "mustBeReduced": false, "type": "numberentry", "variableReplacements": [], "allowFractions": false, "prompt": "

Find the gravitational force on the block, parallel to the plane $F_P$, in N to 3 decimal places.

", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "showFeedbackIcon": true, "correctAnswerFraction": false, "minValue": "FP-FP/100"}, {"notationStyles": ["plain", "en", "si-en"], "precision": "3", "scripts": {}, "correctAnswerFraction": false, "mustBeReduced": false, "variableReplacements": [{"variable": "FP", "must_go_first": true, "part": "p1"}], "precisionType": "dp", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "allowFractions": false, "precisionMessage": "You have not given your answer to the correct precision.", "precisionPartialCredit": 0, "showFeedbackIcon": true, "minValue": "answer-answer/100", "maxValue": "answer+answer/100", "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "marks": "1", "type": "numberentry", "strictPrecision": false, "prompt": "

{a_string}, to 3 decimal places.

", "showPrecisionHint": false}], "ungrouped_variables": [], "type": "question", "contributors": [{"name": "Tom Stallard", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/841/"}]}]}], "contributors": [{"name": "Tom Stallard", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/841/"}]}