c_ftkurv(3NCARG)

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

✨ c_ftkurv β€” interpolation for parametric curves ✨

okay bestie, welcome to the c_ftkurv page from the 3NCARG manual πŸ’– this one's a little C function that draws you a smooth lil curve through a bunch of points, and honestly? it eats. let's get into it πŸ¦‹


🌸 FUNCTION PROTOTYPE 🌸

int c_ftkurv (int, float [], float [], int, float [], float [], float []);

like, yes, it's a lot of brackets. breathe. we'll get there πŸ’…


🌈 SYNOPSIS 🌈

int c_ftkurv (n, xi, yi, m, t, xo, yo);

πŸ‘‘ DESCRIPTION πŸ‘‘

  • n β€” the number of input data values. heads up: it has to be n > 1, no solo points allowed bestie πŸ™ˆ
  • xi β€” an array holding the abscissae for the input function.
  • yi β€” an array holding the functional values, where y[k] is the functional value at x[k] for k=0,n-1.
  • m β€” how many interpolated values you want. your wish is its command ✨
  • t β€” contains an array of values for the parameter mapping onto the interpolated curve.
  • xo β€” an array holding the X values for the interpolated points. t[k] maps to (xo[k],yo[k]) for k=0,m-1.
  • yo β€” an array holding the Y values for the interpolated points. t[k] maps to (xo[k],yo[k]) for k=0,m-1.

πŸ’€ RETURN VALUE πŸ’€

c_ftkurv hands you back an error value, like so:

  • = 0 β€” no error. we love a clean run 🫢
  • = 1 β€” if n is less than 2.
  • = 2 β€” if adjacent coordinate pairs coincide. (aka two points sitting on top of each other. not the vibe 😭)

πŸŽ€ USAGE πŸŽ€

This function calculates an interpolatory spline under tension through a sequence of points in the plane. yes, under tension β€” it's giving dramatic, it's giving main character energy πŸ”₯

Given a sequence of input points ( (x[0],y[0]), ... , (x[n-1],y[n-1]), the interpolated curve is parameterized by mapping points in the interval [0.,1.] onto the interpolated curve. The resulting curve has a parametric representation both of whose components are splines under tension and functions of the polygonal arc length. The value 0. is mapped onto (x[0],y[0]) and the value 1. is mapped onto (x[n-1],y[n-1]).

c_ftkurv is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetc. The control parameters that apply to c_ftkurv are: sig, sl1, sln, sf1. iykyk πŸ’…

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 50) result in nearly a polygonal line. A typical value is 1. (the default).

The value for parameter sl1 is in radians and contains the slope at (x[0],y[0]). The angle is measured counter-clockwise from the X axis and the positive sense of the curve is assumed to be that moving from point 0 to point n-1. A value for sl1 may be omitted as indicated by the switch sf1.

The value for parameter sln is in radians and contains the slope at (x[n-1],y[n-1]). The angle is measured counter-clockwise from the X axis and the positive sense of the curve is assumed to be that moving from point 0 to point n-1. A value for sln may be omitted as indicated by the switch sf1.

The value of sf1 controls whether to use the values for sl1 and sln, or compute those values internally. Specifically, sf1:

  • = 0 if sl1 and sln are user-specified.
  • = 1 if sl1 is user-specified, but sln is internally calculated.
  • = 2 if sln is user-specified, but sl1 is internally calculated.
  • = 3 if sl1 and sln are internally calculated.

πŸ¦‹ ACCESS πŸ¦‹

To use c_ftkurv, load the NCAR Graphics library ngmath. that's the whole assignment bestie 🫢


⭐ SEE ALSO ⭐

  • fitgrid_params
  • c_ftseti
  • c_ftsetr
  • c_ftsetc

Complete documentation for Fitgrid is available at URL http://ngwww.ucar.edu/ngdoc/ng/ngmath/fitgrid/fithome.html


Copyright (C) 2000 University Corporation for Atmospheric Research

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


and that's the whole page, bestie πŸŽ€ this was the c_ftkurv(3NCARG) entry, straight outta the UNIX manual, dated March 1998 ✨ go forth and interpolate, you absolute icon πŸ‘‘πŸ’–

πŸ“¦ where this page comes from