/* -*-ePiX-*- */ #include "epix.h" using namespace ePiX; int main() { bounding_box(P(-1,-1),P(1,1)); unitlength("1in"); picture(6,6); begin(); red(0.6); grid(4,4); // produces points with coord "exactly" +/-0.5 data_file test(Cos, Sin, 0, 2*M_PI, 180); data_file copy(test); // mark all points green(0.6); dot_size(6); test.plot(BOX); // should keep points with y=-0.5, discard y=0.5 dot_size(); data_mask DM("[-0.5, 0.5)"); test.prune(DM, 2); // act on column 2 // pruned points; keeps y=0.5, discards y=-0.5... blue(); test.plot(BBOX); // "reverse-pruned" points copy.prune(DM.reverse(), 2); yellow(); copy.plot(BBOX); end(); }