Geometry
Package:
GEOMETRY_PACKAGE. Registered bycreateEngine(); for a slimmer engine, register it explicitly (see choosing packages).
Work out the size of a shape from its measurements: the area it covers, the
perimeter around its edge, the volume it holds, or its surface area.
Name the measure, the shape, and the shape’s dimensions, and the formula is
applied for you, no need to remember whether it was πr² or 2πr.
Flat shapes
Section titled “Flat shapes”area of circle radius 5 // 78.54circumference of circle radius 5 // 31.42area of square side 4 // 16perimeter of square side 4 // 16area of triangle base 3, height 4 // 6A shape with two dimensions takes them as a pair, separated by a comma:
area of rectangle width 4, height 6 // 24perimeter of rectangle width 4, height 6 // 20The comma matters. Without it, 4 height reads as a number times a value called
height (the ordinary “4x means 4 times x” rule), so the comma is what keeps the
two measurements apart. It also means the dimension words (width, height,
radius, …) stay ordinary words you can still use as names elsewhere.
Solid shapes
Section titled “Solid shapes”volume of sphere radius 3 // 113.10surface area of sphere radius 3 // 113.10volume of cube side 2 // 8volume of cylinder radius 2, height 5 // 62.83volume of cone radius 2, height 6 // 25.13The shapes and their dimensions
Section titled “The shapes and their dimensions”- circle:
radius(area, perimeter / circumference) - square:
side(area, perimeter) - rectangle:
width,height(area, perimeter) - triangle:
base,height(area) - sphere:
radius(volume, surface area) - cube:
side(volume, surface area) - cylinder:
radius,height(volume, surface area) - cone:
radius,height(volume)
Dimensions are plain numbers here (this does not yet carry units through to a squared or cubed result). A measure a shape does not define, or a missing dimension, is reported as an error naming what it needed rather than a wrong number.