Function:s2rectxz
From S2PLOT
(Difference between revisions)
Revision as of 07:25, 27 October 2007 S2plot admin (Talk | contribs) ← Previous diff |
Current revision S2plot admin (Talk | contribs) |
Current revision
s2rectxz
Draw a rectangle in the xz plane at a given y coordinate.
Prototype
void s2rectxz(float xmin, float xmax, float zmin, float zmax, float y);
Description
Draw a rectangle in the xz plane, at a given y coordinate. The rectangle is a filled quadrangle. The edge of the rectangle is NOT drawn. Use s2line if you need a border to your rectangle/s.
See Also
s2rectxy | Draw a rectangle in the xy plane at a given z coordinate. |
s2rectyz | Draw a rectangle in the yz plane at a given x coordinate. |
s2line | Draw a poly line, n vertices at (xpts, ypts, zpts). |
PGPLOT Equivalent
Code Example
#include <stdio.h>
#include <stdlib.h>
#include "s2plot.h"
int main(int argc, char *argv[])
{
float x1 = -0.5, x2 = +0.5; /* Rectangle coordinates */
float y1 = -0.2, y2 = +0.2;
float z1 = -0.3, z2 = +0.3;
s2opend("/?",argc, argv); /* Open the display */
s2swin(-1.,1., -1.,1., -1.,1.); /* Set the window coordinates */
s2box("BCDET",0,0,"BCDET",0,0,"BCDET",0,0); /* Draw coordinate box */
s2sci(S2_PG_YELLOW);
s2rectxz(x1,x2, z1,z2, y1); /* Rectangle in x-z plane */
s2sci(S2_PG_GREEN);
s2rectxz(x1,x2, z1,z2, y2); /* Rectangle in x-z plane */
s2show(1); /* Open the s2plot window */
return 1;
}
Back to S2PLOT function list.