Last chance! 50% off unlimited learning
Sale ends in
reflect(X) ## S3 method for class 'im':
reflect(X)
## S3 method for class 'default':
reflect(X)
"ppp"
),
or a window (object of class "owin"
).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.
affine
,
flipxy
plot(reflect(as.im(letterR)))
plot(reflect(letterR), add=TRUE)
Run the code above in your browser using DataLab