GRAPHADD(3)
π 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
*printroutines print the appropriate data tostderr. yes bestie, stderr, not stdout, don't come for me, that's just the vibe. - The
*scanroutines read fromstdin. π - The
*duplroutines 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 β
graphmat(3)graphmat++(3)- Graphics and matrix routines.
π 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
- ubuntu noble: libclippoly-dev 0.11-10.1build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms