/* -*-ePiX-*- */ #include "epix.h" #include "tolman.h" using namespace ePiX; double rad(0.1); void particle(const P& loc, double sgn) { P utip(loc - P(3*sgn*rad,0)), vtip(loc - P(0,sgn*0.75)); bold(); circle(loc, rad); arrow(loc - P(3*sgn, 0), utip); arrow(loc - P(0, 2*sgn*rad), vtip); if (sgn < 0) { label(vtip, P(4,2*sgn), "$-v$", r); label(loc - P(1.5*sgn,0), P(0,-2), "$-u$", b); } else { label(vtip, P(4,2*sgn), "$+v$", r); label(loc - P(1.5*sgn,0), P(0, 2), "$+u$", t); } } int main() { picture(P(-3,-1), P(3,1), "3 x 1in"); begin(); arrow_init(); particle(P(-0.75, 0.5), 1); particle(P( 0.75, -0.5), -1); font_face("sc"); label(P(0.5*(xmin() + xmax()),ymin()), "Fig.~11."); tikz_format(); end(); }