c_csstri(3NCARG)

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

πŸ’« c_csstri β€” it's giving Delaunay triangulation, but make it a sphere ✨

okay bestie, welcome to the NCAR GRAPHICS corner of the manual, where the function is literally called c_csstri and its whole entire job is: calculate a Delaunay triangulation for data on a sphere. no cap. that's the vibe. 🌍


πŸŽ€ FUNCTION PROTOTYPE

int *c_csstri(int, float [], float [], int *, int *);

🌸 SYNOPSIS

int *c_csstri(n, rlat, rlon, nt, ier);

✨ DESCRIPTION

here's the cast of characters, and yes you need to know all of them:

  • n β€” the number of input data points, and it has to be n > 2. three's company, two's just a line, bestie. πŸ’…
  • rlat β€” an array holding the latitudes of your input data, expressed in degrees. 🫢 important: the first three points must not be collinear (i.e. they can't all lie on one common great circle). if they do... that's not the slay you think it is.
  • rlon β€” an array holding the longitudes of your input data, also in degrees. πŸ¦‹
  • nt β€” *nt is the number of triangles in the triangulation. UNLESS *ier comes back non-zero, in which case *nt = 0. and if nb is the number of boundary points on the convex hull of the data, then: if nb is greater than 3, *nt = 2n-nb-2; otherwise *nt = 2n-4. also, the input data are considered to be bounded if they all lie in one hemisphere. 🌈
  • ier β€” the error return value, our little drama detector. if *ier comes back as 0, then no errors were detected, iconic, flawless. if *ier is non-zero, then go refer to the error list in cssgrid_errors for the details. 😭

πŸ’œ USAGE

c_csstri gets called when you wanna find a Delaunay triangulation of data that's randomly positioned on the surface of a sphere. that's the whole assignment. main character energy fr fr. πŸ‘‘

⭐ RETURN VALUE

c_csstri returns a pointer to a linear array that contains a sequence of integer triples. each element of a triple is an index of a vertex of a triangle. every index references an original data point as it occurs in sequence in the input data set β€” and heads up, numbering starts at 0. πŸ“

so like, if the triple <5,0,2> were in the list of triples, then (rlat[5],rlon[5]), (rlat[0],rlon[0]), and (rlat[2],rlon[2]) would be vertices of a triangle in the Delaunay triangulation. see how that works? ate. πŸ’–

🧚 ACCESS

to use c_csstri, load the NCAR Graphics library ngmath. that's it, that's the whole step. ✨

πŸ”₯ SEE ALSO

  • css_overview
  • c_cssgrid
  • cssgrid_errors

and also, complete documentation for Cssgrid lives at this URL, go read it when you're done here:

http://ngwww.ucar.edu/ngdoc/ng/ngmath/cssgrid/cssgridhome.html


Copyright (C) 2000 University Corporation for Atmospheric Research

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


ngl the licensing line is the one part you should actually read with your whole chest, not just skim. πŸ“œ

okay that's the whole page, you're officially a sphere-triangulation girlie now 🌸

this was c_csstri(3NCARG) from the NCAR GRAPHICS manual, UNIX flavour, dated May 2000 β€” mwah, take care of her πŸ’…πŸ«Ά

πŸ“¦ where this page comes from