public final DoubleValuesSource makeRecipDistanceValueSource(Shape queryShape) {Rectangle bbox = queryShape.getBoundingBox();double diagonalDist = ctx.getDistCalc().distance(ctx.makePoint(bbox.getMinX(), bbox.getMinY()), bbox.getMaxX(), bbox.getMaxY());double distToEdge = diagonalDist * 0.5;float c = (float)distToEdge * 0.1f;DoubleValuesSource distance = makeDistanceValueSource(queryShape.getCenter(), 1.0);return new ReciprocalDoubleValuesSource(c, distance);}

public ValueSource MakeRecipDistanceValueSource(IShape queryShape){IRectangle bbox = queryShape.BoundingBox;double diagonalDist = m_ctx.DistCalc.Distance(m_ctx.MakePoint(bbox.MinX, bbox.MinY), bbox.MaxX, bbox.MaxY);double distToEdge = diagonalDist * 0.5;float c = (float)distToEdge * 0.1f; return new ReciprocalSingleFunction(MakeDistanceValueSource(queryShape.Center, 1.0), 1f, c, c);}
