/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; const P LdY(0, 4); const P LdX(4, 0); const P ptB(cis(M_PI/3)); const P ptC(cis(2*M_PI/3)); std::string sfmt(const std::string& msg) { #ifdef SANSSERIF return "$\\mathsf{"+msg+"}$"; #else return "$"+msg+"$"; #endif } int main() { picture(P(-1,-0.5), P(1.25,1), "4 x 2.666in"); begin(); quad(P(1,0), ptB, ptC, P(-1,0)); arc(P(0,0), 1, 0, M_PI); pen(2); line(P(0,0), P(1,0)); arc(P(0,0), 1, 0, M_PI/3); arc(P(0.5,0), 0.5, -M_PI, 0); arc(0.5*(P(1,0) + ptB), 0.5, -M_PI/3, 2*M_PI/3); label(P(-1, 0), -LdY, sfmt("D"), b); label(P( 1, 0), 0.5*(LdX-LdY), sfmt("A"), br); label(P( 0, 0), -LdX-LdY, sfmt("O"), bl); label(ptB, LdY, sfmt("B"), t); label(ptC, 0.5*(-LdX+LdY), sfmt("C"), t); label(cis(M_PI/6), 0.5*(LdX+LdY), sfmt("F"), tr); label(polar(0.5*(1+sqrt(3)), M_PI/6), 0.5*(LdX+LdY), sfmt("E"), tr); tikz_format(); end(); }