drawTriangle(ctx, centerX, centerY, side, angle) {
    const ctrToVertex = side / 2 / Math.cos(30 / 180 * Math.PI);
    ctx.fillStyle = generateRandomColorStyle();
    ctx.beginPath();

    const alpha1 = angle + Math.PI / 2;
    const x1 = centerX + Math.cos(alpha1) * ctrToVertex;
    const y1 = centerY + Math.sin(alpha1) * ctrToVertex;
    const alpha2 = alpha1 + Math.PI / 3 * 2;
    const x2 = centerX + Math.cos(alpha2) * ctrToVertex;
    const y2 = centerY + Math.sin(alpha2) * ctrToVertex;
    const alpha3 = alpha2 + Math.PI / 3 * 2;
    const x3 = centerX + Math.cos(alpha3) * ctrToVertex;
    const y3 = centerY + Math.sin(alpha3) * ctrToVertex;

    ctx.moveTo(x1, y1);
    ctx.lineTo(x2, y2);
    ctx.lineTo(x3, y3);

    const xs = [x1, x2, x3];
    const ys = [y1, y2, y3];
    return [Math.min(...xs), Math.max(...xs), Math.min(...ys), Math.max(...ys)];
  }
Draw an equilateral triangle.

A triangle are a target object in the simple object detection task here.
Therefore, its bounding box is returned.

@param {} ctx  Canvas context.
@param {number} centerX Center x-coordinate of the triangle.
@param {number} centerY Center y-coordinate of the triangle.
@param {number} side Length of the side.
@param {number} angle Angle that the triangle is rotated for, in radians.
@returns {[number, number, number, number]} Bounding the triangle, with
  the rotation taken into account: [left, right, top bottom].