R/transform_ellipsoid.R

Defines functions transform_ellipsoid

Documented in transform_ellipsoid

#' Applies the given linear transformation, tfm, to the given ellipsoid.  The ellipsoid (hellip) must be centered at the origin.
#'
#' @param hellip The original shape to be transformed
#' @param tfm A d x d linear transformation matrix
#' @return A transformed ellipsoid, centered at the origin

transform_ellipsoid <- function(hellip,tfm){
  V <- vertices(hellip)
  V2 <- tfm%*%V
  hellip1 <- make_ellipsoid_from_vertices(V2, get(hellip, 'size'))
  return(hellip1)
}

Try the SyScSelection package in your browser

Any scripts or data that you put into this service are public.

SyScSelection documentation built on Oct. 26, 2020, 5:08 p.m.