manpagez: man pages & more
info mathgl_en
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.8.5 Pipe sample

Function pipe is similar to flow but draw pipes (tubes) which radius is proportional to the amplitude of vector field. Pipe use color scheme for coloring (see Color scheme). At this warm color corresponds to normal flow (like attractor), cold one corresponds to inverse flow (like source). The sample code is:

int sample(mglGraph *gr)
{
  mglData a,b;  mgls_prepare2v(&a,&b);
  gr->SubPlot(2,2,0,""); gr->Title("Pipe plot (default)");
  gr->Light(true);  gr->Box();  gr->Pipe(a,b);

  gr->SubPlot(2,2,1,"");  gr->Title("'i' style");
  gr->Box();  gr->Pipe(a,b,"i");

  gr->SubPlot(2,2,2,"");  gr->Title("'\\#' style");
  gr->Box();  gr->Pipe(a,b,"#");

  mglData ex,ey,ez; mgls_prepare3v(&ex,&ey,&ez);
  gr->SubPlot(2,2,3); gr->Title("3d variant");  gr->Rotate(50,60);
  gr->Box();  gr->Pipe(ex,ey,ez,"",0.1);
  return 0;
}
Example of Pipe()

This document was generated on March 21, 2014 using texi2html 5.0.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.