Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

reflect

Reflect In Origin


Description

Reflects a geometrical object through the origin.

Usage

reflect(X)

  ## S3 method for class 'im'
reflect(X)

  ## Default S3 method:
reflect(X)

Arguments

X

Any suitable dataset representing a two-dimensional object, such as a point pattern (object of class "ppp"), or a window (object of class "owin").

Details

The object X is reflected through the origin. That is, each point in X with coordinates (x,y) is mapped to the position (-x, -y).

This is equivalent to applying the affine transformation with matrix diag(c(-1,-1)). It is also equivalent to rotation about the origin by 180 degrees.

The command reflect is generic, with a method for pixel images and a default method.

Value

Another object of the same type, representing the result of reflection.

Author(s)

and Rolf Turner r.turner@auckland.ac.nz

See Also

Examples

plot(reflect(as.im(letterR)))
  plot(reflect(letterR), add=TRUE)

spatstat.geom

Geometrical Functionality of the 'spatstat' Family

v2.1-0
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Tilman Davies [ctb], Ute Hahn [ctb], Abdollah Jalilian [ctb], Sebastian Meyer [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Waagepetersen [ctb]
Initial release
2021-04-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.