docs: void computePointsAndWeights(EllipseRotated_F64 ellipse) {
  
  		// use the semi-major axis to scale the input points for numerical stability
  		double localScale = ellipse.a;
  
  		samplePts.reset();
  		weights.reset();
  		int numSamples = radialSamples * 2 + 2;
  		int numPts = numSamples - 1;
  
  		Point2D_F64 sample = new Point2D_F64();
  		for (int i = 0; i < numSampleContour; i++) {
  
  			// find a point along the ellipse at evenly spaced angles
  			double theta = 2.0 * Math.PI * i / numSampleContour;
  
  			UtilEllipse_F64.computePoint(theta, ellipse, sample);
  
  			// compute the unit tangent along the ellipse at this point
  			double tanX = sample.x - ellipse.center.x;
  			double tanY = sample.y - ellipse.center.y;
  			double r = Math.sqrt(tanX * tanX + tanY * tanY);
  			tanX /= r;
  			tanY /= r;
  
  			// define the line it will sample along
  			double x = sample.x - numSamples * tanX / 2.0;
  			double y = sample.y - numSamples * tanY / 2.0;
  
  			double lengthX = numSamples * tanX;
  			double lengthY = numSamples * tanY;
  
  			// Unless all the sample points are inside the image, ignore this point
  			if (!integral.isInside(x, y) || !integral.isInside(x + lengthX, y + lengthY))
  				continue;
  
  			double sample0 = integral.compute(x, y, x + tanX, y + tanY);
  			x += tanX;
  			y += tanY;
  			for (int j = 0; j < numPts; j++) {
  				double sample1 = integral.compute(x, y, x + tanX, y + tanY);
  
  				double w = sample0 - sample1;
  				if (w < 0) w = -w;
  
  				if (w > 0) {
  					// convert into a local coordinate so make the linear fitting more numerically stable and
  					// independent on position in the image
  					samplePts.grow().set((x - ellipse.center.x) / localScale, (y - ellipse.center.y) / localScale);
  					weights.add(w);
  				}
  
  				x += tanX;
  				y += tanY;
  				sample0 = sample1;
  			}
  
  		}
  	}