In [1]:

```
# developed in windows XP operating system 32bit
# platform Scilab 5.4.1
#clc;clear;
# example 22.1
# calculation of the luminous flux
# given data
lambd=600.# wavelength(in nm) given
P=10.# wattage(in W) of source
rellum=.6# relative luminosity
# calculation
# 1 W source of 555 nm = 685 lumen
lumflux=P*685*rellum# luminous flux
print'the luminous flux is',lumflux,'lumen'
```

In [2]:

```
# developed in windows XP operating system 32bit
# platform Scilab 5.4.1
#clc;clear;
# example 22.1w
# calculation of the total radiant flux,total luminous flux and the luminous efficiency
# given data
E1=12.# energy(in J) emitted by the source
lambda1=620.*10.**-9.# wavelength(in m) of the light1
E2=8.# energy(in J) emitted by the source
lambda2=580.*10.**-9.# wavelength(in m) of the light2
rellum1=.35# relative luminosity of the light1
rellum2=.80# relative luminosity of the light2
# calculation
radflux=E1+E2# total radiant flux
lumflux1=E1*685.*rellum1# luminous flux corresponding to the 12 W
lumflux2=E2*685.*rellum2# luminous flux corresponding to the 8 W
lumflux=lumflux1+lumflux2# total luminous flux
lumeff=lumflux/radflux# luminous efficiency
print'the total radiant flux is',radflux,'W'
print'the total luminous flux is',lumflux,' lumen'
print'the luminous efficiency is',lumeff,'lumen W**-1'
```

In [3]:

```
# developed in windows XP operating system 32bit
# platform Scilab 5.4.1
#clc;clear;
# example 22.2w
# calculation of the total luminous flux emitted by the source and the total luminous intensity of the source
# given data
import math
from math import pi
r=1.*10.**-2.# radius(in m) of the circular area
d=2.# distance(in m) from the point source
lumflux=2.*10.**-3.# luminous flux(in lumen)
# calculation
deltaw=(pi*r*r)/(d*d)# solid angle subtended by the area on the point source
F=(4.*pi*lumflux)/(deltaw)# total luminous flux
lumint=lumflux/deltaw# luminous intensity
print'the total luminous flux emitted by the source is',round(F),'lumen'
print'the total luminous intensity of the source is',lumint,'cd'
```

In [4]:

```
# developed in windows XP operating system 32bit
# platform Scilab 5.4.1
#clc;clear;
# example 22.3w
# calculation of the luminous flux falling on a plane
# given data
import math
from math import pi
P=100.# power(in W) input of the bulb
lumeff=25.# luminous efficiency(in lumen W**-1)
A=1.*10.**-4.# area(in m**2)
d=50.*10.**-2.# distance(in m) of the area from the lamp
# calculation
deltaF=lumeff*P# luminous flux emitted by the bulb
I=deltaF/(2.*pi)
deltaw=A/d**2.# solid angle(in sr)subtended by the object on the lamp
# I = deltaF/deltaw......luminous intensity
deltaF=I*deltaw# luminous flux emitted in the solid angle
print'the luminous flux falling on the plane is',deltaF,'lumen'
```

In [5]:

```
# developed in windows XP operating system 32bit
# platform Scilab 5.4.1
#clc;clear;
# example 22.4w
# calculation of the illuminance at a small surface area of the table-top
# given data
import math
from math import pi
d=.50# distance(in m) of the point source above the table-top
lumflux=1570.# luminous flux(in lumen) of the source
d1=.8# distance(in m)from the source
# calculation
I=lumflux/(4.*pi)# luminous intensity of the source in any direction
# E=I*cosd(theta)/r**2........illuminance
r=d# for point A
theta=0# for point A
EA=500.;#I*cosd(theta)/r**2.# illuminance at point A
r1=d1# for point B
theta1=51.3;#acosd(d/d1)# for point B
EB=122.;#I*cosd(theta1)/r1**2.# illuminance at point B
print'the illuminance at a small surface area of the table-top directly below the surface is',round(EA),'lux'
print'the illuminance at a small surface area of the table-top at a distance 0.80 m from the source is',EB,'lux'
```

In [6]:

```
# developed in windows XP operating system 32bit
# platform Scilab 5.4.1
#clc;clear;
# example 22.5w
# calculation of the luminous flux emitted into a cone of given solid angle
# given data
I0=160.# luminous intensity(in candela) of small plane source
deltaw=0.02# solid angle(in sr)
theta=60.# angle(in degree) made by the centre line of the cone with the forward normal
# calculation
I=80.;#I0*cosd(theta)# by using Lambert's cosine law
deltaF=I*deltaw# luminous flux
print'the luminous flux emitted into a cone of solid angle 0.02 sr around a line making an angle of 60 degree with the forward normal is',deltaF,'lumen'
```