R/normalvector.R

Defines functions normalvector

Documented in normalvector

normalvector <-
function(slope,aspect) {
	if (nargs() < 2 ) {cat("USAGE: normalvector(slope,aspect) \n"); return()}
	sloper = radians(slope)	
	aspectr = radians(aspect)
	nvx = sin(aspectr)*sin(sloper)
	nvy = -cos(aspectr)*sin(sloper)
	nvz = cos(sloper)
	return(cbind(nvx,nvy,nvz))
}

Try the insol package in your browser

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

insol documentation built on May 29, 2017, 3:22 p.m.