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

rotate.infline

Rotate or Shift Infinite Lines


Description

Given the coordinates of one or more infinite straight lines in the plane, apply a rotation or shift.

Usage

## S3 method for class 'infline'
rotate(X, angle = pi/2, ...)

## S3 method for class 'infline'
shift(X, vec = c(0,0), ...)

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

## S3 method for class 'infline'
flipxy(X)

Arguments

X

Object of class "infline" representing one or more infinite straight lines in the plane.

angle

Angle of rotation, in radians.

vec

Translation (shift) vector: a numeric vector of length 2, or a list(x,y), or a point pattern containing one point.

...

Ignored.

Details

These functions are methods for the generic shift, rotate, reflect and flipxy for the class "infline".

An object of class "infline" represents one or more infinite lines in the plane.

Value

Another "infline" object representing the result of the transformation.

Author(s)

See Also

Examples

L <- infline(v=0.5)

  plot(square(c(-1,1)), main="rotate lines", type="n")
  points(0, 0, pch=3)
  plot(L, col="green")
  plot(rotate(L, pi/12), col="red")
  plot(rotate(L, pi/6), col="red")
  plot(rotate(L, pi/4), col="red")

  L <- infline(p=c(0.4, 0.9), theta=pi* c(0.2, 0.6))

  plot(square(c(-1,1)), main="shift lines", type="n")
  L <- infline(p=c(0.7, 0.8), theta=pi* c(0.2, 0.6))
  plot(L, col="green")
  plot(shift(L, c(-0.5, -0.4)), col="red")

  plot(square(c(-1,1)), main="reflect lines", type="n")
  points(0, 0, pch=3)
  L <- infline(p=c(0.7, 0.8), theta=pi* c(0.2, 0.6))
  plot(L, col="green")
  plot(reflect(L), col="red")

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.