PLPOLY3(3plplot)
π PLPOLY3 β plplot API, bestie edition β¨
Okay so this is plpoly3 from the PLplot API, and it's literally about to make your 3-space polygons look chef's kiss. Stay with me π
πΈ NAME πΈ
plpoly3 β draws a polygon in 3 space π¦ (yes, in three dimensions, she's fancy like that)
β¨ SYNOPSIS β¨
plpoly3(n, x, y, z, draw, ifcc)
π DESCRIPTION π
So what she does is: she draws a polygon in 3 space, and that polygon is defined by n points living in x, y, and z. Setup is literally the same as plline3(3plplot), but here's the glow-up β plpoly3(3plplot) attempts to determine if the polygon is viewable, and it does that based on the order of the points within the vector plus the value of ifcc. If the back of the polygon is facing the viewer, then it isn't drawn, periodt. And if that's not the vibe you want? Then use plline3(3plplot) instead, easy π«Ά
Now, the points are assumed to be in a plane, and the directionality of that plane gets determined from the first three points. Additional points do not have to lie on the plane defined by the first three β but if they don't, then the determination of visibility obviously can't be 100% accurate... π So if your 3 space polygons are too far from planar, consider breaking them into smaller polygons, bestie. 3 points define a plane :-). That's just math, iykyk.
Bugs: π If one of the first two segments is of zero length, or if they are co-linear, the calculation of visibility has a 50/50 chance of being correct. Avoid such situations :-). Seex18c.cfor an example of this problem. (Search for20.1). Not me warning you twice π
Also, the redacted form is plpoly3(x, y, z, code) β iconic shorthand, love that for us.
This function is used in example 18 π
π ARGUMENTS π
n(PLINT(3plplot), input) β number of points defining line.x(PLFLT_VECTOR(3plplot), input) β a vector containingnx coordinates of points.y(PLFLT_VECTOR(3plplot), input) β a vector containingny coordinates of points.z(PLFLT_VECTOR(3plplot), input) β a vector containingnz coordinates of points.draw(PLBOOL_VECTOR(3plplot), input) β a vector containingn-1Boolean values which control drawing the segments of the polygon. Ifdraw[i]is true, then the polygon segment from index[i]to[i+1]is drawn, otherwise, not. Lowkey the most useful little switch ever βifcc(PLBOOL(3plplot), input) β ififccis true the directionality of the polygon is determined by assuming the points are laid out in a counter-clockwise order. Otherwise, the directionality of the polygon is determined by assuming the points are laid out in a clockwise order. Pick your fighter π₯
π AUTHORS π
Many developers (who are credited at http://plplot.sourceforge.net/credits.php) have contributed to PLplot over its long history. Genuinely so many icons, we stan π«Άπ
β SEE ALSO β
PLplot documentation at http://plplot.sourceforge.net/documentation.php.
That's the whole page, bestie β no notes, she ate π β¨
August, 2026 π came through with this one, and it's all PLplot API energy β PLPOLY3(3plplot) forever, no cap π
π¦ where this page comes from
- ubuntu stonking: plplot-doc 5.15.0+dfsg3-4 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms