frudawski

tregenzadist

The tregenzadist function determines the nearest neighbour patches and the angular distance to a given tregenza hemisphere patch.

Usage:

[p,d] = tregenzadist(patch,n,not)

Where:

ParameterDescription
pIs a vector containing the nearest neighbour patches in ascending order.
dIs a vector containing the corresponing angular distance to the given patch in ascending order.
patchDefines the Tregenza patch on the hemisphere, scalar.
nDefines the number of returned patches, scalar. Maximum value = 144.
notDefines patches that should be excluded, vector.

Examples

Determine the 6 nearest neighbours in ascending order of Tregenza patch 35:

tregenzadist(35,6)

Result:

ans =

   34
   36
   26
   81
   25
   27

Determine the 6 nearest neighbours in ascending order of Tregenza patch 35 excluding patch 36:

tregenzadist(35,6,36)
plottregenza(1:145,'w')

See also: plottregenza

Result:

ans =

   34
   26
   81
   25
   27
   80

Determine the 5 nearest neighbours in ascending order of Tregenza patch 118 and the according angular distance:

[p,d] = tregenzadist(118,5)

See also: plottregenza

Result:

 p =

   117
   119
    96
   132
    95

d =

   11.716
   11.716
   12.000
   12.000
   15.578

Reference:

Peter Roy Tregenza: Subdivision of the sky hemisphere for luminance measurements. In: Lighting Research and Technology, vol. 19, no. 1, pp. 13-14, 1987, (DOI: 10.1177/096032718701900103).

Leave a comment

* I accept the use of cookies as well as the terms in the privacy policy. I accept that data provided by me is processed and saved. I know and accept that comments may be saved and published after review.