1PLPOLY3(3plplot) PLplot API PLPOLY3(3plplot)
2
3
4
6 plpoly3 - Draw a polygon in 3 space
7
9 plpoly3(n, x, y, z, draw, ifcc)
10
12 Draws a polygon in 3 space defined by n points in x, y, and z. Setup
13 like plline3(3plplot), but differs from that function in that
14 plpoly3(3plplot) attempts to determine if the polygon is viewable de‐
15 pending on the order of the points within the vector and the value of
16 ifcc. If the back of polygon is facing the viewer, then it isn't
17 drawn. If this isn't what you want, then use plline3(3plplot) instead.
18
19 The points are assumed to be in a plane, and the directionality of the
20 plane is determined from the first three points. Additional points do
21 not have to lie on the plane defined by the first three, but if they do
22 not, then the determination of visibility obviously can't be 100% accu‐
23 rate... So if you're 3 space polygons are too far from planar, consider
24 breaking them into smaller polygons. 3 points define a plane :-).
25
26 Bugs: If one of the first two segments is of zero length, or if they
27 are co-linear, the calculation of visibility has a 50/50 chance of be‐
28 ing correct. Avoid such situations :-). See x18c.c for an example of
29 this problem. (Search for 20.1).
30
31 Redacted form: plpoly3(x, y, z, code)
32
33 This function is used in example 18.
34
36 n (PLINT(3plplot), input)
37 Number of points defining line.
38
39 x (PLFLT_VECTOR(3plplot), input)
40 A vector containing n x coordinates of points.
41
42 y (PLFLT_VECTOR(3plplot), input)
43 A vector containing n y coordinates of points.
44
45 z (PLFLT_VECTOR(3plplot), input)
46 A vector containing n z coordinates of points.
47
48 draw (PLBOOL_VECTOR(3plplot), input)
49 A vector containing n-1 Boolean values which control drawing the
50 segments of the polygon. If draw[i] is true, then the polygon
51 segment from index [i] to [i+1] is drawn, otherwise, not.
52
53 ifcc (PLBOOL(3plplot), input)
54 If ifcc is true the directionality of the polygon is determined
55 by assuming the points are laid out in a counter-clockwise or‐
56 der. Otherwise, the directionality of the polygon is determined
57 by assuming the points are laid out in a clockwise order.
58
59
61 Many developers (who are credited at http://plplot.org/credits.php)
62 have contributed to PLplot over its long history.
63
65 PLplot documentation at http://plplot.org/documentation.php.
66
67
68
69 January, 2021 PLPOLY3(3plplot)