/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; const P LdY(0, 4); const P LdX(4, 0); std::string sfmt(const std::string& msg) { #ifdef SANSSERIF return "$\\mathsf{"+msg+"}$"; #else return "$"+msg+"$"; #endif } P ptA(3, 1), ptB(0, 0), ptC(3, 0), ptD(3 - Tan(0.5*Atan(3))); int main() { picture(P(0, 0), P(3, 1), "3.75 x 1.25in"); begin(); triangle(ptA, ptB, ptC); line_style("- - - "); line(ptA, ptD); label(ptA, LdY, sfmt("A"), t); label(ptB, -LdY, sfmt("B"), b); label(ptC, -LdY, sfmt("C"), b); label(ptD, -LdY, sfmt("D"), b); tikz_format(); end(); }