CPCLTR(3NCARG)

πŸ“¦ version 6.6.2, in epel 9, fedora 43, fedora 44

πŸ’– CPCLTR β€” it's giving contour tracing, bestie πŸ’–

okay so. This is CPCLTR from the NCAR Graphics crew (manual section 3NCARG), and here's the whole vibe: it traces contour lines at whatever level you want, then hands them back to you so you can do your little user-defined processing on them. It's not doing the drawing for you, it's giving you the coordinates and saying "here bestie, you handle it." πŸ‘‘


✨ NAME ✨

CPCLTR β€” Traces the contour lines at a given level and retrieves them for some sort of user-defined processing. πŸŽ€


✨ SYNOPSIS ✨

CALL CPCLTR (ZDAT,RWRK,IWRK,CLVL,IJMP,IRW1,IRW2,NRWK)

✨ C-BINDING SYNOPSIS ✨

#include <ncarg/ncargC.h>

void c_cpcltr (float *zdat, float *rwrk, int *iwrk,
float clvl, int *ijmp, int *irw1, int *irw2, int *nrwk)

🌸 DESCRIPTION 🌸

So like. The first three arguments are arrays that were used in the last call to CPRECT, CPSPS1, or CPSPS2, and the contents of those arrays must not have been changed since that call. That's the rule. Don't touch them. πŸ™ˆ

  • ZDAT β€” (REAL array, dimensioned as specified in the last call to CPRECT, CPSPS1, or CPSPS2, input) is the data array. It's the whole point, it's the main character. 🌟
  • RWRK β€” (REAL array, dimensioned as specified in the last call to CPRECT, CPSPS1, or CPSPS2, input/output) is the real workspace array. This is where your contour coordinates are gonna land. πŸ’«
  • IWRK β€” (INTEGER array, dimensioned as specified in the last call to CPRECT, CPSPS1, or CPSPS2, input/output) is the integer workspace array.
  • CLEV β€” (REAL, input) is the desired contour level. Yes, the synopsis calls it CLVL and this description calls it CLEV β€” that's just how it is, no cap, we don't make the rules. πŸ’…
  • IJMP β€” (INTEGER, input/output) is initially set to zero by the user. Upon return from CPCLTR, it will be non-zero if coordinates of a contour line segment have been placed in RWRK; it will be zero if all contour line segments at the given level have been generated. So it's basically the "are we done yet" flag. 🚦
  • IRW1 β€” (INTEGER, <orange>output</orange>) is a pointer to the place in RWRK where X coordinates have been stored. They will be in RWRK(IRW1+I) for I = 1, 2, ..., NRWK.
  • IRW2 β€” (INTEGER, <orange>output</orange>) is a pointer to the place in RWRK where Y coordinates have been stored. They will be in RWRK(IRW2+I) for I = 1, 2, ..., NRWK.
  • NRWK β€” (INTEGER, <orange>output</orange>) is the number of points on the contour line segment. The points comprising the segment will be (RWRK(IRW1+I),RWRK(IRW2+I)) for I = 1, 2, ... NRWK.

πŸ¦‹ C-BINDING DESCRIPTION πŸ¦‹

The C-binding argument descriptions are the same as the FORTRAN argument descriptions. Same energy, different syntax. ✨


πŸ’… USAGE πŸ’…

You can call CPCLTR at any time after the initialization call to CPRECT, CPSPS1, or CPSPS2. It's called using code like the following:

      IJMP=0
  101 CALL CPCLTR (ZDAT,RWRK,IWRK,CLEV,IJMP,IRW1,IRW2,NRWK)
      IF (IJMP.NE.0) THEN
       (PROCESS SEGMENT OF CONTOUR LINE FROM RWRK)
       GO TO 101
      END IF

CPCLTR is called repeatedly. Initially, IJMP is zeroed. Upon each return from CPCLTR, if the value of IJMP is non-zero, X and Y coordinates have been placed in the real workspace array RWRK and the values of IRW1, IRW2, and NRWK have been set to indicate where the coordinates were put. After the coordinates have been processed, CPCLTR is called again. If, upon return from CPCLTR, the value of IJMP is zero, all contour lines at the specified level have been processed. πŸŽ‰

Pro tip from the group chat: if the parameter 'T2D' has a non-zero value, the contour lines are smoothed, using cubic splines under tension. Yes bestie, tension. It's giving ✨aesthetic✨. 🧚

🌈 ACCESS 🌈

To use CPCLTR or c_cpcltr, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c, preferably in that order. Order matters, don't be chaotic about it. πŸ‘‘


πŸŽ€ MESSAGES πŸŽ€

See the conpack man page for a description of all Conpack error messages and/or informational messages. That's where the lore lives. πŸ“š


🌟 SEE ALSO 🌟

Online: conpack, cpback, cpchcf, cpchcl, cpchhl, cpchil, cpchll, cpcica, cpclam, cpcldm, cpcldr, cpcnrc, cpdrpl, cpezct, cpgetc, cpgeti, cpgetr, cplbam, cplbdr, cpmpxy, cpmviw, cpmvrw, cppkcl, cppklb, cprect, cprset, cpscae, cpsetc, cpseti, cpsetr, cpsps1, cpsps2, ncarg_cbind

The whole friend group, fr fr. 🫢


Copyright (C) 1987-2009
University Corporation for Atmospheric Research

The use of this Software is governed by a License Agreement.

okay that's the whole page, no notes, you ate that. πŸ’…βœ¨

CPCLTR(3NCARG) β€” UNIX β€” March 1993 πŸ’– sending you the biggest forehead kiss, now go trace some contours bestie πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from