| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
2.8.4 Pipe sample
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;
}
This document was generated on April 13, 2012 using texi2html 5.0.
