diff sp/parstxtr.c sp-toroid/parstxtr.c 1076a1077,1081 > CASE (TOROIDAL_TOKEN) > New->Type = TOROIDAL_PATTERN; > EXIT > END_CASE > diff sp/pattern.c sp-toroid/pattern.c 81a82 > static DBL toroidal (VECTOR EPoint); /* PoD */ 1417a1419,1437 > /* PoD */ > static DBL toroidal (VECTOR EPoint) > { > register DBL value; > register DBL d2; > > /*distance from circle = sqrt( y*y + (sqrt(x*x+z*z)-1)*(sqrt(x*x+z*z)-1) )*/ > /* thanks to John VanSickle and Peter Popov for the formula */ > > d2 = sqrt(EPoint[X]*EPoint[X]+EPoint[Z]*EPoint[Z]) - 1.0; > if( fabs(EPoint[Y]) >= 1 || d2 >= 1.0 ) > return(DBL)0; > value = sqrt( EPoint[Y]*EPoint[Y] + d2*d2 ); > CLIP_DENSITY(value); > > return(value); > } > /* PoD */ > 1572a1593 > case TOROIDAL_PATTERN: value = toroidal (TPoint); break; /* PoD */ diff sp/pattern.h sp-toroid/pattern.h 89a90 > TOROIDAL_PATTERN, /* PoD */ Common subdirectories: sp/unix and sp-toroid/unix Common subdirectories: sp/windows and sp-toroid/windows