// Numbas version: exam_results_page_options {"name": "Create a JSXGraph diagram using JME code: Three triangle centres lie on a line", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Create a JSXGraph diagram using JME code: Three triangle centres lie on a line", "tags": [], "metadata": {"description": "

This demonstrates how to construct a JSXGraph diagram in JME code.

\n

The construction shows a triangle and its orthocentre, circumcentre and centroid. They are always collinear. You can move the vertices of the triangle.

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

{triangle_diagram}

\n

This diagram was created using the following JME code:

\n
jsxgraph(
  600,600,
  [
    ['point',[-2,-2],[\"name\":\"A\"]],
    ['point',[2,-2],[\"name\":\"B\"]],
    ['point',[1,2],[\"name\":\"C\"]],
    ['circumcenter',['A','B','C'],[\"name\":\"circumcenter\"]],
    ['polygon',['A','B','C']],
    ['segment',['B','C'],['name':'side_A', \"visible\": false]],
    ['segment',['A','C'],['name':'side_B', \"visible\": false]],
    ['segment',['B','A'],['name':'side_C', \"visible\": false]],
    ['perpendicular',['side_A','A'], dotted_line+[\"name\": \"p_a\"] ],
    ['perpendicular',['side_B','B'], dotted_line+[\"name\": \"p_b\"] ],
    ['perpendicular',['side_C','C'], dotted_line+[\"name\": \"p_c\"] ],
    ['circle',['A','B','C'],[\"strokeOpacity\": 0.3]],
    ['midpoint',['A','B'],['name':'M_c', \"visible\": false]],
    ['midpoint',['A','C'],['name':'M_b', \"visible\": false]],
    ['midpoint',['C','B'],['name':'M_a', \"visible\": false]],
    ['line',['A','M_a'],dashed_line+[\"name\": \"median_a\"]],
    ['line',['B','M_b'],dashed_line+[\"name\": \"median_b\"]],
    ['line',['C','M_c'],dashed_line+[\"name\": \"median_c\"]],
    ['intersection',['median_a','median_b'],[\"name\":\"centroid\"]],
    ['intersection',['p_a','p_b'],[\"name\":\"orthocenter\"]],
    ['line',['centroid','orthocenter']]
  ],
  [
    \"axis\": false
  ]
)
", "advice": "", "rulesets": {}, "extensions": ["jsxgraph"], "variables": {"triangle_diagram": {"name": "triangle_diagram", "group": "Ungrouped variables", "definition": "jsxgraph(\n 600,600,\n [\n ['point',[-2,-2],[\"name\":\"A\"]],\n ['point',[2,-2],[\"name\":\"B\"]],\n ['point',[1,2],[\"name\":\"C\"]],\n ['circumcenter',['A','B','C'],[\"name\":\"circumcenter\"]],\n ['polygon',['A','B','C']],\n ['segment',['B','C'],['name':'side_A', \"visible\": false]],\n ['segment',['A','C'],['name':'side_B', \"visible\": false]],\n ['segment',['B','A'],['name':'side_C', \"visible\": false]],\n ['perpendicular',['side_A','A'], dotted_line+[\"name\": \"p_a\"] ],\n ['perpendicular',['side_B','B'], dotted_line+[\"name\": \"p_b\"] ],\n ['perpendicular',['side_C','C'], dotted_line+[\"name\": \"p_c\"] ],\n ['circle',['A','B','C'],[\"strokeOpacity\": 0.3]],\n ['midpoint',['A','B'],['name':'M_c', \"visible\": false]],\n ['midpoint',['A','C'],['name':'M_b', \"visible\": false]],\n ['midpoint',['C','B'],['name':'M_a', \"visible\": false]],\n ['line',['A','M_a'],dashed_line+[\"name\": \"median_a\"]],\n ['line',['B','M_b'],dashed_line+[\"name\": \"median_b\"]],\n ['line',['C','M_c'],dashed_line+[\"name\": \"median_c\"]],\n ['intersection',['median_a','median_b'],[\"name\":\"centroid\"]],\n ['intersection',['p_a','p_b'],[\"name\":\"orthocenter\"]],\n ['line',['centroid','orthocenter']]\n ],\n [\n \"axis\": false\n ]\n)", "description": "", "templateType": "anything"}, "dashed_line": {"name": "dashed_line", "group": "Ungrouped variables", "definition": "[\"dash\": 4, \"strokeOpacity\": 0.3, \"color\": \"gray\"]", "description": "", "templateType": "anything"}, "dotted_line": {"name": "dotted_line", "group": "Ungrouped variables", "definition": "dashed_line+[\"dash\":1]", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["triangle_diagram", "dashed_line", "dotted_line"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}