Formulas

This page gives examples of formulas to use. Five formulas associated to five analytical models are presented here but formulas can be customized allowing you to create your own analytical model.

The formula to write in the formula field can be divided into three parts.

The first part of the formula works as an identifier/designator. It indicates which analytical model is described by the formula and has to be left unchanged.

The second part represents the variables of the model. You can leave these variables unchanged or customize them to adjust the model to be described.

The third part must be replaced by numerical values.

Note: ThetaInc, PhiInc, ThetaOut, PhiOut are variables of the model.

ThetaInc/ThetaOut: Incident zenithal angle/ Reflected zenithal angle.

PhiInc/PhiOut: Incident azimuthal angle/ Reflected azimuthal angle.

PhiInc drives the anisotropy.

Reflection

The following table lists the strings to enter according to the chosen model.

The examples below are only describing models in reflection. Refer to the sections below to describe transmission or retro-reflection.

Model

Formula (string to write in the formula field)

ABg model

ABg(thetaInc, phiInc, thetaOut, phiOut, A, B, g) Example: ABg(thetaInc, phiInc, thetaOut, phiOut, 0.000161, 0.001, 1.5)

HarveyShack model

HarveyShack(thetaInc, phiInc, thetaOut, phiOut, b0, L, s) Example: HarveyShack(thetaInc, phiInc, thetaOut, phiOut, 0.161, -1.5, 0.01)

Gaussian model

Gaussian(thetaOut, phiOut, theta c, phi c, delta, FWHM width angle, FWHM height angle) Example: Gaussian(thetaOut, phiOut, 0, 0, 0.174532925, 0.1, 0.2)

Elliptical model

Elliptical(thetaOut, phiOut, theta c, phi c, delta, width angle, height angle) Example: Elliptical(thetaOut, phiOut, 0.0, 0.0, 0.174532925, 0.5, 0.8)

Rectangular model

Rectangular(thetaOut, phiOut, theta c, phi c, delta, width angle, height angle) Example: Rectangular(thetaOut, phiOut, 0.0, 0.0, 0.174532925, 0.5, 0.8)

Transmission

To describe transmission, indicate that the contributions are no longer occurring in the upper half space.

The zenithal angles (q) must no longer belong to the 0° to 90° interval but to the 90° to 180° interval. To do so, replace the thetaOut variable with p - thetaOut.

For an ABg model, the string to write becomes: ABg(thetaInc, phiInc, 3.14-thetaOut, PhiOut, A, B, g).

Transmission and Reflection

To create a BSDF in both reflection and transmission, add both contributions.

For an ABg model, the string to write becomes: ABg(thetaInc, phiInc, thetaOut, PhiOut, A, B, g) + ABg(thetaInc, phiInc, 3.14-thetaOut, PhiOut, A, B, g).

Retro-Reflecting BSDF

To create a BSDF with backscattering (i.e where the incoming light is reflecting back), replace thetaOut by -thetaOut.

Customized Model

It is possible to create a customized model, different from the five analytical models listed above. The variables of the formula can be adjusted to create your own model.

You can, for example, enter traditional functions like cos(thetaOut).

You can also add, subtract, multiply or divide models.

However, all mathematical operators and functions used must be standard and admitted by Speos.

Note: See the list of Operators and Functions that can be used to describe your formula.