projection_inter.c
Go to the documentation of this file.
1 /* Jan.17,1992. Bug fix. Set small coeficient be zero. */
2 #include "arith.h"
3 
4 projection_inter(x,n,motion_in,motion_out)
5 float x[MAX][MAXRANK];
6 int n;
7 float motion_in[MAXRANK], motion_out[MAXRANK];
8 {
9  int i,j,en;
10  REAL dx[MAX][MAXRANK];
11  REAL dw[MAXRANK][MAXEDGE], dm_in[MAXRANK], dm_out[MAXRANK];
12 
13  for(j=0; j<MAXRANK; j++){
14  dm_in[j] = (double)motion_in[j];
15  }
16 
17  for(i=0; i<n; i++){
18  for(j=0; j<MAXRANK; j++){
19  dx[i][j]=(double)x[i][j];
20  /* Set small coecifients be zero */
21  if(fabs(dx[i][j])<EPS)
22  dx[i][j]=0;
23  }
24  }
25 
26  projection(dx,n,dm_in,dm_out);
27 
28  for(j=0; j<MAXRANK; j++){
29  if(fabs(dm_out[j])<EPS)
30  motion_out[j]=(float)0.0;
31  else
32  motion_out[j]=(float)dm_out[j];
33  }
34 
35  return;
36 }
37 
38 
projection
projection(x, int n, motion_in, motion_out)
Definition: projection.c:3
projection_inter
projection_inter(x, int n, motion_in, motion_out)
Definition: projection_inter.c:4
EPS
#define EPS
Definition: arith.h:15
arith.h
MAXEDGE
#define MAXEDGE
Definition: arith.h:14
REAL
double REAL
Definition: arith.h:25
MAX
#define MAX
Definition: arith.h:12
MAXRANK
#define MAXRANK
Definition: arith.h:13
n
GLfloat n[6][3]
Definition: cube.c:15


euslisp
Author(s): Toshihiro Matsui
autogenerated on Thu Jun 15 2023 02:06:43