points --> list of (x,y) coordinates
519200
def undistortPoints(self, points, keepSize=False):
        '''
        
        '''
        s = self.img.shape
        cam = self.coeffs['cameraMatrix']
        d = self.coeffs['distortionCoeffs']

        pts = np.asarray(points, dtype=np.float32)
        if pts.ndim == 2:
            pts = np.expand_dims(pts, axis=0)

        (newCameraMatrix, roi) = cv2.getOptimalNewCameraMatrix(cam,
                                                               d, s[::-1], 1,
                                                               s[::-1])
        if not keepSize:
            xx, yy = roi[:2]
            pts[0, 0] -= xx
            pts[0, 1] -= yy

        return cv2.undistortPoints(pts,
                                   cam, d, P=newCameraMatrix)
149106
protected void determineCoordinates(){
		for (int i=0; i<numPoints; i++){
			coordinates.set(i, getPointCoordinate(i));
		}
	}
568522
def t_coords(self, t_coords):
        """"""
        if not isinstance(t_coords, np.ndarray):
            raise TypeError('Texture coordinates must be a numpy array')
        if t_coords.ndim != 2:
            raise AssertionError('Texture coordinates must be a 2-dimensional array')
        if t_coords.shape[0] != self.n_points:
            raise AssertionError('Number of texture coordinates ({}) must match number of points ({})'.format(t_coords.shape[0], self.n_points))
        if t_coords.shape[1] != 2:
            raise AssertionError('Texture coordinates must only have 2 components, not ({})'.format(t_coords.shape[1]))
        if np.min(t_coords) < 0.0 or np.max(t_coords) > 1.0:
            raise AssertionError('Texture coordinates must be within (0, 1) range.')
        # convert the array
        vtkarr = numpy_to_vtk(t_coords)
        vtkarr.SetName('Texture Coordinates')
        self.GetPointData().SetTCoords(vtkarr)
        self.GetPointData().Modified()
        return
803346
def distances(self, points):
        """"""
        return [math.acos(self._pos3d.dot(p.vector)) for p in points]
1018576
function (x, y, points) {
            this.pos.set(x, y);

            if (!Array.isArray(points)) {
                return this;
            }

            // convert given points to me.Vector2d if required
            if (!(points[0] instanceof me.Vector2d)) {
                var _points = this.points = [];
                points.forEach(function (point) {
                   _points.push(new me.Vector2d(point.x, point.y));
                });
            } else {
                // array of me.Vector2d
                this.points = points;
            }

            this.recalc();
            this.updateBounds();

            return this;
        }
300184
function parseMultiPointGeometry (coordinates) {
		var multipointWkt = [];
		for (var i = 0; i < coordinates.length; i++) {
			multipointWkt.push(parsePointGeometry(coordinates[i]));
		}
		return multipointWkt.join(', ');
	}
771516
def xywh_from_points(points):
    
    xys = [[int(p) for p in pair.split(',')] for pair in points.split(' ')]
    minx = sys.maxsize
    miny = sys.maxsize
    maxx = 0
    maxy = 0
    for xy in xys:
        if xy[0] < minx:
            minx = xy[0]
        if xy[0] > maxx:
            maxx = xy[0]
        if xy[1] < miny:
            miny = xy[1]
        if xy[1] > maxy:
            maxy = xy[1]

    return {
        'x': minx,
        'y': miny,
        'w': maxx - minx,
        'h': maxy - miny,
    }
715403
def points_from_y0x0y1x1(yxyx):
    
    y0 = yxyx[0]
    x0 = yxyx[1]
    y1 = yxyx[2]
    x1 = yxyx[3]
    return "%s,%s %s,%s %s,%s %s,%s" % (
        x0, y0,
        x1, y0,
        x1, y1,
        x0, y1
    )
299636
def draw_points(self, *points):
        
        point_array = ffi.new('SDL_Point[]', len(points))
        for i, p in enumerate(points):
            point_array[i] = p._ptr[0]
        check_int_err(lib.SDL_RenderDrawPoints(self._ptr, point_array, len(points)))
1198932
def __geomToPointList(self, geom):
        
        sr = geom.spatialReference
        wkid = None
        wkt = None
        if sr is None:
            if self._wkid is None and self._wkt is not None:
                wkt = self._wkt
            else:
                wkid = self._wkid
        else:
            wkid = sr.factoryCode
        g = json.loads(geom.JSON)
        top = []
        for gring in g['rings']:
            ring = []
            for g in gring:
                ring.append(Point(coord=g, wkid=wkid, wkt=wkt, z=None, m=None))
            top.append(ring)
        return top
69258
def get_coordinates(self):
        
        resource_list = self.get_resource()
        coordinates = namedtuple('coordinates', ['latitude', 'longitude'])
        try:
            return [coordinates(*resource['point']['coordinates'])
                    for resource in resource_list]
        except (KeyError, TypeError):
            try:
                if isinstance(resource_list, dict):
                    resource_list = [resource_list]
                return [coordinates(resource['Point']['Latitude'],
                                    resource['Point']['Longitude'])
                        for resource in resource_list]
            except (KeyError, ValueError) as exc:
                print(exc)
991046
def points(self, points):
        
        if not isinstance(points, np.ndarray):
            raise TypeError('Points must be a numpy array')
        # get the unique coordinates along each axial direction
        x = np.unique(points[:,0])
        y = np.unique(points[:,1])
        z = np.unique(points[:,2])
        # Set the vtk coordinates
        self._from_arrays(x, y, z)
        #self._point_ref = points
        self.Modified()
517562
def update_points(self):
        
        x, y, w, h = self.x, self.y, self.w, self.h
        self.points = (x, y, x + w, y, x + w, y + h, x, y + h)
1267689
function pointsToCoordArray(points) {
                var coodinatesArray = new Array(points.length * points[0].length);
                var k = 0;
                for (var i = 0; i < points.length; ++i) {
                    for (var j = 0; j < points[0].length; ++j) {
                        coodinatesArray[k] = points[i][j];
                        ++k;
                    }
                }

                return coodinatesArray;
            }
90905
private MultiPoint asMultiPoint(List<List> coords, CrsId crsId) throws IOException {
        if (coords == null || coords.isEmpty()) {
            throw new IOException("A multipoint contains at least one point");
        }
        Point[] points = new Point[coords.size()];
        for (int i = 0; i < coords.size(); i++) {
            points[i] = asPoint(coords.get(i), crsId);
        }
        return new MultiPoint(points);
    }
1120150
@NonNull
  private static List<Point> coordAll(@NonNull List<Point> coords, @NonNull MultiPoint multiPoint) {
    coords.addAll(multiPoint.coordinates());
    return coords;
  }
142893
def get_coords(self):
        """"""
        out_list = []
        for i in range(len(self.x_coord_list)):
            out_list.append((self.x_coord_list[i],self.y_coord_list[i],self.z_coord_list[i],))
        return out_list