# How to calculate "blend" based on "spot size" and inner cone angle?

For a spot lamp I have two angles -- angle of the outer cone (spot size) and angle of the inner cone that inidicates the boundary line at which light from the spot will start to blur. Based on these two angles how can I calculate "blend" of the spot?

Blender reference manual says that "blend" value can be between 0.0 and 1.0 and that:

The falloff rate of the Spot lamp light is a ratio between the Blend and Size values; the larger the circular gap between the two, the more gradual the light fades between Blend and Size.

But I can't figure out the exact formula to calculate blend based on those two angles.

From the Blender Wiki:

The value is proportional and represents that amount of space that the inner cone should occupy inside the outer cone (SpotSi).

This is quite confusing, because the value is calculated by subtracting the area of the smaller circle from the area of the larger one instead.

R = bigest Radius

blend = π(R*R - r*r) / π(R*R)


It should be:

blend = (R*R - r*r) / (R*R)

blend = 1 -> r = 0
blend = 0 -> r = R


BUT the result is not exactly what I expected.

In this example, the smaller black circle is half as large as the radius of the larger circle.

The orange lines are the cones of the spotlight obtained from the formula:

blend = (R*R - r*r) / (R*R) = 0.75


This is the manual setting (blend 0.71):