{
 "schema": 1,
 "id": "area-of-plane-shapes",
 "title": "Area of plane shapes",
 "description": "A = L × W, A = π d² / 4 and A = b × h / 2: the three plane areas a floor, a patio or a gable is broken into, each pinned to a test vector.",
 "url": "https://craftquantities.com/formulas/area-of-plane-shapes/",
 "json": "https://craftquantities.com/formulas/area-of-plane-shapes.json",
 "publisher": "Craft Quantities",
 "license": "https://creativecommons.org/licenses/by/4.0/",
 "licenseName": "CC BY 4.0",
 "note": "These are quantity equations, not design checks. Nothing here sizes a member or confirms that a structure is safe; that is for the engineer or building official responsible for the work.",
 "expressionSyntax": {
  "operators": [
   "+",
   "-",
   "*",
   "/",
   "^"
  ],
  "functions": {
   "sqrt": "square root",
   "ceil": "round up to the next whole number",
   "floor": "round down to the whole number below",
   "round": "round to the nearest whole number",
   "max": "the largest of its arguments",
   "atan_deg": "arctangent, in degrees"
  },
  "constants": {
   "pi": "π"
  }
 },
 "formulas": [
  {
   "id": "rectangle-area",
   "name": "Rectangle",
   "gives": "The area of a rectangular floor, wall or panel.",
   "equation": "A = L × W",
   "expression": "L * W",
   "mathml": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><mrow><mi>A</mi><mo>=</mo><mrow><mi>L</mi><mo>&#215;</mo><mi>W</mi></mrow></mrow></math>",
   "output": {
    "id": "A",
    "symbol": "A",
    "meaning": "Area",
    "unit": {
     "metric": "m²",
     "imperial": "ft²"
    }
   },
   "inputs": [
    {
     "id": "L",
     "symbol": "L",
     "meaning": "Length",
     "unit": {
      "metric": "m",
      "imperial": "ft"
     }
    },
    {
     "id": "W",
     "symbol": "W",
     "meaning": "Width",
     "unit": {
      "metric": "m",
      "imperial": "ft"
     }
    }
   ],
   "calculators": [
    {
     "slug": "square-footage-calculator",
     "title": "Square Footage Calculator",
     "url": "https://craftquantities.com/calculators/measurements-conversions/square-footage-calculator/",
     "reproduces": "result"
    }
   ],
   "testVectors": [
    {
     "calculator": "square-footage-calculator",
     "testCase": "Rectangle 4x3.5m",
     "inputs": {
      "L": 4,
      "W": 3.5
     },
     "output": 14,
     "calculatorOutput": {
      "value": 14,
      "unit": "m²",
      "from": "result"
     },
     "pinned": {
      "expected": 14,
      "toleranceDecimalPlaces": 2
     }
    }
   ]
  },
  {
   "id": "circle-area",
   "name": "Circle",
   "gives": "The area of a round slab, pond or patio from its diameter.",
   "equation": "A = (π × d²) / 4",
   "expression": "pi * d ^ 2 / 4",
   "mathml": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><mrow><mi>A</mi><mo>=</mo><mfrac><mrow><mrow><mi>&#960;</mi><mo>&#215;</mo><msup><mi>d</mi><mrow><mn>2</mn></mrow></msup></mrow></mrow><mrow><mn>4</mn></mrow></mfrac></mrow></math>",
   "output": {
    "id": "A",
    "symbol": "A",
    "meaning": "Area",
    "unit": {
     "metric": "m²",
     "imperial": "ft²"
    }
   },
   "inputs": [
    {
     "id": "d",
     "symbol": "d",
     "meaning": "Diameter",
     "unit": {
      "metric": "m",
      "imperial": "ft"
     }
    }
   ],
   "calculators": [
    {
     "slug": "square-footage-calculator",
     "title": "Square Footage Calculator",
     "url": "https://craftquantities.com/calculators/measurements-conversions/square-footage-calculator/",
     "reproduces": "result"
    }
   ],
   "testVectors": [
    {
     "calculator": "square-footage-calculator",
     "testCase": "Circle, 6m diameter",
     "inputs": {
      "d": 6
     },
     "output": 28.2743338823,
     "calculatorOutput": {
      "value": 28.2743338823,
      "unit": "m²",
      "from": "result"
     },
     "pinned": {
      "expected": 28.27,
      "toleranceDecimalPlaces": 1
     }
    }
   ]
  },
  {
   "id": "triangle-area",
   "name": "Triangle",
   "gives": "The area of a triangular gable, corner or offcut.",
   "equation": "A = (b × h) / 2",
   "expression": "b * h / 2",
   "mathml": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><mrow><mi>A</mi><mo>=</mo><mfrac><mrow><mrow><mi>b</mi><mo>&#215;</mo><mi>h</mi></mrow></mrow><mrow><mn>2</mn></mrow></mfrac></mrow></math>",
   "output": {
    "id": "A",
    "symbol": "A",
    "meaning": "Area",
    "unit": {
     "metric": "m²",
     "imperial": "ft²"
    }
   },
   "inputs": [
    {
     "id": "b",
     "symbol": "b",
     "meaning": "Base",
     "unit": {
      "metric": "m",
      "imperial": "ft"
     }
    },
    {
     "id": "h",
     "symbol": "h",
     "meaning": "Height, square to the base",
     "unit": {
      "metric": "m",
      "imperial": "ft"
     }
    }
   ],
   "calculators": [
    {
     "slug": "square-footage-calculator",
     "title": "Square Footage Calculator",
     "url": "https://craftquantities.com/calculators/measurements-conversions/square-footage-calculator/",
     "reproduces": "result"
    }
   ],
   "testVectors": [
    {
     "calculator": "square-footage-calculator",
     "testCase": "Triangle, base 5m height 4m",
     "inputs": {
      "b": 5,
      "h": 4
     },
     "output": 10,
     "calculatorOutput": {
      "value": 10,
      "unit": "m²",
      "from": "result"
     },
     "pinned": {
      "expected": 10,
      "toleranceDecimalPlaces": 2
     }
    }
   ]
  }
 ],
 "sources": [
  {
   "label": "Standard geometry formulas: rectangle = L x W, circle = pi x r², triangle = 1/2 x base x height",
   "citedBy": [
    "square-footage-calculator"
   ]
  }
 ]
}
