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 :-). See x18c.c for an example of this problem. (Search for 20.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 containing n x coordinates of points.
  • y (PLFLT_VECTOR(3plplot), input) β€” a vector containing n y coordinates of points.
  • z (PLFLT_VECTOR(3plplot), input) β€” a vector containing n z coordinates of points.
  • draw (PLBOOL_VECTOR(3plplot), input) β€” a vector containing n-1 Boolean values which control drawing the segments of the polygon. If draw[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) β€” if ifcc is 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