---
name: "graphadd"
section: "3"
platform: "linux"
package: "libclippoly-dev"
version: "0.11-8"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/graphadd"
---

# graphadd(3)

additional 3d graphics and associated matrix and vector routines

## 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

These routines ar an addition to grapmat(3). The \*print routines print the appropriate data to  *stderr.* The \*scan routines read from *stdin.* The \*dupl routines copy data. v\_inters2 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, and two if the two lines do overlap. In that case, the two points are the extrema.

## NAMES

Naming conventions as in [graphmat(3)](/graphmat/3.md).

## USAGE

All the "functions" may have been implemented as macro's, so you can't take the address of a function. 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.

## SEE ALSO

[graphmat(3)](/graphmat/3.md), [graphmat++(3)](/graphmat++/3.md), 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
