Create a transform which will move the specified point to the origin
481634
private SimpleMatrix translateToOrigin( int x0 , int y0 ) {

		SimpleMatrix T = SimpleMatrix.identity(3);

		T.set(0, 2, -x0);
		T.set(1, 2, -y0);

		return T;
	}
1026422
function readPointGeometry(object, scale, translate) {
  const coordinates = object['coordinates'];
  if (scale && translate) {
    transformVertex(coordinates, scale, translate);
  }
  return new Point(coordinates);
}
278718
function() {
        var ox = this._origin.x + this._x,
            oy = this._origin.y + this._y,
            rad = -this._rotation * DEG_TO_RAD;
        // axis-aligned (unrotated) coordinates, relative to the origin point
        var dx1 = this._x - this._bx1 - ox,
            dx2 = this._x + this._w + this._bx2 - ox,
            dy1 = this._y - this._by1 - oy,
            dy2 = this._y + this._h + this._by2 - oy;

        var ct = rounded_cos(rad),
            st = rounded_sin(rad);

        // Calculate the new points relative to the origin, then find the new (absolute) bounding coordinates!
        var x0 = dx1 * ct + dy1 * st,
            y0 = -dx1 * st + dy1 * ct,
            x1 = dx2 * ct + dy1 * st,
            y1 = -dx2 * st + dy1 * ct,
            x2 = dx2 * ct + dy2 * st,
            y2 = -dx2 * st + dy2 * ct,
            x3 = dx1 * ct + dy2 * st,
            y3 = -dx1 * st + dy2 * ct,
            minx = Math.floor(Math.min(x0, x1, x2, x3) + ox),
            miny = Math.floor(Math.min(y0, y1, y2, y3) + oy),
            maxx = Math.ceil(Math.max(x0, x1, x2, x3) + ox),
            maxy = Math.ceil(Math.max(y0, y1, y2, y3) + oy);
        if (!this._mbr) {
            this._mbr = {
                _x: minx,
                _y: miny,
                _w: maxx - minx,
                _h: maxy - miny
            };
        } else {
            this._mbr._x = minx;
            this._mbr._y = miny;
            this._mbr._w = maxx - minx;
            this._mbr._h = maxy - miny;
        }

        // If a collision hitbox exists AND sits outside the entity, find a bounding box for both.
        // `_cbr` contains information about a bounding circle of the hitbox.
        // The bounds of `_cbr` will be the union of the `_mbr` and the bounding box of that circle.
        // This will not be a minimal region, but since it's only used for the broad phase pass it's good enough.
        //
        // cbr is calculated by the `_checkBounds` method of the "Collision" component
        if (this._cbr) {
            var cbr = this._cbr;
            var cx = cbr.cx,
                cy = cbr.cy,
                r = cbr.r;
            var cx2 = ox + (cx + this._x - ox) * ct + (cy + this._y - oy) * st;
            var cy2 = oy - (cx + this._x - ox) * st + (cy + this._y - oy) * ct;
            cbr._x = Math.min(cx2 - r, minx);
            cbr._y = Math.min(cy2 - r, miny);
            cbr._w = Math.max(cx2 + r, maxx) - cbr._x;
            cbr._h = Math.max(cy2 + r, maxy) - cbr._y;
        }
    }
1289777
function (x, y) {
                var matrix = selectedShape.node().getCTM(),
                    position = chart.svg.node().createSVGPoint();
                position.x = x || 0;
                position.y = y || 0;
                return position.matrixTransform(matrix);
            }
914238
def move(self, point, reverse=False):
        
        if reverse:
            point = [-1 * i for i in point]
        return Box(self.x + point[0], self.y + point[1], self.width, self.height)
516225
function contoursTransform(contours, transforms) {
    if (!contours || !contours.length || !transforms || !transforms.length) {
        return contours;
    }

    contours.forEach(function (p) {
        for (var i = 0, l = transforms.length; i < l; i++) {
            var transform = transforms[i];
            var params = transform.params;
            switch (transform.name) {
                case 'translate':
                    pathAdjust(p, 1, 1, params[0], params[1]);
                    break;
                case 'scale':
                    pathAdjust(p, params[0], params[1]);
                    break;
                case 'matrix':
                    pathTransform(p, params[0], params[1], params[2], params[3], params[4], params[5]);
                    break;
            }
        }
    });

    return contours;
}
155791
def set_origin(self, offset):
        """"""
        offset = np.array(offset)
        for node in self.worldbody.findall("./*[@pos]"):
            cur_pos = string_to_array(node.get("pos"))
            new_pos = cur_pos + offset
            node.set("pos", array_to_string(new_pos))
