Tdpack(3NCARG)
π Tdpack β the NCAR Graphics three-dee glow-up π
β¨ NAME β¨
Tdpack β a whole set of routines that lets you draw representations of three-dimensional objects. Yes bestie, actual 3D. In NCAR Graphics. We're so back. π¦
πΈ SYNOPSIS πΈ
Okay so, TDPACK β which literally stands for "Three Dimensional PACKage", the acronym ate and left no crumbs β is a collection of routines for projecting objects from a 3-dimensional coordinate system having U, V, and W axes over to a 2-dimensional projection plane having X and Y axes, and/or for drawing the projections of those objects. Loosely speaking you can call all of this "drawing objects in three dimensions". π«Ά
Tdpack consists of the following routines, and no we are not skipping any of them, every single one is a main character:
π Initialization Routines
TDINITβ Define eye position, line of sight, up direction, and the stereo flag. Basically you're telling it where the camera lives and which way is up. πTDPARAβ Define the reference parallelogram. Your whole coordinate vibe check revolves around this one.TDCLRSβ Define colors for TDPACK. Slay, but make it chromatic. π
π Parameter-Access Routines
TDGETIβ Get the integer value of an internal parameter.TDGETRβ Get the real value of an internal parameter.TDGTRSβ Get the definition of a specified rendering style.TDSETIβ Set the integer value of an internal parameter.TDSETRβ Set the real value of an internal parameter.TDSTRSβ Define a specified rendering style.
π¦ Point-Transforming Routines
TDPRPTβ Project from 3-space to the projection plane.TDPRPAβ Project from 3-space to the plane of the reference parallelogram.TDPRPIβ Project from the plane of the reference parallelogram to 3-space.
β¨ Line-Drawing Routines
TDLINEβ Draw the projection of a line in 3-space.TDLNPAβ Draw the projection of a line in the plane of the reference parallelogram.
π Grid-Drawing Routines
TDGRDSβ Draw the grids on all the faces of a box in 3-space. All of them. Every face. No crumbs.TDGRIDβ Draw the grid on a particular face of a box in 3-space. Pick your fave.
π Label-Drawing Routines
TDLBLSβ Draw labels for all faces of a box in 3-space.TDLBLAβ Draw labels for a particular face of a box in 3-space.TDPLCHβ Draw characters in the plane of the reference parallelogram.
π Surface-Drawing Routines
TDDTRIβ Draw triangles defined by a triangle list.TDSTRIβ Add triangles defining a simple surface to a triangle list.TDITRIβ Add triangles defining an isosurface to a triangle list.TDMTRIβ Add triangles defining a 3D marker to a triangle list.TDCTRIβ Order the triangles in a triangle list for proper rendering. (The organizer. The one who keeps the group chat on topic. π)TDSORTβ Cut triangles with a plane perpendicular to one of the axes.TDOTRIβ Generic sorting routine.
π» C-BINDING SYNOPSIS π»
Not me about to hand you the C glow-up. Include this:
#include <ncarg/ncargC.h>
And here's the whole c_ roster, in order, exactly as it comes:
c_tdinit
c_tdpara
c_tdclrs
c_tdgeti
c_tdgetr
c_tdgtrs
c_tdseti
c_tdsetr
c_tdstrs
c_tdprpt
c_tdprpa
c_tdprpi
c_tdline
c_tdlnpa
c_tdgrds
c_tdgrid
c_tdlbls
c_tdlbla
c_tdplch
c_tddtri
c_tdstri
c_tditri
c_tdmtri
c_tdotri
c_tdctri
c_tdsort
π₯ ACCESS π₯
To use Tdpack, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c β preferably in that order, bestie, the order is not a suggestion. π«Ά
π MESSAGES π
When error conditions get detected, the support routine SETER gets called. By default, SETER writes a message to the standard error file (as defined by I1MACH(4)) and then terminates execution β like, it does not play, it just ends you. π
Good news though: it's possible to put SETER into recovery mode and regain control after a recoverable error, and yes, that includes all of the possible errors. So everything here is recoverable in the sense that a user program which has called ENTSR to set recovery mode will get control back after one of these errors occurs. Iconic of it honestly.
The possible error messages are listed below, verbatim, no edits:
TDGETI - UNCLEARED PRIOR ERROR
TDGETR - UNCLEARED PRIOR ERROR
TDGETR - UNRECOGNIZED PARAMETER NAME
TDINIT - UNCLEARED PRIOR ERROR
TDPARA - UNCLEARED PRIOR ERROR
TDPRPA - UNCLEARED PRIOR ERROR
TDPRPI - UNCLEARED PRIOR ERROR
TDPRPT - UNCLEARED PRIOR ERROR
TDSETI - UNCLEARED PRIOR ERROR
TDSETR - UNCLEARED PRIOR ERROR
TDSETR - UNRECOGNIZED PARAMETER NAME
π SEE ALSO π
Online, go read these next, they're all linked up like a friend group:
tdclrs, tddtri, tdgeti, tdgetr, tdgrds, tdgrid, tdgtrs, tdinit, tditri, tdlbla, tdlbls, tdline, tdlnpa, tdmtri, tdotri, tdpack_params, tdpara, tdplch, tdprpa, tdprpi, tdprpt, tdseti, tdsetr, tdsort, tdstri, tdstrs
π COPYRIGHT π
Copyright (C) 1987-2009
University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.
And that's the whole page, bestie β the NCAR Graphics Tdpack(3NCARG) man page, originally from the UNIX manual, dated July 1997. Go draw some boxes in three dimensions, you've got this. πβ¨π¦
π¦ where this page comes from
- debian bookworm: libncarg-dev 6.6.2.dfsg.1-1
- debian trixie: libncarg-dev 6.6.2.dfsg.1-10+b2
- ubuntu jammy: libncarg-dev 6.6.2-10build2
- ubuntu questing: libncarg-dev 6.6.2.dfsg.1-10build2
- ubuntu resolute: libncarg-dev 6.6.2.dfsg.1-12
- ubuntu stonking: libncarg-dev 6.6.2.dfsg.1-12build2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms