randFromArray([ ["in", "inch"], ["ft", "foot"], ["m", "meter"], ["cm", "centimeter"], ["", "unit"] ])
randRange(2, 9)

What is the perimeter of the square?

init({ range: [[-2, S + 1], [-1, S + 1]], scale: 30 }); path([[0, 0], [0, S], [S, S], [S, 0], true], {stroke: BLUE, fill: "#eee"}); label([S / 2, S], S + "\\text{ " + UNIT + "}", "above"); label([0, S / 2], S + "\\text{ " + UNIT + "}", "left");
4 * S plural(UNIT_TEXT)

The perimeter is the total length of all the sides of the shape added together.

path([[0, 0], [0, S]], { strokeWidth: 4, stroke: PINK }); path([[0, S], [S, S]], { strokeWidth: 4, stroke: BLUE }); path([[S, S], [S, 0]], { strokeWidth: 4, stroke: "purple" }); path([[S, 0], [0, 0]], { strokeWidth: 4, stroke: GREEN });

Add up the lengths of the sides:

\qquad\text{perimeter} = \pink{S} + \blue{S} + \purple{S} + \green{S}

\qquad\text{perimeter} = S * 4\text{ UNIT}

randRange(2, 9) randRange(2, 9)

What is the perimeter of the rectangle?

init({ range: [[-2, L + 1], [-1, W + 1]], scale: 30 }); path([[0, 0], [0, W], [L, W], [L, 0], true], {stroke: BLUE, fill: "#eee"}); label([L / 2, W], L + "\\text{ " + UNIT + "}", "above"); label([0, W / 2], W + "\\text{ " + UNIT + "}", "left");
L * 2 + W * 2 plural(UNIT_TEXT)

The perimeter is the total length of all the sides of the shape added together.

path([[0, 0], [0, W]], { strokeWidth: 4, stroke: PINK }); path([[0, W], [L, W]], { strokeWidth: 4, stroke: BLUE }); path([[L, W], [L, 0]], { strokeWidth: 4, stroke: "purple" }); path([[L, 0], [0, 0]], { strokeWidth: 4, stroke: GREEN });

Add up the lengths of the sides:

\qquad\text{perimeter} = \pink{W} + \blue{L} + \purple{W} + \green{L}

\qquad\text{perimeter} = L * 2 + W * 2\text{ UNIT}

randRange(2, 9, 3) ((A * A + B * B - C * C) / (2 * A * B)) * B sqrt(B * B - X * X)

What is the perimeter of the triangle?

init({ range: [[min(X, 0) - 2, max(X, A) + 2], [-1, Y + 1]], scale: 30 }); path([[0, 0], [A, 0], [X, Y], true], {stroke: BLUE, fill: "#eee"}); label([A / 2, 0], A + "\\text{ " + UNIT + "}", "below"); label([X / 2 - 0.5, Y / 2], B + "\\text{ " + UNIT + "}", "left"); label([(X + A) / 2 + 0.5, Y / 2], C + "\\text{ " + UNIT + "}", "right");
A + B + C plural(UNIT_TEXT)

The perimeter is the total length of all the sides of the shape added together.

path([[X, Y], [0, 0]], { strokeWidth: 4, stroke: PINK }); path([[A, 0], [X, Y]], { strokeWidth: 4, stroke: BLUE }); path([[0, 0], [A, 0]], { strokeWidth: 4, stroke: GREEN });

Add up the lengths of the sides:

\qquad\text{perimeter} = \pink{B} + \blue{C} + \green{A}

\qquad\text{perimeter} = A + B + C\text{ UNIT}

randRange(2, 3) randFromArray([ [5, "pentagon"], [6, "hexagon"], [8, "octagon"] ]) (2 * PI) / SIDES S / (2 * sin(PI / SIDES)) S / (2 * tan(PI / SIDES))

What is the perimeter of the regular POLYGON?

init({ range: [[-RADIUS - 1, RADIUS + 1], [-RADIUS - 1, RADIUS + 1]], scale: 30 }); graph.path = []; _(SIDES).times(function(n) { graph.path.push([sin(ANGLE * (n + 0.5)) * RADIUS, cos(ANGLE * (n + 0.5)) * RADIUS]); }); graph.path.push(true); path(graph.path, {stroke: BLUE, fill: "#eee"}); graph.label = label([0, APOTHEM + 0.7], S + "\\text{ " + UNIT + "}");
S * SIDES plural(UNIT_TEXT)

The perimeter is the total length of all the sides of the shape added together.

graph.label.remove(); _(SIDES).times(function(n) { label([sin(ANGLE * n) * (APOTHEM + 0.7), cos(ANGLE * n) * (APOTHEM + 0.7)], S + "\\text{ " + UNIT + "}", {color: GREEN}); });

All of the sides of a regular POLYGON are the same length.

Saying a polygon is regular just means the sides are all the same.

Since there are SIDES sides that are all S plural(UNIT_TEXT) long, we can multiply:

\qquad\text{perimeter} = \blue{SIDES} \times \green{S}

\qquad\text{perimeter} = S * SIDES\text{ UNIT}

randRange(5, 10) randRange(5, 10) createOddShape({ width: WIDTH, height: HEIGHT }) SHAPE.sides

What is the perimeter of the shape? Each square in the grid is a 1 \times 1 UNIT_TEXT square.

init({ range: [[-1, WIDTH + 1], [-1, HEIGHT + 1]] }); var shape = []; _(WIDTH + 1).times(function(i) { line([i, 0], [i, HEIGHT], { "stroke-width": 1, stroke: "#bbb" }); }); _(HEIGHT + 1).times(function(i) { line([0, i], [WIDTH, i], { "stroke-width": 1, stroke: "#bbb" }); }); _.each(SHAPE.sides, function(side) { path([side.start, side.end], {stroke: BLUE}); });
SHAPE.perimeter plural(UNIT_TEXT)

The perimeter is the total length of all the sides of the shape added together.

SHAPE.labelSides();

Add up the lengths of all SHAPE.numSides sides.

\qquad _.map(SHAPE.sides, function(v) { return v.length; }).join("+") = \text{ ?}

The perimeter is SHAPE.perimeter plural(UNIT_TEXT).