GenerateRandomSearch

Random Triangle Generator

Three random points are usually a bad triangle. They are often nearly collinear, which gives a sliver with a 178-degree angle that is useless to look at and numerically awkward besides — Heron's formula on its rounded sides can collapse to zero. This generator rejects anything with an angle under fifteen degrees, and computes the sides from the coordinates and the angles from the cosine rule rather than from whatever construction produced the shape.

What this generator does

Produces a triangle as three coordinates, then derives everything else from them: the three side lengths, the three interior angles by the cosine rule, the area by the shoelace formula, and a classification both by sides and by angles.

How to use this tool

  1. Choose whether you want any triangle, a right-angled one, or an isosceles one.
  2. Generate, and read the sides, angles, area and classification.
  3. Copy the coordinates if you need them elsewhere.
  4. Seed the triangle if you want the same one again.

Understanding the controls

Shape
Any triangle draws three free points. Right-angled puts the legs on the axes so the right angle is exact, and isosceles puts the apex on the perpendicular bisector so two sides match exactly.
Seed
Reproduces the same triangle exactly, which is what makes it usable as a fixture.

Common use cases

  • Worked examples where the angles and the area are already known
  • Test data for anything that consumes triangle geometry
  • Showing the two classifications — by sides and by angles — on the same shape
  • Producing a right-angled triangle whose right angle is exact rather than approximate
  • Reproducing a specific triangle from a seed

How this generator works

Whatever the construction, the triangle is redrawn until its smallest angle is at least fifteen degrees. The check then confirms the triangle inequality holds, that the angles sum to 180, and that Heron's formula on the displayed sides agrees with the shoelace area — two independent routes to the same number.

Randomness and fairness

The coordinates are random within the chosen shape; the measurements are derived. Seeded triangles reproduce exactly and are therefore explicitly not cryptographically secure, and unseeded ones use the browser's cryptographically secure generator.

For how randomness is produced across the whole site, see how Generate Random works.

Limitations and good to know

  • Equilateral triangles cannot be produced exactly, because a triangle with three equal sides has no representation in whole coordinates.
  • Coordinates are whole numbers, so the sides are almost always irrational and are shown rounded.
  • Angles below fifteen degrees are rejected, so the very obtuse cases never appear.
  • The shape is drawn to scale but without axes or a grid.
  • Triangles are not kept between visits.

Privacy and your data

Coordinates and measurements are generated in your browser and never transmitted. Nothing persists after the visit.