1303600
def apply_transform(self, transform):
        
        self.vertices = transformations.transform_points(self.vertices,
                                                         matrix=transform)
650596
function rotateY(out, a, b, c){
    var bx = b[0]
    var bz = b[2]

    // translate point to the origin
    var px = a[0] - bx
    var pz = a[2] - bz
    
    var sc = Math.sin(c)
    var cc = Math.cos(c)
  
    // perform rotation and translate to correct position
    out[0] = bx + pz * sc + px * cc
    out[1] = a[1]
    out[2] = bz + pz * cc - px * sc
  
    return out
}
1335567
function (elem, fromD, toD) {
		fromD = fromD || '';
		var shift = elem.shift,
			bezier = fromD.indexOf('C') > -1,
			numParams = bezier ? 7 : 3,
			endLength,
			slice,
			i,
			start = fromD.split(' '),
			end = [].concat(toD), // copy
			startBaseLine,
			endBaseLine,
			sixify = function (arr) { // in splines make move points have six parameters like bezier curves
				i = arr.length;
				while (i--) {
					if (arr[i] === M) {
						arr.splice(i + 1, 0, arr[i + 1], arr[i + 2], arr[i + 1], arr[i + 2]);
					}
				}
			};

		if (bezier) {
			sixify(start);
			sixify(end);
		}

		// pull out the base lines before padding
		if (elem.isArea) {
			startBaseLine = start.splice(start.length - 6, 6);
			endBaseLine = end.splice(end.length - 6, 6);
		}

		// if shifting points, prepend a dummy point to the end path
		if (shift <= end.length / numParams && start.length === end.length) {
			while (shift--) {
				end = [].concat(end).splice(0, numParams).concat(end);
			}
		}
		elem.shift = 0; // reset for following animations

		// copy and append last point until the length matches the end length
		if (start.length) {
			endLength = end.length;
			while (start.length < endLength) {

				//bezier && sixify(start);
				slice = [].concat(start).splice(start.length - numParams, numParams);
				if (bezier) { // disable first control point
					slice[numParams - 6] = slice[numParams - 2];
					slice[numParams - 5] = slice[numParams - 1];
				}
				start = start.concat(slice);
			}
		}

		if (startBaseLine) { // append the base lines for areas
			start = start.concat(startBaseLine);
			end = end.concat(endBaseLine);
		}
		return [start, end];
	}
636190
def move(self, v):
        """"""

        # rotate movement vector according to the angle of the object
        vx, vy = v
        vx, vy = (
            vx * math.cos(self.angle) - vy * math.sin(self.angle),
            vx * math.sin(self.angle) + vy * math.cos(self.angle),
        )

        def _move(xy):
            x, y = xy
            return x + vx, y + vy

        # TODO: detect other objects in the way, stop movement appropriately

        self.pts = [p for p in map(lambda x: _move(x), self.pts)]
        self.center = _move(self.center)
106982
def transform(point)
	    return point if point.is_a?(PointZero)
	    m = matrix
	    m ? Point[m * Point[point]] : point
	end
786598
def move(self, target, pos=None):
        '''
        
        '''
        if self.outline != target.outline:
            raise IntegrityError('Elements must be from the same outline!')
        tree_manipulation.send(
            sender=self.__class__,
            instance=self,
            action='move',
            target_node_type=None,
            target_node=target,
            pos=pos
        )
        return super().move(target, pos)
1173945
function(x, y) {
            OpenLayers.Geometry.Point.prototype.move.apply(this, arguments);
            this._rotationHandle && this._rotationHandle.geometry.move(x, y);
            this._handle.geometry.move(x, y);
        }
70928
public function transformPoint(PointInterface $point, PointInterface $origin = null)
    {

        $x = $point->getX();
        $y = $point->getY();

        if ($origin) {

            $x += $origin->getX();
            $y += $origin->getY();
        }

        $x = $this->a * $x + $this->c * $y + $this->tx;
        $y = $this->b * $x + $this->d * $y + $this->ty;

        if ($origin) {

            $x -= $origin->getX();
            $y -= $origin->getY();
        }

        return new Point($x, $y);
    }
1213098
def move_content_to_origin(self):
        """"""
        tcs = list(self.iter_tcs())
        origin_tc = tcs[0]
        for spanned_tc in tcs[1:]:
            origin_tc.append_ps_from(spanned_tc)
278121
def getTransformForOverlayCoordinates(self, ulOverlayHandle, eTrackingOrigin, coordinatesInOverlay):
        """"""

        fn = self.function_table.getTransformForOverlayCoordinates
        pmatTransform = HmdMatrix34_t()
        result = fn(ulOverlayHandle, eTrackingOrigin, coordinatesInOverlay, byref(pmatTransform))
        return result, pmatTransform