randFromArray([ ["in", new Plural(function(num) { return $.ngettext("inch", "inches", num); })], ["ft", new Plural(function(num) { return $.ngettext("foot", "feet", num); })], ["m", new Plural(function(num) { return $.ngettext("meter", "meters", num); })], ["cm", new Plural(function(num) { return $.ngettext("centimeter", "centimeters", num); })], ["", new Plural(function(num) { return $.ngettext("unit", "units", num); })] ])
randRange(2, 9) randRange(2, 9) sqrt(B * B + H * H) $._("area")

What is the area of the triangle?

init({ range: [[-2, B + 1], [-1, H + 1]], scale: 30 }); path([[0, 0], [0, H], [B, 0], true], {stroke: BLUE, fill: "#eee"}); label([B / 2, 0], B + "\\text{ " + UNIT + "}", "below"); label([0, H / 2], H + "\\text{ " + UNIT + "}", "left"); // Label hypotenuse if it's an integer if (HYP === round(HYP)) { label([B / 2, H * 0.55], HYP + "\\text{ " + UNIT + "}", "right"); } path([[0, 0.3], [0.3, 0.3], [0.3, 0]], { stroke: BLUE });
(B * H) / 2 square plural_form(UNIT_TEXT)
style({ stroke: GRAY, strokeWidth: 1, strokeDasharray: "-" }, function() { _(B).times(function(x) { path([[x + 61 / 60, 0], [x + 61 / 60, H]]); }); _(H).times(function(y) { path([[0, y + 61 / 60], [B, y + 61 / 60]]); }); });

The base of the triangle is B UNIT_TEXT.The base of the triangle is B plural_form(UNIT_TEXT, B). The height of the triangle is H UNIT_TEXT.The height of the triangle is H plural_form(UNIT_TEXT, H). Thus the area of the rectangle shown above is B \times H.

The triangle takes up half as much area as the rectangle, so the area of the triangle is \frac{1}{2} of B \times H.

\text{AREA} = \frac{1}{2} \times B \times H = (B * H) / 2

randRange(3, 9) randRange(2, 9) randRange(H + 1, floor(sqrt(H * H + B * B) - 1)) sqrt(HYP * HYP - H * H) $._("area")

What is the area of the triangle?

init({ range: [[-2, B + 1], [-1, H + 1]], scale: 30 }); path([[0, 0], [TOP, H], [B, 0], true], {stroke: BLUE, fill: "#eee"}); label([B / 2, 0], B + "\\text{ " + UNIT + "}", "below"); graph.hypotenuseLabel = label([TOP * 0.5, H * 0.5], HYP + "\\text{ " + UNIT + "}", "left"); path([[TOP + 1/60, 0], [TOP + 1/60, H]], { stroke: BLUE, strokeWidth: 1, strokeDasharray: "- " }); graph.heightLabel = label([TOP, H * 0.4], H + "\\text{ " + UNIT + "}", TOP / B > 0.5 ? "left" : "right");
(B * H) / 2 square plural_form(UNIT_TEXT)
graph.hypotenuseLabel.remove(); graph.grid = raphael.set(); style({ stroke: GRAY, strokeWidth: 1, strokeDasharray: "-" }, function() { _(B + 1).times(function(x) { if (x !== TOP) { graph.grid.push(path([[x + 1 / 60, 0], [x + 1 / 60, H]])); } }); _(H).times(function(y) { graph.grid.push(path([[0, y + 61 / 60], [B, y + 61 / 60]])); }); }); graph.heightLabel.remove(); graph.heightLabel = label([0, H / 2], H + "\\text{ " + UNIT + "}", TOP / B > 0.5 ? "left" : "left");

The base of the triangle is B UNIT_TEXT.The base of the triangle is B plural_form(UNIT_TEXT, B). The height of the triangle is H UNIT_TEXT.The height of the triangle is H plural_form(UNIT_TEXT, H). Thus the area of the rectangle shown above is B \times H.

The triangle takes up half as much area as the rectangle (look at the left part and the right part separately to see how), so the area of the triangle is \frac{1}{2} of B \times H.

graph.leftBox = path([[-1, -1], [-1, H + 1], [TOP, H + 1], [TOP, -1], true], { stroke: false, fill: "#f8f8f8", opacity: 0.0 }); graph.rightBox = path([[B + 1, -1], [B + 1, H + 1], [TOP + 1 / 60, H + 1], [TOP + 1/60, -1], true], { stroke: false, fill: "#f8f8f8", opacity: 0.0 }); $("#left-part").bind("mouseover vmouseout", function(event) { if (event.type === "mouseover") { graph.rightBox.animate({ opacity: 0.8 }, 50); } else { graph.rightBox.animate({ opacity: 0.0 }, 50); } } ); $("#right-part").bind("mouseover vmouseout", function(event) { if (event.type === "mouseover") { graph.leftBox.animate({ opacity: 0.8 }, 50); } else { graph.leftBox.animate({ opacity: 0.0 }, 50); } } );

\text{AREA} = \frac{1}{2} \times B \times H = (B * H) / 2

randRange(3, 9) randRange(2, 9) randFromArray([ randRange(-5, -1), randRange(B + 1, B + 5) ]) $._("base") $._("height") $._("area")

What is the area of the triangle?

init({ range: [[min(0, TOP) - 2, max(B, TOP) + 1], [-1, H + 1]], scale: 30 }); path([[0, 0], [TOP, H], [B, 0], true], {stroke: BLUE, fill: "#eee"}); label([B / 2, 0], B + "\\text{ " + UNIT + "}", "below"); if (TOP > 0) { label([TOP * 0.5, H * 0.6], round(sqrt(TOP * TOP + H * H)) + "\\text{ " + UNIT + "}", "left"); } else { label([(B + TOP) * 0.5, H * 0.6], round(sqrt((B - TOP) * (B - TOP) + H * H)) + "\\text{ " + UNIT + "}", "right"); } path([[TOP + 1/60, 0], [TOP + 1/60, H]], { stroke: BLUE, strokeWidth: 1, strokeDasharray: "- " }); label([TOP, H * 0.4], H + "\\text{ " + UNIT + "}", TOP < 0 ? "left" : "right");
(B * H) / 2 square plural_form(UNIT_TEXT)

The area of any triangle is \frac{1}{2} \text{BASE} \times \text{HEIGHT}.

The base of the triangle is B UNIT_TEXT.The base of the triangle is B plural_form(UNIT_TEXT, B). The height of the triangle is H UNIT_TEXT.The height of the triangle is H plural_form(UNIT_TEXT, H).

\text{AREA} = \frac{1}{2} \times B \times H = (B * H) / 2