public override void StartRun(int npts) { iter = 0; precisionModel = new PrecisionModel(PREC_SCALE_FACTOR); geomA = SineStarFactory.Create(new Coordinate(ORG_X, ORG_Y), SIZE, npts, N_ARMS, ARM_RATIO); int nptsB = npts / NUM_CASES; if (nptsB < 10) { nptsB = 10; } geomB = createTestGeoms(NUM_CASES, nptsB); TestContext.WriteLine("\n------- Running with A: # pts = " + npts + " B # pts = " + nptsB); if (npts == 999) { TestContext.WriteLine(geomA); foreach (var g in geomB) { TestContext.WriteLine(g); } } }
public override void StartRun(int npts) { _sineStar = SineStarFactory.Create(new Coordinate(OriginX, OriginY), Size, npts, NumberOfArms, ArmRatio); _sinePolyCrinkly = GeometryPrecisionReducer.Reduce(_sineStar, new PrecisionModel(Size)); Console.WriteLine(); Console.WriteLine($"Running with # pts {_sinePolyCrinkly.NumPoints}"); ////if (npts <= 1000) Console.WriteLine(_sineStar); }
private Geometry[] createTestGeoms(int nGeoms, int npts) { var geoms = new Geometry[NUM_CASES]; int index = 0; for (int i = 0; i < GRID_SIZE; i++) { for (int j = 0; j < GRID_SIZE; j++) { double x = GRID_CELL_SIZE / 2 + i * GRID_CELL_SIZE; double y = GRID_CELL_SIZE / 2 + j * GRID_CELL_SIZE; var geom = SineStarFactory.Create(new Coordinate(x, y), GRID_CELL_SIZE, npts, N_ARMS, ARM_RATIO); geoms[index++] = geom; } } return(geoms); }