R/makeviewplane.R

Defines functions makeviewplane

	# Returns vectors of x and y axes (list with x=c(x,y,z) and y=c(x,y,z))
	# of the 'viewplane'.
	# Taken from Yplant, procedure with the same name.
	makeviewplane <- function(azimuth, altitude){
		k <- pi/180
		x <- c(-cos(azimuth*k),sin(azimuth*k),0)
		y <- c(-sin(azimuth*k)*sin(altitude*k),
			   -cos(azimuth*k)*sin(altitude*k),
			   cos(altitude*k) )
	    z <- xprod(x,y)
	return(list(x=x,y=y,z=z))
	}

Try the YplantQMC package in your browser

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

YplantQMC documentation built on May 29, 2017, 7:02 p.m.