R/hillshading.R

Defines functions hillshading

Documented in hillshading

hillshading = function(cgrad,sv){
	if (nargs() < 2) {
		cat("USAGE: hillshading(cgrad,sunvector) \n")
		return()
	}

	hsh = cgrad[,,1]*sv[1]+cgrad[,,2]*sv[2]+cgrad[,,3]*sv[3]
	hsh = (hsh + abs(hsh))/2. 
}

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.