PLW3D(3plplot)
π PLW3D β like, the 3D projection setup bestie
Hey hi hello, welcome to the PLplot API docs, this one's PLW3D(3plplot) and it's the glow-up your flat little 2D window has been waiting for β¨
πΈ NAME πΈ
plw3d β sets up all the transformations you need to project a 3D surface onto a 2D window. That's it, that's the whole vibe π
π¦ SYNOPSIS π¦
plw3d(basex, basey, height, xmin, xmax, ymin, ymax, zmin, zmax, alt, az)
π DESCRIPTION π
Okay so bestie, listen π β this configures the transformations required for projecting a 3D surface onto an existing 2D window. Those transformations (see the PLplot documentation, she's thorough) get done to a rectangular cuboid that encloses the 3D surface. That cuboid has its limits expressed in 3D world coordinates and also in normalized 3D coordinates (normalized ones are what get used for interpreting the altitude and azimuth of the viewing angle). π«Ά
The transformations themselves are two things, no cap:
- the linear transform from 3D world coordinates to normalized 3D coordinates, and
- the 3D rotation of normalized coordinates that's required to align the pole of the new 3D coordinate system with the viewing direction specified by altitude and azimuth β so that x and y of the surface elements in that transformed coordinate system are literally the projection of the 3D surface with the given viewing direction on the 2D window. π
The enclosing rectangular cuboid for the surface plot is defined by xmin, xmax, ymin, ymax, zmin and zmax in 3D world coordinates. It gets mapped into the same rectangular cuboid with normalized 3D coordinate sizes of basex by basey by height, like so:
xminmaps to-basex/2xmaxmaps tobasex/2yminmaps to-basey/2ymaxmaps tobasey/2zminmaps to0zmaxmaps toheight
The resulting rectangular cuboid in normalized coordinates is then viewed by an observer at altitude alt and azimuth az. π§
β οΈ Important, fr fr: this routine must be called beforeplbox3(3plplot)or any of the 3D surface plotting routines β that'splmesh(3plplot),plmeshc(3plplot),plot3d(3plplot),plot3dc(3plplot),plot3dcl(3plplot),plsurf3d(3plplot),plsurf3dl(3plplot)orplfill3(3plplot). Don't skip the setup step, it's giving chaos otherwise π
Redacted form: plw3d(basex, basey, height, xmin, xmax, ymin, ymax, zmin, zmax, alt, az)
This function is examples 8, 11, 18, and 21. iconic β
β¨ ARGUMENTS β¨
basex(PLFLT(3plplot), input) β the normalized x coordinate size of the rectangular cuboid.basey(PLFLT(3plplot), input) β the normalized y coordinate size of the rectangular cuboid.height(PLFLT(3plplot), input) β the normalized z coordinate size of the rectangular cuboid.xmin(PLFLT(3plplot), input) β the minimum x world coordinate of the rectangular cuboid.xmax(PLFLT(3plplot), input) β the maximum x world coordinate of the rectangular cuboid.ymin(PLFLT(3plplot), input) β the minimum y world coordinate of the rectangular cuboid.ymax(PLFLT(3plplot), input) β the maximum y world coordinate of the rectangular cuboid.zmin(PLFLT(3plplot), input) β the minimum z world coordinate of the rectangular cuboid.zmax(PLFLT(3plplot), input) β the maximum z world coordinate of the rectangular cuboid.alt(PLFLT(3plplot), input) β the viewing altitude, in degrees, above the xy plane of the rectangular cuboid in normalized coordinates.az(PLFLT(3plplot), input) β the viewing azimuth, in degrees, of the rectangular cuboid in normalized coordinates. Whenaz=0, the observer is looking face onto the zx plane of the rectangular cuboid in normalized coordinates, and asazis increased, the observer moves clockwise around that cuboid when viewed from above the xy plane. π₯
π AUTHORS π
Many developers (who are credited at http://plplot.sourceforge.net/credits.php) have contributed to PLplot over its long history. shoutout to the whole group chat π
π SEE ALSO π
PLplot documentation at http://plplot.sourceforge.net/documentation.php.
that's the whole page bestie, go project some surfaces π
β¨ β this one's from the source/version PLplot API, dated August, 2026, page PLW3D(3plplot), and it ate, no crumbs ππ
π¦ 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