% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generate_sky.R
\name{calculate_sky_values}
\alias{calculate_sky_values}
\title{Sample a direction from the Prague model.}
\usage{
calculate_sky_values(
  phi,
  theta,
  altitude = 0,
  elevation = 10,
  visibility = 50,
  albedo = 0.5,
  azimuth = 90,
  number_cores = 1,
  wide_spectrum = FALSE,
  render_mode = "all"
)
}
\arguments{
\item{phi}{Horizontal angle of the sample, degrees. Vectorized. Range 0 to 360.}

\item{theta}{Vertical angle of the sample, degrees. Vectorized. Range -90 to 90.}

\item{altitude}{Default \code{0}, vectorized. Altitude of the viewer in meters. Range 0 to 15000.}

\item{elevation}{Default \code{10}, vectorized. Solar elevation angle above/below the horizon (degrees). Range -4.2 to 90.}

\item{visibility}{Default \code{50}, vectorized. Range 20 to 131.8. Meteorological range in kilometers for Prague model.}

\item{albedo}{Default \code{0.5}, vectorized. Range 0 to 1. Ground albedo.}

\item{azimuth}{Default \code{90}, single value. Solar azimuth (degrees). Defaults South.}

\item{number_cores}{Default \code{1}. Number of threads to use in computation.}

\item{wide_spectrum}{Default \code{FALSE}. Whether to use the wide-spectrum (55-channel, polarised) coefficients.}

\item{render_mode}{Default \code{"all"}. One of \code{"all"}, \code{"atmosphere"}, or \code{"sun"}.
Use \code{"all"} for atmosphere + solar disk, \code{"atmosphere"} for atmospheric radiance only, or \code{"sun"} for the solar disk only.}
}
\value{
3-column RGB matrix.
}
\description{
Evaluate the Prague spectral sky model at arbitrary spherical
directions without writing an image, returning radiance-only samples.
}
\examples{
\dontshow{if (interactive() || identical(Sys.getenv("IN_PKGDOWN"), "true")) withAutoprint(\{ # examplesIf}
# Generate a basic atmosphere with the Prague model
value_grid = expand.grid(
  phi = seq(0, 360, by = 30),
  theta = seq(0, 90, by = 10),
  altitude = c(0, 10000)
)
vals = calculate_sky_values(
  phi = value_grid$phi,
  theta = value_grid$theta,
  altitude = value_grid$altitude,
  elevation = 45,
  visibility = 120,
  albedo = 0
)
cbind(value_grid, vals)
\dontshow{\}) # examplesIf}
}
