--- ray/src/cv/bsdfmesh.c 2014/03/08 21:06:14 2.20 +++ ray/src/cv/bsdfmesh.c 2014/03/12 00:39:43 2.23 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: bsdfmesh.c,v 2.20 2014/03/08 21:06:14 greg Exp $"; +static const char RCSid[] = "$Id: bsdfmesh.c,v 2.23 2014/03/12 00:39:43 greg Exp $"; #endif /* * Create BSDF advection mesh from radial basis functions. @@ -20,7 +20,7 @@ static const char RCSid[] = "$Id: bsdfmesh.c,v 2.20 20 #include "bsdfrep.h" #ifndef NEIGH_FACT2 -#define NEIGH_FACT2 15. /* empirical neighborhood distance weight */ +#define NEIGH_FACT2 0.1 /* empirical neighborhood distance weight */ #endif /* number of processes to run */ int nprocs = 1; @@ -562,6 +562,7 @@ check_normal_incidence(void) double bestd; int n; + if (dsf_list == NULL) return; /* XXX should be error? */ near_rbf = dsf_list; @@ -606,9 +607,10 @@ check_normal_incidence(void) memcpy(mir_rbf, near_rbf, n); mir_rbf->ord = near_rbf->ord - 1; /* not used, I think */ mir_rbf->next = NULL; + mir_rbf->ejl = NULL; rev_rbf_symmetry(mir_rbf, MIRROR_X|MIRROR_Y); nprocs = 1; /* compute migration matrix */ - if (mig_list != create_migration(mir_rbf, near_rbf)) + if (create_migration(mir_rbf, near_rbf) == NULL) exit(1); /* XXX should never happen! */ /* interpolate normal dist. */ rbf = e_advect_rbf(mig_list, norm_vec, 2*near_rbf->nrbf);