Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (20 sloc) 0.808 kB
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% function lum = perezGradientModel(a, b, theta)
% Synthesizes the sky according to the Perez sky model, the
% gradient-dependent part only.
%
% Input parameters:
% - a, b: the 2 gradient-related weather coefficients
% - theta: zenith angle of sky element
%
% Output parameters:
% - lum: luminance map (same dimensions as theta)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function lum = perezGradientModel(a, b, theta)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright 2006-2009 Jean-Francois Lalonde
% Carnegie Mellon University
% Do not distribute
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
lum = 1 + a.*exp(b./cos(theta));
Jump to Line
Something went wrong with that request. Please try again.