Previous: Querying Regular Polygons, Up: Regular Polygon Reference


28.5 Circles

const function: Circle in_circle (void)

Returns the enclosed Circle of the Reg_Polygon.

          Point P(0, -1, 1);
          Reg_Polygon h(P, 6, 4, 15, 12, 11.5);
          h.filldraw(black, gray);
          Circle c = h.in_circle();
          c.unfilldraw(black);


[Figure 147. Not displayed.]

Fig. 147.

const function: Circle draw_in_circle ([const Color& ddraw_color = *Colors::default_color, [const string ddashed = "", [const string] ppen = "", [Picture& picture = current_picture]]])
const function: Circle draw_in_circle ([Picture& picture = current_picture, [const Color& ddraw_color = *Colors::default_color, [const string ddashed = "", [const string] ppen = ""]]])

Draws and returns the enclosed Circle of the Reg_Polygon.

          Point P(0, 1, 1);
          Reg_Polygon h(P, 7, 4, 80, 2, 5);
          h.draw(black, "evenly");
          h.draw_in_circle();


[Figure 148. Not displayed.]

Fig. 148.

const function: Circle out_circle (void)

Returns the surrounding Circle of the Reg_Polygon.

          Point P(0, -1, 1);
          Reg_Polygon h(P, 6, 4, 15, 12, 11.5);
          Circle c = h.out_circle();
          c.filldraw(black, gray);
          h.unfilldraw(black);


[Figure 149. Not displayed.]

Fig. 149.

const function: Circle draw_out_circle ([const Color& ddraw_color = *Colors::default_color, [const string ddashed = "", [const string] ppen = "", [Picture& picture = current_picture]]])
const function: Circle draw_out_circle ([Picture& picture = current_picture, [const Color& ddraw_color = *Colors::default_color, [const string ddashed = "", [const string] ppen = ""]]])

Draws and returns the surrounding Circle of the Reg_Polygon.

          Point P(0, 1, 1);
          Reg_Polygon h(P, 7, 4, 80, 2, 5);
          h.draw(black, "evenly");
          h.draw_out_circle();


[Figure 150. Not displayed.]

Fig. 150.