Fits points to a circle
@param points
483346
public Circle fit(Circle initCircle, DenseMatrix64F points)
    {
        initCenter.data[0] = initCircle.getX();
        initCenter.data[1] = initCircle.getY();
        radius = initCircle.getRadius();
        fit(points);
        return this;
    }
883501
public void setEndpoints(java.util.Collection<Endpoint> endpoints) {
        if (endpoints == null) {
            this.endpoints = null;
            return;
        }

        this.endpoints = new java.util.ArrayList<Endpoint>(endpoints);
    }
59120
public void setRadius(float radius) {
		if (radius != this.radius) {
	        pointsDirty = true;
			this.radius = radius;
	        setRadii(radius, radius);
		}
	}
602111
@Api
	public void zoomToFeatures(List<Feature> features) {
		// calculate the point scale as the minimum point scale for all layers (only relevant for zooming to multiple
		// points at the exact same location)
		double zoomToPointScale = getMapInfo().getScaleConfiguration().getMaximumScale().getPixelPerUnit();
		for (Feature feature : features) {
			double scale = feature.getLayer().getLayerInfo().getZoomToPointScale().getPixelPerUnit();
			zoomToPointScale = Math.min(zoomToPointScale,  scale);
		}
		ZoomToFeaturesLazyLoadCallback callback = new ZoomToFeaturesLazyLoadCallback(features.size(), 
				zoomToPointScale);
		for (Feature feature : features) {
			// no need to fetch if we already have the geometry !
			if (feature.isGeometryLoaded()) {
				callback.execute(Arrays.asList(feature));
			} else {
				feature.getLayer().getFeatureStore()
						.getFeature(feature.getId(), GeomajasConstant.FEATURE_INCLUDE_GEOMETRY, callback);			
			}
		}
	}
687319
def fitcircle(n, x, y): 
# n points, x points, y points
    """"""
    # adding in normalize vectors step
    #x = numpy.array(x) / max(x)
    #y = numpy.array(y) / max(y)
    #
    
    sx, sx2, sx3, sy, sy2, sy3, sxy, sxy2, syx2 = (0,) * 9
    print(type(sx), sx)
    for i in range(n):
        sx = sx + x[i]
        sx2 = sx2 + x[i]**2
        sx3 = sx3 + x[i]**3
        sy = sy + y[i]
        sy2 = sy2 + y[i]**2
        sy3 = sy3 + y[i]**3
        sxy = sxy + x[i] * y[i]
        sxy2 = sxy2 + x[i] * y[i]**2
        syx2 = syx2 + y[i] * x[i]**2

    A = n * sx2 - sx**2
    B = n * sxy - sx*sy
    C = n * sy2 - sy**2
    D = 0.5 * (n * sxy2 - sx * sy2 + n * sx3 - sx * sx2)
    E = 0.5 * (n * syx2 - sy * sx2 + n * sy3 - sy * sy2)
    # values check out up to here

    xo = old_div((D * C - B * E), (A * C - B**2))
    yo = old_div((A * E - B * D), (A * C - B**2))
    print("xo", xo)
    print("yo", yo)

    r = 0
    for z in range(n):
        r = r + old_div(numpy.sqrt( (x[z]-xo)**2 + (y[z]-yo)**2 ), n)

    if xo <= numpy.mean(x) and yo <= numpy.mean(y):
        k = old_div(-1.,r)
    else:
        k = old_div(1.,r)

    SSE = lib_k.get_SSE(xo, yo, r, x, y)
    print("r", r)
    return k, xo, yo, SSE
