Programming and Graphics

(Kiana) #1

240 Introduction to C++ Programming and Graphics


file2 >> zunit;
color (lbc);
move (xmin-3*csizex, ymin-1.5*ymargin, zgo);
drawstr(zunit);
color (axc);
}

}// end of ticks

//--- Plot titles:

color (CYAN);
font ("/tmp/hfonts/futura.m");
textsize (0.8*xmargin,0.8*ymargin);
move (xmin+0.3*xrange,ymax+0.8*ymargin,zmin);
drawstr(title1);
textsize (0.6*xmargin,0.6*ymargin);
move (xmin+0.3*xrange,ymax+0.4*ymargin,zmin);
drawstr(title2);
textsize (0.5*xmargin,0.5*ymargin);
move (xmin+0.3*xrange,ymax+0.0*ymargin,zmin);
drawstr(title3);

}// end of axes

/*----------------
Draw nc curves
----------------*/

color (lnc);

for(int i=1;i<=nc;i++) // over curves
{
move (xd[i][1],yd[i][1],zd[i][1]);
for(int j=2;j<=np[i];j++)
{
draw (xd[i][j],yd[i][j],zd[i][j]);
}
}// over curves

if(Iswap==1) // for animation
{
swapbuffers();
}

//--- Done

return;
}
Free download pdf