var fig = new go.PathFigure(w, d, true);
    geo.add(fig);
    fig.add(new go.PathSegment(go.SegmentType.Line, w, h));
    fig.add(new go.PathSegment(go.SegmentType.Line, 0, h));
    fig.add(new go.PathSegment(go.SegmentType.Line, 0, d));
    fig.add(new go.PathSegment(go.SegmentType.Line, w / 2, 0).close());
    geo.spot1 = new go.Spot(0, 0, 0, Math.min(d, 0));
    geo.spot2 = go.Spot.BottomRight;
    return geo;
  });

  function init() {
    // initialize main Diagram
    myDiagram = new go.Diagram('myDi