| 1 |
– |
/* Copyright (c) 1986 Regents of the University of California */ |
| 2 |
– |
|
| 1 |
|
#ifndef lint |
| 2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
| 2 |
> |
static const char RCSid[] = "$Id$"; |
| 3 |
|
#endif |
| 6 |
– |
|
| 4 |
|
/* |
| 5 |
|
* hermite.c - routines for 3D hermite curves. |
| 6 |
|
* |
| 9 |
|
|
| 10 |
|
#include <stdio.h> |
| 11 |
|
|
| 12 |
< |
|
| 13 |
< |
hermite3(hp, p0, p1, r0, r1, t) /* compute point on hermite curve */ |
| 14 |
< |
double hp[3]; /* returned hermite point */ |
| 15 |
< |
double p0[3]; /* first endpoint */ |
| 16 |
< |
double p1[3]; /* second endpoint */ |
| 17 |
< |
double r0[3]; /* tangent at p0 */ |
| 18 |
< |
double r1[3]; /* tangent at p1 */ |
| 19 |
< |
double t; /* position parameter */ |
| 12 |
> |
void |
| 13 |
> |
hermite3( /* compute point on hermite curve */ |
| 14 |
> |
double hp[3], /* returned hermite point */ |
| 15 |
> |
double p0[3], /* first endpoint */ |
| 16 |
> |
double p1[3], /* second endpoint */ |
| 17 |
> |
double r0[3], /* tangent at p0 */ |
| 18 |
> |
double r1[3], /* tangent at p1 */ |
| 19 |
> |
double t /* position parameter */ |
| 20 |
> |
) |
| 21 |
|
{ |
| 22 |
|
register int i; |
| 23 |
|
double tmh[4]; |
| 33 |
|
} |
| 34 |
|
|
| 35 |
|
|
| 36 |
< |
htan3(ht, p0, p1, r0, r1, t) /* compute tangent on hermite curve */ |
| 37 |
< |
double ht[3]; /* returned hermite tangent */ |
| 38 |
< |
double p0[3]; /* first endpoint */ |
| 39 |
< |
double p1[3]; /* second endpoint */ |
| 40 |
< |
double r0[3]; /* tangent at p0 */ |
| 41 |
< |
double r1[3]; /* tangent at p1 */ |
| 42 |
< |
double t; /* position parameter */ |
| 36 |
> |
htan3( /* compute tangent on hermite curve */ |
| 37 |
> |
double ht[3], /* returned hermite tangent */ |
| 38 |
> |
double p0[3], /* first endpoint */ |
| 39 |
> |
double p1[3], /* second endpoint */ |
| 40 |
> |
double r0[3], /* tangent at p0 */ |
| 41 |
> |
double r1[3], /* tangent at p1 */ |
| 42 |
> |
double t /* position parameter */ |
| 43 |
> |
) |
| 44 |
|
{ |
| 45 |
|
register int i; |
| 46 |
|
double tpmh[4]; |