GRAPHADD(3)

πŸ“¦ version 0.11, in ubuntu noble

πŸŽ€ GRAPHADD(3) πŸŽ€

okay bestie, so this is a page from the Library Functions Manual and it's all about graphadd β€” the lil extra bundle of 3d graphics goodies plus the matrix and vector routines that ride along with it. grab a strawberry drink, we're going in πŸ’–


✨ NAME ✨

v_print2, v_print3, m_print2, m_print3, v_scan2, v_scan3, v_inters2, v_dupl2, v_dupl3, m_dupl2, m_dupl3 β€” additional 3d graphics and associated matrix and vector routines 🌸


✨ SYNOPSIS ✨

#include <graphadd.h>

void      v_print2(hvec2_t vec, const char *name)

void      v_print3(hvec3_t vec, const char *name)

void      m_print2(hmat2_t mat, const char *name)

void      m_print3(hmat3_t mat, const char *name)

int v_scan2(hvec2_t &vec)

int v_scan3(hvec3_t &vec)

int v_inters2(
const hvec2_t &p1, const hvec2_t &p2, const hvec2_t &q1,
const hvec2_t &q2, hvec2_t *S1, hvec2_t *S2)

void v_dupl2(hvec2_t *, hvec2_t *)

void v_dupl3(hvec3_t *, hvec3_t *)

void m_dupl2(hmat2_t *, hmat2_t *)

void m_dupl3(hmat3_t *, hmat3_t *)

πŸ’… DESCRIPTION πŸ’…

So these routines are an addition to grapmat(3) β€” think of them as the bonus tracks on the album, no skips 🎡

  • The *print routines print the appropriate data to stderr. yes bestie, stderr, not stdout, don't come for me, that's just the vibe.
  • The *scan routines read from stdin. πŸ‘‘
  • The *dupl routines copy data. simple, iconic, does exactly what it says on the tin ✨

And then there's the main character, v_inters2. she returns the intersection point of p1,p2 and q1,q2 in S1 and S2. the return value is:

  • 0 β€” if no intersection point is found 😭
  • 1 β€” if there is an intersection point 🫢
  • 2 β€” if the two lines do overlap. and in that case, the two points are the extrema. periodt. πŸ’…

🌈 NAMES 🌈

naming conventions are the same as in graphmat(3). iykyk, no need to reinvent the wheel, she's consistent πŸ’–


πŸ¦‹ USAGE πŸ¦‹

ok this part is important, listen up bestie πŸ‘‚

All the "functions" may have been implemented as macro's, so you can't take the address of a function. that's just how it is, no cap.

It is however guaranteed that arguments of each function/macro will be evaluated only once β€” except for the result argument, which can be evaluated multiple times. so like, be chill about the side effects on that one, okay? πŸ™ˆ


⭐ SEE ALSO ⭐


πŸŽ€ NOTE πŸŽ€

Only available in C++ and ANSI C. v_inters2 only in C++ 🫢

Library file is /usr/local/lib/libgraphmat.a and the C++ util files. ✨


πŸ‘‘ AUTHOR πŸ‘‘

  • Herbert Hilhorst
  • Klamer Schutte

and that's the whole page, bestie, you ate it πŸ’…βœ¨ this lil masterpiece is dated 9 September 1992, and it lives in the Library Functions Manual as GRAPHADD(3) β€” go forth and intersect some lines fr fr πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from