| The PLplot Plotting Library: Programmer's Reference Manual | ||
|---|---|---|
| Prev | Chapter 16. The Common API for PLplot | Next | 
plpoly3: Draw a polygon in 3 space
      Draws a polygon in 3 space defined by n
      points in
      x,
      y, and
      z.
      Setup like plline3, but differs from that function in that plpoly3
      attempts to determine if the polygon is viewable depending on the
      order of the points within the arrays and the value of
      ifcc.  If the back of
      polygon is facing the viewer, then it isn't drawn.  If this isn't what
      you want, then use plline3 instead.
    
The points are assumed to be in a plane, and the directionality of the plane is determined from the first three points. Additional points do not have to lie on the plane defined by the first three, but if they do not, then the determination of visibility obviously can't be 100% accurate... So if you're 3 space polygons are too far from planar, consider breaking them into smaller polygons. "3 points define a plane" :-).
Bugs: If one of the first two segments is of zero length, or if they are colinear, the calculation of visibility has a 50/50 chance of being correct. Avoid such situations :-). See x18c.c for an example of this problem. (Search for "20.1").
| 
 |