-
Notifications
You must be signed in to change notification settings - Fork 5
/
geom_tin.h
58 lines (51 loc) · 1.4 KB
/
geom_tin.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/* ************************************************************
*
* MODULE: r.refine
*
* Authors: Jon Todd <[email protected]>, Laura Toma <[email protected]>
* Bowdoin College, USA
*
* Purpose: convert grid data to TIN
*
* COPYRIGHT:
* This program is free software under the GNU General Public
* License (>=v2). Read the file COPYING that comes with GRASS
* for details.
*
*
************************************************************ */
/******************************************************************************
*
* geom_tin.h contains geometric functions used to determin various
* properties of the triangulation
*
* AUTHOR(S): Jonathan Todd - <[email protected]>
*
* UPDATED: jt 2005-08-15
*
* COMMENTS:
*
*****************************************************************************/
#ifndef __geom_tin_h
#define __geom_tin_h
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include "point.h"
#include "triangle.h"
#include "constants.h"
//
// Computes the determinant of a 2x2 matrix
//
long determinant(ELEV_TYPE a, ELEV_TYPE b,ELEV_TYPE c,ELEV_TYPE d);
//
// Given and triangle and x,y; interpolate z
//
long interpolate(R_POINT* p1, R_POINT* p2, R_POINT* p3,COORD_TYPE px,
COORD_TYPE py);
//
// Find the error of a given point in a triangle
//
ELEV_TYPE findError(COORD_TYPE row,COORD_TYPE col,ELEV_TYPE height,
TRIANGLE* t);
#endif