LINE3(3NCARG)

✨ NAME ✨

LINE3 β€” okay so bestie, this one draws the straight-line segment joining the projections of two points in 3-space. That's it, that's the whole job, and it does it gorgeously πŸ’…

This page lives in the NCAR Graphics manual (section 3NCARG), so you know it's the real deal πŸŽ€


🌸 SYNOPSIS 🌸

CALL LINE3 (UA,VA,WA,UB,VB,WB)

πŸ’– C-BINDING SYNOPSIS πŸ’–

#include <ncarg/ncargC.h>

void c_line3 (float ua, float va, float wa, float ub,
float vb, float wb)

πŸ¦‹ DESCRIPTION πŸ¦‹

  • UA,VA,WA β€” input expressions of type REAL, and they're the coordinates of the first point in 3-space. Your starting point, your origin story, your main character introduction ✨
  • UB,VB,WB β€” input expressions of type REAL, and they're the coordinates of the second point in 3-space. The destination, the glow-up, the arrival πŸ’«

Now for the tea β˜•: the statement

CALL LINE3 (UA,VA,WA,UB,VB,WB)

is literally equivalent to these three statements:

CALL FRST3 (UA,VA,WA)
CALL VECT3 (UB,VB,,WB)
CALL PLOTIF (0.,0.,2)

…but it's slightly more efficient. Not me telling you there's a shortcut that just slaps πŸ”₯

BUT WAIT β€” if you're trying to approximate a curve defined by three or more points, using LINE3 is not efficient, bestie, I'm so serious 😭 Because the first point of each line segment after the first is just a repeat of the second point of the previous line segment, so it gets repeated in the metafile. Redundant. Wasted. Not the vibe. So to approximate a curve, use FRST3 and VECT3 or CURVE3 instead. Periodt. πŸ’…

Straight-line segments drawn by LINE3 are drawn in the current polyline color, as determined by the last call to the GKS routine GSPLCI β€” and by default, color index 1 is used 🎨

Line width is determined by the last call to the GKS routine GSLWSC β€” and by default, the line width scale factor is 1 πŸ“


πŸŽ€ C-BINDING DESCRIPTION πŸŽ€

The C-binding argument descriptions are the same as the FORTRAN argument descriptions. Same energy, different language, no notes πŸ’œ


🌈 EXAMPLES 🌈

Use the ncargex command to see the following relevant examples: tpwrzt, fthex02. Go look at them, they ate πŸ‘‘


⭐ ACCESS ⭐

To use LINE3 or c_line3, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c β€” preferably in that order. Order matters, iykyk πŸ™ˆ


πŸ’œ SEE ALSO πŸ’œ

Online: threed, curve3, fence3, frst3, perim3, point3, psym3, pwrz, pwrzt, set3, threed, tick3, tick43, vect3, ncarg_cbind.

Hardcopy: NCAR Graphics Fundamentals, UNIX Version


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 β€” this one dropped on UNIX back in March 1993 as LINE3(3NCARG), and it's still serving straight-line-segment excellence to this day. Slay 🫢✨