The R Project SVN R

Rev

Rev 21594 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 21594 Rev 24735
Line 301... Line 301...
301
}
301
}
302
 
302
 
303
	/* ctr_segdir(): Determine the entry direction to the next cell */
303
	/* ctr_segdir(): Determine the entry direction to the next cell */
304
	/* and update the cell indices */
304
	/* and update the cell indices */
305
 
305
 
306
#ifdef OLDcontour
-
 
307
static double ctr_xtol;
-
 
308
static double ctr_ytol;
-
 
309
#define XMATCH(x0,x1) (fabs(x0-x1) < ctr_xtol)
-
 
310
#define YMATCH(y0,y1) (fabs(y0-y1) < ctr_ytol)
-
 
311
#else
-
 
312
#define XMATCH(x0,x1) (fabs(x0-x1) == 0)
306
#define XMATCH(x0,x1) (fabs(x0-x1) == 0)
313
#define YMATCH(y0,y1) (fabs(y0-y1) == 0)
307
#define YMATCH(y0,y1) (fabs(y0-y1) == 0)
314
#endif
-
 
315
 
308
 
316
static int ctr_segdir(double xend, double yend, double *x, double *y,
309
static int ctr_segdir(double xend, double yend, double *x, double *y,
317
		      int *i, int *j, int nx, int ny)
310
		      int *i, int *j, int nx, int ny)
318
{
311
{
319
    if (YMATCH(yend, y[*j])) {
312
    if (YMATCH(yend, y[*j])) {
Line 1676... Line 1669...
1676
	    y[*npt] = y1;
1669
	    y[*npt] = y1;
1677
	    z[*npt] = z1 + c * (z2 - z1);
1670
	    z[*npt] = z1 + c * (z2 - z1);
1678
	    ++*npt;
1671
	    ++*npt;
1679
	}
1672
	}
1680
	if (z2 > low) {
1673
	if (z2 > low) {
1681
#ifdef OMIT
-
 
1682
	    /* Don't repeat corner vertices */
-
 
1683
	    x[*npt] = x2;
-
 
1684
	    y[*npt] = y2;
-
 
1685
	    z[*npt] = z2;
-
 
1686
	    ++*npt;
-
 
1687
#endif
-
 
1688
	}
1674
	}
1689
	else {
1675
	else {
1690
	    c = (z2 -low) / (z2 - z1);
1676
	    c = (z2 -low) / (z2 - z1);
1691
	    x[*npt] = x2 - c * (x2 - x1);
1677
	    x[*npt] = x2 - c * (x2 - x1);
1692
	    y[*npt] = y1;
1678
	    y[*npt] = y1;
Line 1963... Line 1949...
1963
}
1949
}
1964
 
1950
 
1965
	/*  P e r s p e c t i v e   S u r f a c e   P l o t s  */
1951
	/*  P e r s p e c t i v e   S u r f a c e   P l o t s  */
1966
 
1952
 
1967
 
1953
 
1968
#ifdef NOT_used_currently/*-- out 'def'  (-Wall) --*/
-
 
1969
static void MakeVector (double x, double y, double z, Vector3d v)
-
 
1970
{
-
 
1971
    v[0] = x;
-
 
1972
    v[1] = y;
-
 
1973
    v[2] = z;
-
 
1974
    v[3] = 1;
-
 
1975
}
-
 
1976
#endif
-
 
1977
 
-
 
1978
 
-
 
1979
 
-
 
1980
/* Set up the light source */
1954
/* Set up the light source */
1981
static double Light[4];
1955
static double Light[4];
1982
static double Shade;
1956
static double Shade;
1983
static Rboolean DoLighting;
1957
static Rboolean DoLighting;
1984
 
1958