400198
private Coordinate[] getCenterPoints( double[][][] houghValues, int maxCircles ) {

        Coordinate[] centerPoints = new Coordinate[maxCircles];
        int xMax = 0;
        int yMax = 0;
        int rMax = 0;

        for( int c = 0; c < maxCircles; c++ ) {
            double counterMax = -1;
            for( int radius = radiusMin; radius <= radiusMax; radius = radius + radiusInc ) {

                int indexR = (radius - radiusMin) / radiusInc;
                for( int y = 0; y < height; y++ ) {
                    for( int x = 0; x < width; x++ ) {
                        if (houghValues[x][y][indexR] > counterMax) {
                            counterMax = houghValues[x][y][indexR];
                            xMax = x;
                            yMax = y;
                            rMax = radius;
                        }
                    }

                }
            }

            centerPoints[c] = new Coordinate(xMax, yMax, rMax);

            clearNeighbours(houghValues, xMax, yMax, rMax);
        }
        return centerPoints;
    }
686006
function(points, options) {
      if (!points) {
        points = [0, 0, 0, 0];
      }

      this.callSuper('initialize', options);

      this.set('x1', points[0]);
      this.set('y1', points[1]);
      this.set('x2', points[2]);
      this.set('y2', points[3]);

      this._setWidthHeight(options);
    }
313744
public void addPoint(PolygonPoint p )    
    {
        p.setPrevious( _last );
        p.setNext( _last.getNext() );
        _last.setNext( p );
        _points.add( p );
    }
140967
def multipointz(self, points):
        """"""
        shapeType = MULTIPOINTZ
        points = [points] # nest the points inside a list to be compatible with the generic shapeparts method
        self._shapeparts(parts=points, shapeType=shapeType)
1109397
public void setDevEndpoints(java.util.Collection<DevEndpoint> devEndpoints) {
        if (devEndpoints == null) {
            this.devEndpoints = null;
            return;
        }

        this.devEndpoints = new java.util.ArrayList<DevEndpoint>(devEndpoints);
    }
110747
public void setMeshes(java.util.Collection<MeshRef> meshes) {
        if (meshes == null) {
            this.meshes = null;
            return;
        }

        this.meshes = new java.util.ArrayList<MeshRef>(meshes);
    }
543237
public void add(double... point) {
    if(this.ok) {
      this.points = new ArrayList<>(this.points);
      this.ok = false;
    }
    this.points.add(point);
    // Update data set extends
    minmaxX.put(point[0]);
    minmaxY.put(point[1]);
  }
111480
function drawPoints(ctx, points, radius, color) {
  const data = points.buffer().values;

  for (let i = 0; i < data.length; i += 2) {
    const pointY = data[i];
    const pointX = data[i + 1];

    if (pointX !== 0 && pointY !== 0) {
      ctx.beginPath();
      ctx.arc(pointX, pointY, radius, 0, 2 * Math.PI);
      ctx.fillStyle = color;
      ctx.fill();
    }
  }
}
371622
public void addGreatCircle(final GeoPoint startPoint, final GeoPoint endPoint) {
        //	get the great circle path length in meters
        final int greatCircleLength = (int) startPoint.distanceToAsDouble(endPoint);

        //	add one point for every 100kms of the great circle path
        final int numberOfPoints = greatCircleLength/100000;

        addGreatCircle(startPoint, endPoint, numberOfPoints);
	}
1367648
public void setCurve (XY[] points, int offset) {
        setCurve(points[offset + 0].x(), points[offset + 0].y(),
                 points[offset + 1].x(), points[offset + 1].y(),
                 points[offset + 2].x(), points[offset + 2].y());
    }
901252
function boundPoints (points) {
  var bounds = new Array(points.length)
  for (var i = 0; i < points.length; ++i) {
    var p = points[i]
    bounds[i] = [
      nextafter(p[0], -Infinity),
      nextafter(p[1], -Infinity),
      nextafter(p[0], Infinity),
      nextafter(p[1], Infinity)
    ]
  }
  return bounds
}
1304654
public void transformPoint(final double[] point) {
		Point3d p = new Point3d(point[0],point[1],point[2]);
		transformation.transform(p);
		point[0] = p.x;
		point[1] = p.y;
		point[2] = p.z;
	}