normalvector: Vector normal to surface

Description Usage Arguments Value Author(s) References Examples

View source: R/normalvector.R

Description

Calculates a unit vector normal to a surface defined by slope inclination and slope orientation.

Usage

1

Arguments

slope

slope inclination in degrees.

aspect

slope orientation in degrees.

Value

Vector normal to surface, matrix of [x, y, z] coordinates.

Author(s)

Javier G. Corripio

References

Corripio, J. G.: 2003, Vectorial algebra algorithms for calculating terrain parameters from DEMs and the position of the sun for solar radiation modelling in mountainous terrain, International Journal of Geographical Information Science 17(1), 1-23.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# horizontal surface
normalvector(0,0)

# surface 45 degrees south
normalvector(45,180)

# range of surfaces 45 degrees E,SE,S,SW,W
normalvector(45,seq(90,270,45))

# Angle of incidence of the sun on a tilted surface 15 degrees south on March at Davos
jd = JD(seq(ISOdate(2019,3,20,0),ISOdate(2019,3,20,23),by="hour"))
degrees(acos(sunvector(jd,46.813,9.844,1) %*% as.vector(normalvector(15,180))))

insol documentation built on Feb. 10, 2021, 5:08 p.m.