# Irradiance on a Cylindrical Surface

This knowledge base article describes a method for calculating the irradiance on a cylindrical surface using a lens edge as an example. An embedded script is included in the example file which performs an r,θ mapping from the coordinate of a ray on the lens edge into a 2D rectilinear ARN, accounting for the pixel area of the data grid on the cylindrical surface.

Download the FRED file: irradianceLensEdge.frd

## Method Overview

Consider the system layout in Figure 1 below. We start by thinking of an analysis surface as being “wrapped” around the lens edge into a cylinder, where the idea is to take each position on the lens edge and map it to a corresponding “bin” in the analysis surface.

This particular symmetry allows us to easily calculate both the area of a single pixel in the analysis surface as well as the r, θ coordinate of a ray on the lens edge given its x,y,z position in the coordinate system of the edge surface.

__Script Pseudocode__

- Define the spatial sampling in z and θ
- Get the radius and z-dimensions of the lens edge
- Calculate a single pixel area
- Trace the source(s)
- Loop over all rays in the ray buffer.
- If ray is on the lens edge, get its position coordinates in the edge coordinate system
- Calculate the angle, θ, of the x,y position
- Bin the ray into the 2D data grid.
- Accumulate the irradiance for the bin

- Create an Analysis Results Node (ARN) to store the data and its properties
- Display the ARN in FRED’s chart view

## Example System

The images below show a single lens element with a rectangular block between the lens and the source both before and after a raytrace.

By default, the edge surface of a lens element is set to absorb and halt all rays. Therefore, at the end of the raytrace we expect that the irradiance distribution on the lens edge will have zero contribution within the blocked region. What range of angles should this be? Referencing the coordinate system in Figure 1 above we expect that in the zone from about θ = 45 to θ=135 the irradiance distribution should be zero along z. The irradiance distribution is shown below in Figure 4.