Hi,
first question
in userSurf.c, coordinates x, y, and z are passed as "long", as well as u,v and w
Code: Select all
void UserSurf(long part, long np, const double *params, double *xmin,
double *xmax, double *ymin, double *ymax, double *zmin,
double *zmax, long *in, double *dmin, long x, long y, long z,
long u, long v, long w)
it seems a bit strange, is it correct?
After changing them to double (also in the header),
and some plotting, everything seems ok.
- sph_long.png (2.04 KiB) Viewed 2181 times
second question
I would like to use torus surfaces.
The algorithm for test if a point is inside a torus is quite simple.
On the other hand, the computation of the distance to the surface along a given direction needs the solution a fourth order polynomial equation (i.e., it is long and boring).
I tried to use the new surface without implementing the third part of usersurf.c.
If delta-tracking is forced ("set dt 1")
and the torus surface is not used to define "outside" (so that StopAtBoundary is never called)
everything seems fine.
I tried few runs with a simple big torus of 10% enriched U.
Here collision mesh plots for XY plane and several X-normal planes.
- tr1.png (39.68 KiB) Viewed 2181 times
- tr2.png (57.57 KiB) Viewed 2181 times
Do you think that it might work correctly?
More in general, is it possible to use complex surfaces providing only part 1 and part 2 algorithms in usersurf.c?
Thanks
Merry Christmas