{
  "tool": "matric-nqf4.maths_circle_tangent",
  "name": "Tangent to a circle (CDU-GEN-NSC-400)",
  "answers": "The tangent to (x − a)² + (y − b)² = r² at a point on the circle: prove the point is on it, radius ⟂ tangent, the line in standard form.",
  "degree": {
    "id": "competency:matric-nqf4",
    "code": "CDU-GEN-NSC-400",
    "name": "Senior Certificate (Amended) — exam-readiness programme (NQF 4 matric)",
    "version": "1.0.0"
  },
  "reference": "CAPS Grade 12 Mathematics, worked reference M15 (offline reconstruction); gradient of tangent = −1/(gradient of radius)",
  "endpoint": "/faculty/matric-nqf4/maths_circle_tangent",
  "feeSt": 1,
  "inputSchema": {
    "type": "object",
    "required": [
      "pan",
      "a",
      "b",
      "r",
      "px",
      "py"
    ],
    "properties": {
      "pan": {
        "type": "string",
        "description": "The student PAN — the degree must be held in one of its five slots",
        "pattern": "^[0-9 ]{16,19}$"
      },
      "a": {
        "type": "number",
        "description": "centre x",
        "minimum": -1000,
        "maximum": 1000
      },
      "b": {
        "type": "number",
        "description": "centre y",
        "minimum": -1000,
        "maximum": 1000
      },
      "r": {
        "type": "number",
        "description": "radius (r > 0)",
        "minimum": 0.001,
        "maximum": 100000
      },
      "px": {
        "type": "number",
        "description": "point x",
        "minimum": -100000,
        "maximum": 100000
      },
      "py": {
        "type": "number",
        "description": "point y",
        "minimum": -100000,
        "maximum": 100000
      }
    },
    "additionalProperties": false
  },
  "outputSchema": {
    "type": "object",
    "required": [
      "tangentGradient",
      "lineA",
      "lineB",
      "lineC"
    ],
    "properties": {
      "tangentGradient": {
        "type": "number",
        "description": "gradient of the tangent"
      },
      "lineA": {
        "type": "number",
        "description": "A of Ax + By + C = 0"
      },
      "lineB": {
        "type": "number",
        "description": "B of Ax + By + C = 0"
      },
      "lineC": {
        "type": "number",
        "description": "C of Ax + By + C = 0"
      }
    },
    "additionalProperties": false
  },
  "example": {
    "a": 2,
    "b": -1,
    "r": 5,
    "px": 5,
    "py": 3
  }
}