R/heightRel.r

Defines functions heightRel

Documented in heightRel

#' Relative height
#' 
#' Calculates the relative height \eqn{h} for a given disparity \eqn{p} and (incidence) angles.
#' \deqn{h \approx \frac{p}{\cot  \theta_{i_2} - \cot \theta_{i_1}}}
#'  
#' @param p disparity height.
#' @param theta1 angle.
#' @param theta2 angle.
#' @export
#' @seealso \code{\link{disparityMapExpected}}
#' @examples
#' plot((c(35:45)/360*2*pi), disparity(10, (c(35:45)/360*2*pi), 45/360*2*pi), type='l')
heightRel <- function(p, theta1, theta2) {
    p/(1/tan(theta2) - 1/tan(theta1))
}

Try the ragram package in your browser

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

ragram documentation built on May 2, 2019, 4:42 p.m.